configuring sendmail
by admin on November 12, 2014
1- install sendmain-cf
1 |
yum install sendmail-cf |
2- change directory to /etc/mail and take a backup from original files.
1 2 3 |
cd /etc/mail cp sendmail.mc sendmail.mc.bak cp sendmail.cf sendmail.cf.bak |
3- edit below config file:
1 2 |
cd /etc/mail vi sendmail.mc |
you should remove dnl from below line:
- LOCAL_DOMAIN (‘localhost.localdomain’) dnl
- FEATURE (masquerade_envelope) dnl
- FEATURE (masquerade_entire_domain) dnl
and enter your domain name that you want to use – such as localhost
- MASQUERADE_AS (‘localhost’) dnl
- MASQUERADE_DOMAIN (localhost) dnl
and then:
1 2 |
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf service sendmail restart |
now you can send test email:
1 |
sendmail -s "TEST EMAIL" john@doe.com < /dev/null |
Leave your comment