Installing Required Packages
1 2 3 |
# yum install sendmail sendmail-cf m4 |
Configure Sendmail Server
Comment out below line in /etc/mail/sendmail.mc to allow receiving email from anywhere.
1 2 3 |
dnl DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl |
Add this line also in sendmail.mc above ‘MAILER’ option
1 2 3 |
FEATURE(`relay_hosts_only')dnl |
Add your PC’s full hostname in this file.
1 2 3 |
# hostname >> /etc/mail/relay-domains |
Recompile Sendmail Configuration
1 2 3 |
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf |
Restart Sendmail service
1 2 3 |
# /etc/init.d/sendmail restart |