Amavis bypass check maps

Hello,
i need to bypass virus and spam Checks for some mail accounts.
I have mailboxes for contentfilter and mailbackup which should not be filtered because filtering is already done by our Mailgateway and i don´t want modified headers for this accounts.
normally i would do this this way to bypass both, spam and virus checks:

@bypass_spam_checks_maps  = ( ['spam.collector@domain.at', 'mail.backup@domain.at'],);  # controls running of anti-spam code

@bypass_virus_checks_maps
    = @bypass_banned_checks_maps
    = @bypass_header_checks_maps
    = @banned_files_lovers_maps
    = @virus_lovers_maps
    = @spam_lovers_maps
    = @bypass_spam_checks_maps;

Univention/ Debian has split config files where i can find in /etc/amavis/conf.d/15-content_filter_mode (created by univention template):

@bypass_virus_checks_maps = (
   \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);

My Question is how to fill one of these variables the “Univention-Way”(preferably via Registry) without changing the Template.

Thank you

Hi Matthias,

unfortunately there is no “Univention-Way” via UCR for this settings.
But amavis is highly multi-config capable :grin: so you just can create a new config file with your settings under /etc/amavis/conf.d/. Just name your file like 99-myconfig. This file will be loaded as last, so you can override all previous settings.

99-myconfig:

@bypass_spam_checks_maps  = ( ['spam.collector@domain.at', 'mail.backup@domain.at'],);  # controls running of anti-spam code

@bypass_virus_checks_maps
    = @bypass_banned_checks_maps
    = @bypass_header_checks_maps
    = @banned_files_lovers_maps
    = @virus_lovers_maps
    = @spam_lovers_maps
    = @bypass_spam_checks_maps;

Regards Tobi

1 Like
Mastodon