2012-07-20, 06:23 PM
A few days ago I updated exim to version 4.80 on my CentOS server and since then mails won't get sent anymore:
The mail server does not understand the MAIL FROM command. Reason: 220 domain.com ESMTP Exim 4.80 Fri, 20 Jul 2012 20:20:29 +0200
The mail server is not ready, it did not respond with a 220 status message.
The first message says something about the FROM command, and receiving a 220 message, the second complains about no 220 message even though it did come in.
Any ideas?
Quick and dirty fix that works:
smtp.php
The mail server does not understand the MAIL FROM command. Reason: 220 domain.com ESMTP Exim 4.80 Fri, 20 Jul 2012 20:20:29 +0200
The mail server is not ready, it did not respond with a 220 status message.
The first message says something about the FROM command, and receiving a 220 message, the second complains about no 220 message even though it did come in.
Any ideas?
Quick and dirty fix that works:
smtp.php
/**
* Fetch data from the SMTP server.
*
* @return string The data from the SMTP server
*/
function get_data($retries = 0)
{
$string = '';
while((($line = fgets($this->connection, 515)) !== false))
{
$string .= $line;
if(substr($line, 3, 1) == ' ')
{
break;
}
}
if (strlen(trim($string)) == 0) {
if ($retries == 3) {
$this->fatal_error("Getting data failed after 4 attempts.");
return false;
}
return $this->get_data($retries + 1);
}
$this->data = $string;
$this->code = substr(trim($this->data), 0, 3);
return $string;
}