Created
December 20, 2016 09:24
-
-
Save st63jun/e2fd3d7597ef16f4c6b31f76d5112a72 to your computer and use it in GitHub Desktop.
AMaViS virus sender whitelisting hack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/sbin/amavisd.orig 2016-12-20 17:47:33.587273253 +0900 | |
+++ /usr/sbin/amavisd 2016-12-20 18:18:18.257693185 +0900 | |
@@ -13926,7 +13926,8 @@ | |
$r->recip_is_local($is_local ? 1 : 0); # canonical boolean, untainted | |
if (!defined($r->bypass_virus_checks)) { | |
my $bypassed_v = lookup2(0,$recip, ca('bypass_virus_checks_maps')); | |
- $r->bypass_virus_checks($bypassed_v); | |
+ my $whitelisted_v = lookup2(0,$sender, ca('whitelist_sender_maps')); | |
+ $r->bypass_virus_checks($whitelisted_v || $bypassed_v); | |
} | |
if (!defined($r->bypass_banned_checks)) { | |
my $bypassed_b = lookup2(0,$recip, ca('bypass_banned_checks_maps')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested on amavisd-new-2.10.1-4.el7