Hello all,
We are experiencing the 'mail for domain.com loops back to myself' issue on our VPS.
The domain.com always had it's e-mail handled via an Exchange-server located outside of the Webdomain.
Let's call the Exchange-server's ip 'exchange.server.ip'
We recently moved domain.com to a new VPS and and we're experiencing the issue where every e-mail that is sent via the webserver (PHP mail()) does not get routed to the external Exchange-server.
I've searched the internet for this issue, and it seemed alot of threads/posts suggest solving this issue by changing the 'mydestination' parameter in the main.cf config file. However I tried multiple different setings, and all of them gave the following log-entries when trying to send a mail via the webserver to a @domain.com e-mailaddress:
I've added the postconf output file as 'main config.txt'. Some changes I made during testing might still be present in the config. (i.e. mydestination parameter is empty)
Since this probably has something to do with DNS settings, I've added the DNS-settings for the domain where we try to send the mail from:
Summary:
Moved existing websites to a new VPS. E-mail has always been handled by an (external) Exchange-server.
Now the webserver on which the domain runs tries to handle sending the mail, without processing the MX-records (I believe) and routing it to the external Exchange server.
It is probably pretty obvious I am by no means an expert with CentOS and postfix, so I hope I am not missing a simple thing.
Hopefully someone knows why this is occuring, and knows a solution.
Thanks in advance!
Rowan
We are experiencing the 'mail for domain.com loops back to myself' issue on our VPS.
The domain.com always had it's e-mail handled via an Exchange-server located outside of the Webdomain.
Let's call the Exchange-server's ip 'exchange.server.ip'
We recently moved domain.com to a new VPS and and we're experiencing the issue where every e-mail that is sent via the webserver (PHP mail()) does not get routed to the external Exchange-server.
I've searched the internet for this issue, and it seemed alot of threads/posts suggest solving this issue by changing the 'mydestination' parameter in the main.cf config file. However I tried multiple different setings, and all of them gave the following log-entries when trying to send a mail via the webserver to a @domain.com e-mailaddress:
Code:
Dec 3 09:39:16 domain postfix/smtp[21523]: warning: host mail.domain.com[exchange.server.ip]:25 greeted me with my own hostname domain.com
Dec 3 09:39:16 domain postfix/smtp[21523]: warning: host mail.domain.com[exchange.server.ip]:25 replied to HELO/EHLO with my own hostname domain.com
Dec 3 09:39:16 domain postfix/smtp[21523]: C3D8F66E18: to=<[email protected]>, relay=mail.domain.com[exchange.server.ip]:25, delay=0.08, delays=0/0.01/0.07/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
Dec 3 09:39:16 domain postfix/qmgr[4423]: C3D8F66E18: removed
I've added the postconf output file as 'main config.txt'. Some changes I made during testing might still be present in the config. (i.e. mydestination parameter is empty)
Since this probably has something to do with DNS settings, I've added the DNS-settings for the domain where we try to send the mail from:
Code:
vps.server.ip / 24 PTR domain.com.
fallbacks4.domain.com. A 217.115.195.25
ftp.domain.com. CNAME domain.com.
ipv4.domain.com. A vps.server.ip
domain.com. NS ns.domain.com.
domain.com. A vps.server.ip
domain.com. MX (10) mail.domain.com.
domain.com. MX (30) fallbacks4.domain.com.
domain.com. TXT v=spf1 +a +mx -all +a:domain.com
localhost.domain.com. A 127.0.0.1
mail.domain.com. A exchange.server.ip
ns.domain.com. A vps.server.ip
webmail.domain.com. A vps.server.ip
www.domain.com. CNAME domain.com.
Summary:
Moved existing websites to a new VPS. E-mail has always been handled by an (external) Exchange-server.
Now the webserver on which the domain runs tries to handle sending the mail, without processing the MX-records (I believe) and routing it to the external Exchange server.
It is probably pretty obvious I am by no means an expert with CentOS and postfix, so I hope I am not missing a simple thing.
Hopefully someone knows why this is occuring, and knows a solution.
Thanks in advance!
Rowan