1

I have a Debian server running PHP and Exim4 (among other things of course). The PHP application is sending 1000s of emails every day all of which work fine, however I now have a new customer and my PHP/Exim4 has trouble sending to this account.

PS I added the --at-- to stop crawlers finding the addresses.

  1. I checked the exim4 logs and found this:
2014-04-02 08:48:10 1WV7TW-0001Em-Od <= support --at-- sobs.com.au H=localhost [127.0.0.1] P=esmtp S=1215 
2014-04-02 08:48:11 1WV7TW-0001Em-Od ** az --at-- mentonegrammmar: Unrouteable address 
2014-04-02 08:48:11 1WV7TW-0001Em-Od Completed
  1. I then checked the routing in exim4 using:
# exim -bt az --at-- mentonegrammar
R: dnslookup for az --at-- mentonegrammar
az --at-- mentonegrammar
router = dnslookup, transport = remote_smtp
host mail.mentonegrammar [58.96.103.231] MX=5

This looks as though the routing is working perfectly. I tried the application email again and still get the Unrouteable address error.

  1. Then I tried a command line email from the same server.

    echo "Test message" | mail -s "Test message" az --at-- mentonegrammar
    

This email worked and arrived as required, but the email from my PHP application still fails.

  1. I checked the application:
$mime = new Mail_mime();
$mime->setHTMLBody($body);
$content = $mime->get(array('html_charset' => 'utf-8'));
$formattedHeaders = $mime->headers($headers);
$smtp = Mail::factory("smtp", array());
$result = $smtp->send($headers["To"], $formattedHeaders, $content);
  1. As mentioned there are 1000s of emails being successfully sent by this server and application.

  2. The IT at Mentone Grammar haven't indicated any problems receiving any other emails.

In summary, I keep coming back to the 'Unrouteable address' error in the exim4 log, and the debug output indicating that the address is routable. I can't help thinking there is some problem with the Exim4 config, yet only when getting the mail request from a PHP application, is it a security thing - I just don't know.

Can anybody point me in the right direction please?

1 Answer 1

2

I am not sure, maybe a typo, but in one case you have three mmm (see exim4 logs) and in the other you have two mm (see your routing test and your echo test) in the domain name :

mentonegrammmar.net (does not exist)

mentonegrammar.net (exists)

Double-check for the correct domain name within your PHP application.

1
  • Thank you so much! This was exactly the problem... and my browser kept remembering the incorrect entry and auto-filling the field without me noticing. Apr 2, 2014 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .