How to Configure Sendmail

Save

Sendmail is an email routing application for the Unix and Linux operating systems. It supports most mail delivery methods, including SMTP, HylaFax, QuickPage and UUCP. The first version of Sendmail was written by Eric Allman in 1979 and was called delivermail, but it was not flexible enough for the growth of the TCP protocol, so he created sendmail. The software is available as an open source (free) and a proprietary version.

  • Open a Terminal Window to access a command prompt where you will type the following commands.

  • Type the command "su" to switch to the root user.

  • Type the command "gedit /etc/resolv.conf" to open the "resolv.conf" file in a text editor. You can replace gedit with any text editor (vi, nano, kate, etc.).

  • Place the following lines in the "resolv.conf" file, if they are not there already:
    domain example.com
    nameserver 192.168.0.100
    Replace "example.com" with the name of your domain. Replace "192.168.0.100" with the address of your nameserver.

  • Open the "/etc/hosts" file in a text editor.

  • Place the fully qualified domain name in the "/etc/hosts" file, as well as any aliases for your host. The first line should look like this:
    127.0.0.1 mail.example.com localhost.localdomain localhost mail
    Replace "mail.example.com" with the fully qualified domain name, and "mail" with any aliases.

  • Type the command "gedit /etc/mail/sendmail.mc" to open the "sendmail.mc" file in a text editor.

  • Place the characters "dnl" in front of the line "define('SMART_HOST','mail.example.com')." The "dnl" characters are used in the "sendmail.mc" file to indicate comments. This will stop the line from being read and processed.

  • Change the "Addr" variable in the line "dnl DAEMON_OPTIONS('Port=smtp,Addr=127.0.0.1, Name=MTA')" to reflect the IP address of your mail server. Remove the "dnl" characters in front of the line.

  • Open the "/etc/mail/access" file in a text editor. Place the IP address and domain name of the computers and domains that can relay mail through your server in the file.

  • Open the "etc/mail/local-host-name" file in a text editor. List the host names and domain names that the sendmail server accepts responsibility for.

  • Open the "/etc/mail/virtusertable" file in a text editor. Place the users' email addresses and the local mail box for each user in this file.

  • Type the following commands to reconfigure sendmail:
    cd /etc/mail
    make
    newaliases
    /etc/init.d/sendmail restart

References

Promoted By Zergnet

Comments

Resources

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!