August 24, 2006

[redhat/fedora] Activate Sendmail

Filed under: Unix Admin — HanaDaddy @ 11:48 pm

If you want to activate sendmail (SMTP) Server…

/etc/mail/sendmail.mc file

uncomment by adding dnl in front of below line

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
</lang>
So it becomes
<pre lang="none">
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl


Now after modifying sendmail.mc, regenerate sendmail.cf

m4 < sendmail.mc > sendmail.cf

restart sendmail

/etc/init.d/sendmail restart

Also edit /etc/hosts.allow

#for allowing connection from local machine only
sendmail:localhost 127.0.0.1 localhost.localdomain
 
#or for allowing connection from all around the world -> not safe 
sendmail:ALL
 
#Make sure add all local host domain in /etc/mail/local-host-names to receive email for those domain

And restart sendmail

/etc/init.d/sendmail restart

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

 

43 queries. 0.637 seconds. Powered by WordPress