25: Connection refused - Added IP to virtualmin server and new IP cannot receive email

7 posts / 0 new
Last post
#1 Thu, 11/12/2015 - 10:42
plahpoy@gmail.com

25: Connection refused - Added IP to virtualmin server and new IP cannot receive email

Hi,

I added a second site to my virtualmin box with its own IP address.

For some reason when email is sent to the new domain/IP postfix refused the connection to 25.

If i set the mail server for the new domain to the host domain mail.1stdomain.com it works, mail.2nddomain.com does not work with:

error: (postfix/smtp[17181]: connect to mail.2nddomain.com[1xx.xxx.xxx.xxx]:25: Connection refused

postfix is set to receive on all connections.

Any help would be appreciated!

Thu, 11/12/2015 - 11:33
andreychek

Howdy,

What is the output of these two commands:

netstat -an | grep :25
iptables -L -n

Also, do emails to other domains work as expected?

-Eric

Thu, 11/12/2015 - 12:32
plahpoy@gmail.com

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN tcp 0 0 1xx.xxx.xx.86:25 0.0.0.0:* LISTEN tcp 0 0 1xx.xxx.xx.84:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:2525 0.0.0.0:* LISTEN tcp6 0 0 :::2525 :::* LISTEN

.85 is the domain in question, which seems to not be listening. I checked this earlier and could have sworn i saw .25 (it was 8am though).

Yes other domains are working just fine.

as for iptables - I have completely disabled firewall (csf)

root@ns1:/var/log# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination

Thu, 11/12/2015 - 13:08
andreychek

Howdy,

You may be seeing a problem with your /etc/postfix/master.cf file then. My suggestion is to review it, and make sure that there is an "smtp" line that contains the IP address you need to be listening.

-Eric

Thu, 11/19/2015 - 19:03
plahpoy@gmail.com

Thanks Andreycheck, that seems to have been the issue. Any idea why this would not have been automated when placing the account on its own ip?

Thu, 11/19/2015 - 23:17
andreychek

Unfortunately, it may be a bug with Virtualmin setting what IP's Postfix is listening on. There's a few other folks who had reported something similar recently.

I have added this to my notes of things to discuss with Jamie.

-Eric

Tue, 11/24/2015 - 12:17
Snop Randin

Well, that saved me the work to create a new thread with this bug.

I found the same problem here on a fresh virtualmin installation on a fresh installed debian 8 server. there are 12+1 ip adresses directing to the server (already during the installation) and everything is working fine with the "main ip". but creating a new domain and attching it to another IP, no mails are working any more for that domain (smtp), but the apache is running. VERY frustrating and i spent hours to find that problem.

your solution this the missing IP in the master.cf is right. i found that one hour ago also: copying the line and entering the IP manually ... brought smtp back to work.

but with my number of IP addresses it's too much work to control everything manually. is there a fix planned ?

regards, Snop