--- amavisd.original 2009-03-27 15:05:46.000000000 -0600 +++ amavisd 2009-03-27 15:13:58.000000000 -0600 @@ -12489,10 +12489,10 @@ $hdrfrom_admin = expand_variables($hdrfrom_admin); my($mailfrom_admin_q); - if (defined $mailfrom_admin) { - $mailfrom_admin_q = qquote_rfc2821_local($mailfrom_admin); - } else { # defaults to email address in hdrfrom_notify_admin + if (!defined($mailfrom_admin)) { + # defaults to email address in hdrfrom_notify_admin $mailfrom_admin_q = (parse_address_list($hdrfrom_admin))[0]; $mailfrom_admin = unquote_rfc2821_local($mailfrom_admin_q); } + $mailfrom_admin_q = qquote_rfc2821_local($mailfrom_admin); my($notification) = Amavis::In::Message->new; $notification->rx_time($msginfo->rx_time); # copy the reception time