1 (edited by nicolasfo 2017-04-13 15:36:09)

Topic: [SOLVED] Bypass mail address Amavis

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.6
- Linux/BSD distribution name and version: Debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? YES
- Related log if you're reporting an issue:
====
Hello,
I use a software to backup data on a LTO.
The software sends an email at the end of the backup with a log in attachement.
The mail seems to be blocked by amavis, here's the log :

Apr  9 14:09:00 mx amavis[647]: (00647-02) Blocked BANNED (.asc,TapeBackup20.log) {NoBounceInternal}, ORIGINATING/MYNETS LOCAL [192.168.xxx.xxx]:61308 <xxx@mydomain.fr> -> <me@mydomain.fr>, Queue-ID: A53804007F, mail_id: 7KSxVc3fyq8O, Hits: -, size: 57809, 242 ms

Is there a way to whitelist or bypass xxx@mydomain.fr in Amavis ?
Thanks in advance

Nicolas

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: [SOLVED] Bypass mail address Amavis

Which type of attachment was attached to the notification email? Seems "TapeBackup20.log" is the log file name, but is this log file compressed in e.g. zip, bz2, gz format?

Try to open Amavisd config file, find lines below:

$banned_namepath_re = new_RE(
    [qr'T=(rar|arc|arj|zoo|gz|bz2)(,|\t)'xmi => 'DISCARD'],     # Compressed file types
    ...

Comment out the second line, restart Amavisd service, then this issue should be solved.

3

Re: [SOLVED] Bypass mail address Amavis

To solve thos problem, here's what I done :
I created a file /etc/amavis/whitelist containing the incriminated mail address.
In /etc/amavis/50-user.conf, nearly the line 87, I added :

read_hash(\%whitelist_sender, '/etc/amavis/whitelist');
@whitelist_sender_maps = (\%whitelist_sender);
$interface_policy{'10026'} = 'VIRUSONLY';
$policy_bank{'VIRUSONLY'} = { # mail from the pickup daemon
 bypass_spam_checks_maps => ['@whitelist_sender_maps'], # don't spam-check this mail
 bypass_banned_checks_maps => ['@whitelist_sender_maps'], # don't banned-check this mail
 bypass_header_checks_maps => ['@whitelist_sender_maps'], # don't header-check this mail
};

With this solution, only email address contained in /etc/amavis/whitelist is able to do a bypass. It resolved my problem.

Thanks

Nicolas

4

Re: [SOLVED] Bypass mail address Amavis

Although it works for you, but bypass the file type might be better solution.