Configure sendmail to accept connection from one other IP address

Posted by Kumala on Server Fault See other posts from Server Fault or by Kumala
Published on 2013-06-29T14:28:39Z Indexed on 2013/06/29 16:22 UTC
Read the original article Hit count: 244

Filed under:

I have a RubyOnRails application running on the same server that runs sendmail. The application sends out (no need to receive) emails via the local sendmail.

Now I intend to move sendmail to a dedicated server. How do I make sendmail on that server accept connections from my application on the other server?

I modified sendmail.mc from

DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl

to

DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp')dnl

I have also added to /etc/mail/access:

Connect:198.211.117.41                             RELAY

then ran

m4 sendmail.mc > sendmail.cf

and restarted sendmail.

Trying to connect from my app server with telnet on port 25 to the mail server gives me:

telnet: Unable to connect to remote host: Connection refused

Am I missing something?

© Server Fault or respective owner

Related posts about sendmail