ZMailer urgent patch

Mariano Absatz el.baby at GMAIL.COM
Mon Jul 26 15:33:10 IST 2004


Hi Julian,

this one I thought I had sent it to you but apparently not...

Two lines must be changed in MailScanner/lib/ZMailer.pm to correct a
problem with the address parser in the ZMailer envelope.

Here's the patch for the current 4.32.3 version:


--- ZMailer.pm.ori      Mon Jul 26 11:25:49 2004
+++ ZMailer.pm  Mon Jul 26 11:26:56 2004
@@ -567,11 +567,11 @@
   my $this = shift;
   my($message, $user) = @_;

-  my $userre=$user ? qr/.*\b$user\b/ : qr //;
+  my $userre=$user ?
qr/(:?.*RCPT=rfc822;|\s*<?)$user(:?\s+.*|>?\s*)/i : qr /.*/;
   my($linenum);
   for ($linenum=0; $linenum<@{$message->{metadata}}; $linenum++) {
     # Looking for "recipient" lines
-    next unless $message->{metadata}[$linenum] =~ /^to(:?dsn)?\s$userre/;
+    next unless $message->{metadata}[$linenum] =~ /^to(:?dsn)?\s$userre/i;
     # Have found the right line
     splice(@{$message->{metadata}}, $linenum, 1);
     $linenum--; # Study the same line again


Regards

--
Mariano Absatz - El Baby
el (dot) baby (AT) gmail (dot) com
el (punto) baby (ARROBA:@) gmail (punto) com

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html



More information about the MailScanner mailing list