Sendmail local only.....
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Jan 22 17:25:13 PST 2008
On 2008-01-22 16:28, Schiz0 <schiz0phrenic21 at gmail.com> wrote:
>On Jan 22, 2008 4:25 PM, Agus <agus.262 at gmail.com> wrote:
>> Hi guys,
>> Just trying to make sendmail work locally only.....And by that i
>> mean, i dont want sendmail to be able to relay or send mail to any
>> other machine except for localhost....
>>
>> How can i do this? I mean is there a way on rc.conf or i need to
>> touch the cf??
>
> Search the file /etc/defaults/rc.conf for "sendmail"
> It has a bunch of options and explains what they do.
> NOTE: do not edit /etc/defaults/rc.conf - that's just the "Default
> settings" file.
> Make any changes in the /etc/rc.conf file instead.
>
> Basically, you want
>
> sendmail_enable="NO"
>
> And the rest of the sendmail options enabled.
Not all of them, mind you. I use the following on my laptop:
sendmail_enable="NO"
sendmail_outbound_enable="NO"
sendmail_submit_enable="YES"
sendmail_msp_queue_enable="YES"
A fairly good explanation of why this setup works only as a 'local MTA',
and doesn't accept incoming SMTP connections from the world can be found
in the manpage of rc.sendmail:
% man rc.sendmail
To the original poster:
Feel free to use the above sendmail_xxx settings in your `/etc/rc.conf'
file, but please make sure that you also:
... understand why these settings make Sendmail only forward locally
generated email messages, by reading the rc.sendmail manpage.
... have configured properly your local `/etc/mail/sendmail.cf' and
`/etc/mail/submit.cf' files.
... read the Handbook section about Sendmail, and let us know if you
find it difficult to understand, or you would like to see more stuff
documented.
Cheers,
Giorgos
More information about the freebsd-questions
mailing list