Thomas,

> sending the infected report fails, because the
> postmas...@mailhost1.domain.local smtp envelope sender address is not
> wraped with <>.
> it sends
>   MAIL FROM:postmas...@mailhost1.domain.local
> instead of
>   MAIL FROM:<postmas...@mailhost1.domain.local>
> seems that somewhere msginfo->sender_smtp gets filled without <> around.
> I could not locate where this happens.

> (!)SEND via SMTP: postmas...@mailhost1.domain.local ->
>  <postmas...@mailhost1.domain.local>,...
>   501 5.1.7 Failed, id=28294-01, from MTA([127.0.0.1]:10025):
>   501 5.1.7 Bad sender address syntax
> (28294-01) (!)FAILED to notify admin: 501 5.1.7 Failed, id=28294-01, from
>   MTA([127.0.0.1]:10025): 501 5.1.7 Bad sender address syntax

Thanks, a bug indeed!
(occurs when $mailfrom_notify_admin was not specified in a configuration
file but defaulted to an e-mail address in $hdrfrom_notify_admin)

> i think i found the codepart:

Thanks. Your patch is ok, although I'll probably do it this way:

--- amavisd.orig        2008-12-15 01:50:09.000000000 +0100
+++ amavisd     2009-03-27 18:17:08.000000000 +0100
@@ -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


Mark

------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to