Configure Postfix as outgoing server only

Posted on 2011-05-05
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=<>, 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=<>,[]:25, delay=3.4, delays=0.11/0.01/0.23/3.1, dsn=5.1.1, status=bounced (host[] 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 x72si6979 (in reply to RCPT TO command))
May  5 15:54:36 mail2 postfix/cleanup[26848]: D0D5F2F00BF: message-id=<>
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[]: No route to host (port 25)
May  5 15:54:39 mail2 postfix/smtp[26849]: D0D5F2F00BF: to=<>,[]:25, delay=3.1, delays=0.03/0/3/0.08, dsn=5.7.1, status=bounced (host[] said: 550 5.7.1 Unable to relay for (in reply to RCPT TO command))
May  5 15:54:39 mail2 postfix/qmgr[26827]: D0D5F2F00BF: removed

Open in new window

Question by:BCRobert
    LVL 38

    Expert Comment

    > connect to[]: No route to host (port 25) port 25 being blocked outbound.
    LVL 2

    Expert Comment

    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

    by:BCRobert 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.


    Author Comment

    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

    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

    I've abandoned this project as we've moved back to Exchange. Thanks for the help.

    Author Closing Comment

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

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I didn’t use eM Client for long when I decided to swap to Outlook 2016. The reason for the switch is that it started asking for payment to continue some of its services after one month.   The problems I faced when I didn’t pay were:   I was not …
    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    The purpose of this video is to demonstrate how to set up an account with Mailchimp. This will be demonstrated using a Windows 8 PC. Tools Used are: Go to : Enter an Email, Username, and Password. Click Create My Acco…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now