Commit e36a2052 authored by Dmitry Popov's avatar Dmitry Popov
Browse files

Exim's new bounce text handling, issue #448

parent 42f130cf
......@@ -1287,8 +1287,8 @@ sub _anabounce {
## Rapport Exim paragraphe suivant
} elsif (
/^A message that you sent could not be delivered to all of its recipients/m
or /^The following address\(es\) failed:/m) {
/^A message that you sent could not be delivered to (all|one or more) of its/m
or /(^|permanent error. )The following address\(es\) failed:/m) {
$exim = 1;
......@@ -1302,6 +1302,15 @@ sub _anabounce {
$info{$1}{error} = $2;
$type = 24;
} elsif (/^\s*(\S+)\n+\s*(.*)$/m) {
my ($exim_user, $exim_msg) = ($1, $2);
if ($exim_msg =~ /MTP error.*: \d\d\d (\d\.\d\.\d) \w/i) {
$info{$exim_user}{error} = $1;
} elsif ($exim_msg =~ /MTP error.*: (\d)\d\d \w/i) {
$info{$exim_user}{error} = ($1 eq "5")?"5.1.1":"4.2.2";
}
$type = 24;
} elsif (/^\s*(\S+)$/m) {
$info{$1}{error} = "";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment