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 :25tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 ::1:25 :::* LISTEN
and then
iptables -L -nChain 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
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.
No it is a commercial server running on Rackspace together with several similar (centos/virtualmin) but older servers which work just fine
You can test if the destination mailserver is reachable by doing this (using your placeholder):
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.
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???
In the main.cf I change
and sent an email to userm.abc@ms3.abc.com that message was delivered
then I switched back
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
Any thoughts ???
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.
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.
I added the users to the mail aliases in /etc/aliases.
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
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.