Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 from

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


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

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

then ran

m4 >

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?

share|improve this question
what is reported by netstat -ant | grep :25? – Andrzej A. Filip Jun 29 '13 at 14:48
Also do a iptables -nL on your mail server and see if port 25/tcp inbound is allowed – adamo Jun 30 '13 at 11:10

After adding

DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea')dnl

to everything works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.