From 80611ddc0e34f6edb4f101ad00057f779fe55be7 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Tue, 5 Nov 2013 17:33:16 +0100 Subject: [PATCH] Imported Upstream version 1.18 --- doc/CHANGELOG | 7 ++++++- sbin/postfwd | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 5168cb7..417f803 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,9 +1,14 @@ +1.18 +===== +- bugfix: Fixed bug when comparing sender and recipient addresses, like + "sender=$$recipient". This affects only postfwd version 1.17. + 1.17 ===== - bugfix: Invalid characters in variable substitutions were not correctly catched when the '=' operator was used, like "client_name=$$helo_name". If you can not upgrade for some reason change your rule to "client_name=~$$helo_name" -- code: Net::DNS internal errors will now be handled gracefully +- code: Net::DNS errors will now be handled gracefully - code: default for options --dns_max_ns_a_lookups and --dns_max_mx_a_lookups of 100 1.16 diff --git a/sbin/postfwd b/sbin/postfwd index acf74be..f294379 100755 --- a/sbin/postfwd +++ b/sbin/postfwd @@ -25,7 +25,7 @@ use vars qw(@ISA); # Program constants our($NAME) = 'postfwd'; -our($VERSION) = '1.17'; +our($VERSION) = '1.18'; # Networking options (use -i, -p and -R to change) our($def_net_pid) = "/var/run/".$NAME.".pid"; @@ -1471,7 +1471,7 @@ sub compare_item { next ITEM unless $val; # substitute check for $$vars in rule item if ( $var = devar_item ($cmp,$val,$myitem,%request) ) { - $val = $var; $val =~ s/([^-_\.\w\s])/\\$1/g; + $val = $var; $val =~ s/([^-_@\.\w\s])/\\$1/g unless ($cmp eq '=='); }; $myresult = &{$postfwd_compare{$postfwd_compare_proc}}($cmp,$val,$myitem,%request); mylogs $syslog_priority, "match $mykey: ".($myresult ? "TRUE" : "FALSE") if ($opt_verbose > 1);