Learn how to a build a cloud-first strategyRegister Now


Configure Postfix as outgoing server only

Posted on 2011-05-05
Medium Priority
Last Modified: 2012-05-11
I have postfix configured on a CentOS server as a simple outgoing-server only. There are no local users, mailboxes or IMAP/POP access. It's simply used to send out bulk email (>2000) by some of our users. However, it seems to fail to deliver any bounced/failed-to-deliver email.

The code includes a snippet from /var/log/maillog.

I'm not sure how to configure postfix to send the mail back to the user.
May  5 15:54:33 mail2 postfix/qmgr[26827]: 629542F00B0: from=<user@mycompany.com>, size=10025, nrcpt=1 (queue active)
May  5 15:54:36 mail2 postfix/smtpd[26846]: disconnect from unknown[]
May  5 15:54:36 mail2 postfix/smtp[26849]: 629542F00B0: to=<lksjdflsjdfoeifuiwheiufhief@gmail.com>, relay=gmail-smtp-in.l.google.com[]:25, delay=3.4, delays=0.11/0.01/0.23/3.1, dsn=5.1.1, status=bounced (host gmail-smtp-in.l.google.com[] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at                              550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 x72si6979 (in reply to RCPT TO command))
May  5 15:54:36 mail2 postfix/cleanup[26848]: D0D5F2F00BF: message-id=<20110505195436.D0D5F2F00BF@mail2.mycompany.com>
May  5 15:54:36 mail2 postfix/bounce[26850]: 629542F00B0: sender non-delivery notification: D0D5F2F00BF
May  5 15:54:36 mail2 postfix/qmgr[26827]: D0D5F2F00BF: from=<>, size=12587, nrcpt=1 (queue active)
May  5 15:54:36 mail2 postfix/qmgr[26827]: 629542F00B0: removed
May  5 15:54:39 mail2 postfix/smtp[26849]: connect to mycompany.com[]: No route to host (port 25)
May  5 15:54:39 mail2 postfix/smtp[26849]: D0D5F2F00BF: to=<user@mycompany.com>, relay=mycompany.com[]:25, delay=3.1, delays=0.03/0/3/0.08, dsn=5.7.1, status=bounced (host mycompany.com[] said: 550 5.7.1 Unable to relay for user@mycompany.com (in reply to RCPT TO command))
May  5 15:54:39 mail2 postfix/qmgr[26827]: D0D5F2F00BF: removed

Open in new window

Question by:BCRobert
  • 4
  • 2
LVL 38

Expert Comment

ID: 35702138
> connect to mycompany.com[]: No route to host (port 25) port 25 being blocked outbound.

Expert Comment

ID: 35705598
To add for what Wesly said

You need to allow it on your firewall.

create a script and add

iptables -A INPUT -p tcp -s 0/0 --sport 25  --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p tcp -s 0/0 --sport 25  --dport 25 -m state --state NEW,ESTABLISHED -j ACCEPT

Author Comment

ID: 35706074 doesn't even exist anymore. It's an old DC that's gone, so I'm not sure where it's getting that IP from. This is connected to a Windows domain network. I didn't do the initial setup, so I'm not 100% familiar with how the DNS is configured, but it seems to have records to old servers still in there.

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 35706880
It also appears that mail sent to people inside the domain also get bounced back as it can't find a proper relay host.
LVL 38

Expert Comment

ID: 35978763
Hi, I will be on vacation for 10 days start 6/17/2011. Please click "Request Attention" if you need help during my absent. Other experts will assist you.

Accepted Solution

BCRobert earned 0 total points
ID: 36112464
I've abandoned this project as we've moved back to Exchange. Thanks for the help.

Author Closing Comment

ID: 36135855
Not an answer, since I've abandoned this project/question.

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month21 days, 6 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question