Date: Mon, 01 Nov 2004 14:44:44 -0500 From: Steel City Phantom <scphantm@yahoo.com> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: questions@freebsd.org Subject: Re: sendmail config double check Message-ID: <4186922C.8000404@yahoo.com> In-Reply-To: <20041101191923.GA6694@happy-idiot-talk.infracaninophile.co.uk> References: <418680B7.5020100@yahoo.com> <20041101191923.GA6694@happy-idiot-talk.infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4186922C.8000404>