Nevermind, even if the “limits_exceeded” error shows up in the logs the plugin still works correctly.
I added a new rule to catch recipient’s email in the “plugin.php” file :
$x = strpos($line, 'To:');
if ($x !== false) {
$email = substr($line, $x+3);
$email = str_replace('<', '', $email);
$email = str_replace('>', '', $email);
return trim($email);
}
I know that the string “To:” is maybe too common and that there is a risk of catching the wrong email address but I noticed that a lot of the error messages I received contain only one “To:” followed by the correct recipient address.
Because of the configuration I use, nearly all my error messages are from “MAILER-DAEMON@****.com” so they are kind of similar.