From CDOT Wiki
Revision as of 01:59, 24 March 2009 by Bossa nesta (talk | contribs) (Test the SMTP port remotely)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Running Sendmail on VM

Sample Configuration


Edit/Modify /etc/mail/

  • Backup the file first: cp /etc/mail/ /etc/mail/
  • Add the following line in the option section (use your IP for the Addr=):
0 DaemonPortOptions=Port=smtp,Addr=, Name=MTA

after the line:

0 DaemonPortOptions=Port=smtp,Addr=, Name=MTA
  • Restart sendmail:
service sendmail restart
  • Run the command "netstat -ant" you should have the following two lines:
Proto Recv-Q Send-Q Local Address       Foreign Address      Stat
tcp        0      0*            LISTEN
tcp        0      0*            LISTEN

Open SMTP port on the firewall

Run the following command:

/sbin/iptables -I INPUT -p tcp --dport 25 -j ACCEPT

Note that you can make the rule more restrictive by specifying the Source Network or IP address.

Test the SMTP port locally

telnet localhost 25

Test the SMTP port remotely

Login to another VMs and run the following command to connect to port 25 on

telnet 25

Sendmail with ldap