sendmail config double check

Steel City Phantom scphantm at yahoo.com
Mon Nov 1 11:44:08 PST 2004


   ok, cool.  thanks.  next simple question, once i change these, how do
   i get sendmail to pick up the new settings without rebooting the
   server?
   Matthew Seaman wrote:

On Mon, Nov 01, 2004 at 01:30:15PM -0500, Steel City Phantom wrote:
  

my bsd LAMP machine won't send any emails through php.  i just wanted to 
doublecheck my rc.conf with you guys to make sure i have it right.  here 
are the settings

sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="YES"

now, if my brain is straight, these settings should reject outside 
systems from trying to route mail through this machine, but the machine 
itself can generate and send mail.  am i right?
    

sendmail_enable="NO" --- implies: don't run a sendmail process
listening on port 25 for incoming connections over the 'net.  CORRECT.

sendmail_submit_enable="NO" --- implies: don't run a sendmail MTA
process listening on the loopback address.  WRONG.  You can't send
e-mail without an MTA process in there somewhere, and this setting is
expressly designed for 'send-only' machines.  

sendmail_outbound_enable="YES -- implies: flush the sendmail MTA queue
at intervals.  IRRELEVANT.  You don't need this if you run the
'sendmail_submit_enable' instance above, and in fact, rc.sendmail will
ignore this setting if you have 'sendmail_submit_enable="YES"'.

You should also have 'sendmail_msp_queue_enable="YES"' which will
flush any emails stuck in the submission queue.  But that's the
default anyhow.

In summary, you want:

    sendmail_enable="NO"
    sendmail_submit_enable="YES"
    sendmail_outbound_enable="NO"
    sendmail_msp_queue_enable="YES"

I'm not exactly sure how PHP sends e-mail on a Unix system.  The
choices are either that it speaks SMTP directly to an MTA (which in
this case will have to be localhost port 25), or else it does what all
good unix programs should do, which is to pipe the message into the
STDIN of /usr/sbin/sendmail.  The config above should work for both of
those cases.  You will possibly need to fiddle with
/etc/mail/`hostname`.mc to setup a smart host as the next MTA to pass
the message to -- see the comments in that file for details.

        Cheers,

        Matthew

  


More information about the freebsd-questions mailing list