The script "opendmarc-reports" does not handle SMTP errors correctly. The variable "$answer" is not always initialized.
In our setup, the local mail server was not able to send messages to some recipients due to restrictions (relaying not allowed). The error message was not logged as $answer was not initialized. I didn't invest the time to find out why $answer is empty, the patch though seems to work in our scenario. $smtp->message contains the smtp error message.
--- opendmarc-1.3.1.orig/reports/opendmarc-reports 2015-02-23 21:32:25.000000000 +0100
+++ opendmarc-1.3.1/reports/opendmarc-reports 2015-07-07 10:02:21.565155898 +0200
@@ -935,6 +935,9 @@
{
# now perl voodoo:
$answer = ${${*$smtp}{'net_cmd_resp'}}[1];
+ if ( !( defined $answer ) ) {
+ $answer=$smtp->message();
+ }
chomp($answer);
print STDERR "$progname: $smtpstatus report for $domain to $repdest ($answer)\n";
}
simpler:
$answer = ${${*$smtp}{'net_cmd_resp'}}[1] || $smtp->message() || 'unknown error';
Simpler patch applied.
v1.3.2 released.