Setting up Sendmail with Fedora
1. cd to /etc/mail directory
2. Firstly make sure that sendmail is not enable to localhost only.
3. Edit sendmail.mc file and locate DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
4. If the line is as stated above, remove the Addr=127.0.0.1 then save and exit sendmail.mc file.
5. Recompile sendmail.cf by issuing the command m4 sendmail.mc > /etc/mail/sendmail.cf
6. After recompiling sendmail, edit the file local-host-name found in /etc/mail directory and add in the domain name that you want to receive email.
7. Once all the steps from the above is done, edit the access file to enable relay to only local LAN subnet only. For eg, if your LAN is running 192.168.1.0/24 ip subnet, your access file should look like as below:
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# package.
#
# If you want to use AuthInfo with "M:PLAIN LOGIN", make sure to have the
# cyrus-sasl-plain package installed.
#
# By default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
192.168.0 RELAY
8. Start creating user accounts.
9. Restart sendmail by issuing the command service sendmail restart
No comments:
Post a Comment