Link to home
Start Free TrialLog in
Avatar of BCRobert
BCRobert

asked on

Configure Postfix as outgoing server only

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[10.1.2.141]
May  5 15:54:36 mail2 postfix/smtp[26849]: 629542F00B0: to=<lksjdflsjdfoeifuiwheiufhief@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.67.27]: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[74.125.67.27] 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[10.1.2.6]: No route to host (port 25)
May  5 15:54:39 mail2 postfix/smtp[26849]: D0D5F2F00BF: to=<user@mycompany.com>, relay=mycompany.com[10.1.2.111]:25, delay=3.1, delays=0.03/0/3/0.08, dsn=5.7.1, status=bounced (host mycompany.com[10.1.2.111] 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

Avatar of wesly_chen
wesly_chen
Flag of United States of America image

> connect to mycompany.com[10.1.2.6]: No route to host (port 25)
10.1.2.6 port 25 being blocked outbound.
Avatar of Luminar
Luminar

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
Avatar of BCRobert

ASKER

10.1.2.6 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.

Gateway: 10.1.1.1
DNS1: 10.1.2.9
DNS2: 10.1.2.111
It also appears that mail sent to people inside the domain also get bounced back as it can't find a proper relay host.
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.
ASKER CERTIFIED SOLUTION
Avatar of BCRobert
BCRobert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not an answer, since I've abandoned this project/question.