[SOLVED] Bypassing Antispam/Antivirus for one user

Ask questions about your setup or get help installing ZCS server (ZD section below).
Post Reply
tenchimuyou
Posts: 4
Joined: Fri Sep 12, 2014 11:25 pm

[SOLVED] Bypassing Antispam/Antivirus for one user

Post by tenchimuyou »

Hello,
I need to turn off antispam for a specific user (If possible just the antispam, but as I need to solve this matter with urgency, I'm accepting a temporary solution with some way to turn off both, as long it works per-user). There is some easy way to archieve it?
Thanks in advance.
dwmtractor
Outstanding Member
Outstanding Member
Posts: 993
Joined: Fri Sep 12, 2014 10:41 pm

[SOLVED] Bypassing Antispam/Antivirus for one user

Post by dwmtractor »

You might check out this wiki section which allows per-user whitelisting. I believe that the instructions on "spamlover accounts" would accomplish your goal.
tenchimuyou
Posts: 4
Joined: Fri Sep 12, 2014 11:25 pm

[SOLVED] Bypassing Antispam/Antivirus for one user

Post by tenchimuyou »

Thanks for the answer, but I think this won't help me much.
Let me explain it better:
My client send a newsletter (spam), and of course there are lots of bounces. All these bounces goes through amavis and because of that the server is under strong stress (Yesterday my queue had 24k messages). I need to completely disable the antispam for it. This solutions lowers the score, but the message is still processed by spamassassin, what takes a good load of cpu. On normal postfix+amavis setup i would use @bypass_spam_checks, but apparently its not working. I've checked the amavisd version that comes with zimbra and maybe something like bypass_spam_checks_maps? How can I configure it?
Thanks!
tenchimuyou
Posts: 4
Joined: Fri Sep 12, 2014 11:25 pm

[SOLVED] Bypassing Antispam/Antivirus for one user

Post by tenchimuyou »

Ok! Found a solution:
Actually i found this wiki page.
Although the solution is IP-based I changed it to a user-based with some little tweaks:
On postfix_recipient_restrictions:

check_recipient_access pcre:/opt/zimbra/postfix/conf/no_filter
On /opt/zimbra/postfix/conf/no_filter

/^user@domain.com$/ FILTER smtp:[127.0.0.1]:10026
On /opt/zimbra/conf/amavisd.conf.in

$inet_socket_port = [10024, 10026]; # change from original setting

$interface_policy{'10026'} = 'DOMAINWHITELIST';

$policy_bank{'DOMAINWHITELIST'} = {

bypass_spam_checks_maps => [1],

final_spam_destiny => D_PASS,

};
Then restarted amavis and postfix.
Now its works.
Thanks!
dwmtractor
Outstanding Member
Outstanding Member
Posts: 993
Joined: Fri Sep 12, 2014 10:41 pm

[SOLVED] Bypassing Antispam/Antivirus for one user

Post by dwmtractor »

[quote user="tenchimuyou"]Ok! Found a solution

Now its works. [/quote]

Great! I'll mark this thread solved.
Meanwhile, remember that any changes you make to ANY of the config files will be wiped out every time you do an upgrade, so be prepared to back up and restore them whenever you do one. Since other (necessary) changes might also be made in later versions, it's probably wiser to plan to re-edit the new files on an upgraded version rather than to backup and restore the same old file.
Post Reply