Mail Server not accepting messages: delivery temporarily suspended - Connection refused

10 posts / 0 new
Last post
#1 Mon, 02/24/2014 - 16:16
athera

Mail Server not accepting messages: delivery temporarily suspended - Connection refused

Hey guys

Just set up a new server with

Operating system CentOS Linux 6.5 Kernel and CPU Linux 2.6.32-431.3.1.el6.x86_64 on x86_64 Loaded (via the install script) Webmin version 1.675 Virtualmin version 4.06.gpl GPL Create a virtual domain and some email users. When I send email to any of the users it never gets there. I looked at the /var/log/messages and /var/log/maillog everything seems fine and no mention of mail refused

I looked at the /var/log/maillog of the server, named cloud, that I sent the email from and it says

Feb 24 12:12:38 cloud postfix/qmgr[4275]: 1A4C82B0CDB: to=abc@ms3.abc.com, orig_to=abc@abc.com, relay=none, delay=261839, delays=261839/0.52/0/0, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to ms3.abc.com[1xx.2xx.1xx.2xx]: Connection refused)

So looked for firewall issues First

netstat -tln | grep :25

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

tcp 0 0 ::1:25 :::* LISTEN

and then

iptables -L -n

Chain INPUT (policy ACCEPT)

target prot opt source destination

.

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25

.

REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)

target prot opt source destination

REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)

target prot opt source destination

So next looked at /etc/postfix/main.cf and the following is uncommented

inet_protocols = all

So what gives any ideas???

Nicholas

Mon, 02/24/2014 - 19:21
lp86

Is this server on residential connection or a lower tier business plan? Most of those block port 25 to help stop the flow of spam.

Mon, 02/24/2014 - 20:33 (Reply to #2)
athera

No it is a commercial server running on Rackspace together with several similar (centos/virtualmin) but older servers which work just fine

Tue, 02/25/2014 - 04:10
Locutus

You can test if the destination mailserver is reachable by doing this (using your placeholder):

ping 1xx.2xx.1xx.2xx
mtr 1xx.2xx.1xx.2xx
telnet 1xx.2xx.1xx.2xx 25

If the ping and mtr works (you can abort it with Ctrl+C and q respectively), but the telnet does not connect, then something on the routing path is blocking port 25. You might want to ask your hoster if they do that. We've had multiple occasions here on the forum where the hoster blocks port 25 outgoing as an anti-spam measure.

Tue, 02/25/2014 - 06:56 (Reply to #4)
athera

Hi guys and thanks for the replies.

ping works mytraceroute works and telnet connects.

But I discovered that I was missing one of the server names in the main.cf mydestination = $myhostname, localhost.$mydomain, localhost, localhost.localdomain, cloud.abc.com, ms3.abc.com

cloud.abc.com was there but ms3.abc.com was not and messages for user@cloud.abc.com were rejected and written in the log where messages for user@ms3.abc.com were not in the logfile and because I was mostly testing ms3 I thought that nothing was written to the log.

So after adding it to the main.cf now everything gets written to the log with message

Feb 25 12:06:04 cloud postfix/smtpd[3420]: NOQUEUE: reject: RCPT from mail-ea0-f169.google.com[209.85.215.169]: 550 5.1.1 <userm@ms3.abc.com>: Recipient address rejected: User unknown in local recipient table; from=<nicholas.athera@gmail.com> to=<userm@ms3.abc.com> proto=ESMTP helo=<mail-ea0-f169.google.com>

I checked the main.cf again and it says

virtual_alias_maps = hash:/etc/postfix/virtual

and checked the /etc/postfix/virtual and userm is properly in it.

userm@abc.com userm.abc

What am I missing???

Tue, 02/25/2014 - 08:29
athera

In the main.cf I change

#virtual_alias_maps = hash:/etc/postfix/virtual
local_recipient_maps = unix:passwd.byname $alias_maps
 

and sent an email to userm.abc@ms3.abc.com that message was delivered

then I switched back

virtual_alias_maps = hash:/etc/postfix/virtual
#local_recipient_maps = unix:passwd.byname $alias_maps
 

and sent an email to userm.abc@ms3.abc.com that message was delivered also

then I sent an email to userm@ms3.abc.com that message was NOT delivered

checked the /etc/postfix/virtual again

abc@abc.com abc
abc.com abc.com
hostmaster@abc.com  abc@abc.com
abuse@abc.com   abc@abc.com
webmaster@abc.com   abc@abc.com
postmaster@abc.com  abc@abc.com
userz@abc.com   userz.abc
userm@abc.com   userm.abc
 
 

Any thoughts ???

Tue, 02/25/2014 - 08:57
Locutus

Is "ms3.abc.com" the hostname of your server? Usually you don't send mail to users at the hostname, but to the domains managed through Virtualmin. Try sending to "abc@abc.com" or other users in the virtual alias map.

Tue, 02/25/2014 - 09:21 (Reply to #7)
athera

Hi Locutus

The reason I am using userm@ms3.abc.com is that mail to userm@abc.com will actually go to userm@ms1.abc.com which is the production server. ms3 is a new server that I am setting up.

Tue, 02/25/2014 - 09:13
athera

I added the users to the mail aliases in /etc/aliases.

userz.abc: userz@abc.com   
userm.abc: userm@abc.com 

and mail userm@abc.com does not get rejected anymore

I thought that virtualmin did that automatically when a user is created in a virtual domain but maybe not

Tue, 02/25/2014 - 09:25
Locutus

Virtualmin does do that when you add a user -- it creates a local Linux user and an appropriate entry in the virtual alias map. Normally there's no need to add things to other alias files, as long as you stick with sending mail to the users you actually define through Virtualmin, and don't use usernames at the server's hostname.

Topic locked