sendmail config double check

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Nov 1 11:19:37 PST 2004


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

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20041101/ec7f3b25/attachment.bin


More information about the freebsd-questions mailing list