![]() |
PHP Mail Not Working
I've got (2) ISPConfig 3 servers. Server A hosts most domains and all emails. Server B hosts 1 domain, but no email. Server A has a direct IP address, Server B is behind a NAT.
I would like to set it up so Server B can send mail (via SMTP) through Server A. Right now, I'm getting the following on Server B when I try to send mail through Server A: SMTP Error: Could not connect to SMTP host. Neither servers logs show anything (including running tail -f /var/log/syslog on both servers and watching what happens when I hit "send"). Thoughts |
Can you send email from A to B?
Some isp block port 25 to prevent spam from infected computers or spamers. Try to check your firewall/iptables configuration and try to connect manually to anothers mail servers(from B) with: Code:
telnet mailservername 25 |
Thanks... it does appear port 25 is blocked. However, our ISP itself doesn't block any of our ports (I've had this conversation with them in the past).
Also, both servers are connected to the same router, with nothing in the hardware firewall. If the firewall isn't on the router, where else might I look? FYI: using http://network-tools.com/ I get a connection (that's rejected because relaying isn't allowed) |
What are the outputs of
Code:
netstat -tapCode:
iptables -L |
Still pulling my hair out!
Server A:
netstat -tap Code:
Active Internet connections (servers and established)Code:
Chain INPUT (policy ACCEPT)Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete versionServer B is behind a NAT on a Cisco router. All ports open, nothing blocked at the router level. |
if you can't get it to work directly, an alternate approach would be to setup a open between those two servers. Then you can route the email though the vpn tunnel hence it uses a different port.
Or you can use alternate ports for smtp... I usually do also free 2500 and 2525 or you could try the submission port (587) |
i assume that you are running this from your house, or work. i would check the outside ports to make sure they are open. i have heard that line before yes port 25 is open but the person that you are talking to knows nothing other then what is on the monitor in front of them.
to check your ports you can use this site http://www.yougetsignal.com/tools/open-ports/ if port 25 is blocked you can use a relay service to send mail out on port 2525 this is how i have to do it sucks having to pay for a service but what are you going to do. |
Thanks. Going to http://www.yougetsignal.com/tools/open-ports/ shows port 25 open at Server A.
When I send an email from Server B, though, I'm getting this: Code:
Mar 16 17:00:21 myserver postfix/smtpd[26622]: connect from unknown[192.168.1.220] |
http://www.infoocean.info/avatar1.jpgCan you send email from A to B?
|
Ok... so this is what I've got.
A & B won't talk to each other, but I can send from out side (for instance Gmail) to A and B. Here's the setup: Cisco Router has a static IP of XXX.XXX.XXX.123 Server A is behind the Cisco router with a static IP XXX.XXX.XXX.122 Server B is behind the Cisco Router with a static IP 192.168.1.252, but NATed to XXX.XXX.XXX.124. Web services work great on A & B. Email is just fine on A. Email is fine on B. Except B won't talk to A and vice versa. I can't send mail to A or B. If I try to send from B to A, on server B I get: Code:
Mar 19 17:31:39 serverB postfix/smtp[23088]: 340211C01594: to=<email@serverA.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.69, delays=0.14/0/0.01/0.54, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as B80CE1C0159E)When I send from A to B, on server A I get: Code:
Mar 19 15:24:41 serverA postfix/smtpd[3997]: warning: XXX.XXX.XXX.123: hostname XXX-XXX-XXX-123.myisp.net verification failed: Name or service not knownCode:
Mar 19 17:40:35 serverB postfix/smtp[24568]: B80CE1C0159E: to=<email@serverA.com>, relay=none, delay=535, delays=505/0.08/30/0, dsn=4.4.1, status=deferred (connect to serverA.com[XXX.XXX.XXX.122]:25: Connection timed out)There is something with how things are configured that keeps A and B from talking to each other on Port 25 (or 587)... but both can talk to the rest of the world. |
| All times are GMT +2. The time now is 08:03. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.