Cannot send mails using php mail() function to domain with remote mail exchanger
Hello every one!
I'm facing a weird problem.
On a dedicated server I have WHM 11.40.1 (build 11).
PHP 5.4.23
I have an account set up lets say domain.com.
In its DNS zones, I have insert the necessary records for the hotmail MX records AND the Remote Mail Exchanger option on.
I 'm trying to send an email using mail('info@domain.gr', 'Test from Script', 'Test Text');
It should go to the hotmail servers. Right?
I get no errors in exim_mainlog.
The Mail Queue is empty. The domain.com is NOT in /etc/localdomains and is ON the /etc/remotedomains. If i dig MX domain.com, I get the lowest MX record pointing to .pamx1.hotmail.com. as expected. But still no mail in hotmail accounts. And now the weird staff: If i run the php script through shell (root) access, the mail goes to hotmail account. If I create a local mail account (info@domain.com) and log in into it (via domain.com/webmail), I can see the message from the php script! Any help would be great! Thank you in advance.
2014-02-19 18:16:15 1WG9ol-0000Gk-46 <= domain@my.server.com U=domain P=local S=371 T="Test from script" for info@domain.com
2014-02-19 18:16:15 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1WG9ol-0000Gk-46
2014-02-19 18:16:15 cwd=/home/domain/public_html 3 args: /usr/sbin/sendmail -t -i
2014-02-19 18:16:15 1WG9ol-0000Gk-46 => domain R=localuser T=local_delivery
2014-02-19 18:16:15 1WG9ol-0000Gk-46 Completed
The Mail Queue is empty. The domain.com is NOT in /etc/localdomains and is ON the /etc/remotedomains. If i dig MX domain.com, I get the lowest MX record pointing to .pamx1.hotmail.com. as expected. But still no mail in hotmail accounts. And now the weird staff: If i run the php script through shell (root) access, the mail goes to hotmail account. If I create a local mail account (info@domain.com) and log in into it (via domain.com/webmail), I can see the message from the php script! Any help would be great! Thank you in advance.
-
Hello :) Do you notice any difference if you send out a message using SMTP Authentication in your PHP script? Thank you. 0 -
Thanks for the response! Sending with SMTP is not an option at the moment. The site was before working fine from an other server of mine. Since the transfer, the mail() function seems to have that issue. 0 -
Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments