Re: AMaViS-ng 0.1.6.x and postfix: possible open relay and mail loss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi -

As long as the problem is not fixed by the AMaViS-ng maintainers, this patch 
could be helpful.

I took the relevant part from the version 0.1.4.1 source. This patch 
(attachment) applies to 0.1.6.3.

Kind regards,

Phil Cyc
diff -Nru amavis-ng-0.1.6.3.orig/AMAVIS/MTA/Postfix.pm amavis-ng-0.1.6.3.postfix/AMAVIS/MTA/Postfix.pm
--- amavis-ng-0.1.6.3.orig/AMAVIS/MTA/Postfix.pm	Tue Mar 18 00:04:21 2003
+++ amavis-ng-0.1.6.3.postfix/AMAVIS/MTA/Postfix.pm	Tue Apr  8 23:28:09 2003
@@ -112,22 +112,11 @@
 
   writelog($args,LOG_DEBUG, "Called as amavis ".join(' ',@ARGV));
 
-  while (shift @ARGV) {
-    /^-f$/ && next; # ignore "-f"
-    /^-d$/ && next; # ignore "-d"
-    s/^(.*)$/$1/; # untaint sender or recipient
-    if (not defined $$args{'sender'}) {
-      if (/^$/) {
-	$$args{'sender'} = "<>";
-      }
-      else {
-	$$args{'sender'} = $_;
-      }
-    }
-    else {
-      push @{$$args{'recipients'}}, $_;
-    }
-  }
+  shift @ARGV if $ARGV[0] eq "-f";
+  $$args{'sender'} = shift @ARGV;
+  $$args{'sender'} = "<>" if (!$$args{'sender'});
+  shift @ARGV if $ARGV[0] eq "-d";
+  push @{$$args{'recipients'}}, @ARGV;
 
   # Message file has been written, reset file pointer and put it into
   # the record.

[Index of Archives]     [Linux Security]     [Netfilter]     [PHP]     [Yosemite News]     [Linux Kernel]

  Powered by Linux