1

Topic: PDF Blocked

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

I send one file in attachment (tar.gz) with PDF inside and i have this message in logs :

Sep 12 09:48:10 amavis[28721]: (28721-04) Blocked BANNED (.pdf,Banque LCL/COMPTECOURANT_20180604.pdf) {NoBounceInternal}
, ORIGINATING LOCAL [81.xx.xx.xx]:56454 [81.xx.xx.xx] <alexandre@mydomain.fr> -> <comptable@domaine.com>, Queue-ID: 4AFCF2A7, Message-ID: <15
36738489.14005.3.camel@mydomain.fr>, mail_id: 8k3Ph1pdFa-4, Hits: -, size: 734870, 787 ms

Why Amavis blocked PDF file ? How can i check this configuration ?

Thank you,

Alex

----

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

2

Re: PDF Blocked

Ange7 wrote:

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello,

I send one file in attachment (tar.gz) with PDF inside and i have this message in logs :

Sep 12 09:48:10 amavis[28721]: (28721-04) Blocked BANNED (.pdf,Banque LCL/COMPTECOURANT_20180604.pdf) {NoBounceInternal}
, ORIGINATING LOCAL [81.xx.xx.xx]:56454 [81.xx.xx.xx] <alexandre@mydomain.fr> -> <comptable@domaine.com>, Queue-ID: 4AFCF2A7, Message-ID: <15
36738489.14005.3.camel@mydomain.fr>, mail_id: 8k3Ph1pdFa-4, Hits: -, size: 734870, 787 ms

Why Amavis blocked PDF file ? How can i check this configuration ?

Thank you,

Alex

reference for you  https://forum.iredmail.org/topic10356-i … mails.html

3

Re: PDF Blocked

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
    originating => 1,  # declare that mail was submitted by our smtp client
    allow_disclaimers => 1,  # enables disclaimer insertion if available

    # notify administrator of locally originating malware
    virus_admin_maps => ["root\@$mydomain"],
    spam_admin_maps  => [],
    bad_header_admin_maps => [],
    banned_admin_maps => ["root\@$mydomain"],
    warnbadhsender   => 0,
    warnbannedsender => 0,

    # forward to a smtpd service providing DKIM signing service
    # forward_method => 'smtp:[amavis]:10027',
    # force MTA conversion to 7-bit (e.g. before DKIM signing)
    smtpd_discard_ehlo_keywords => ['8BITMIME'],
    #bypass_banned_checks_maps => [1],  # allow sending any file names and types
    terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};

it seems i miss the block :

# Block attachments
    banned_namepath_re => new_RE(
      # allow JPG, PNG
        [qr'T=(jpg|png)'xmi => 0],
      # Block Office Documents
        qr'T=(doc|docx|xls|xlsx|pdf)'xmi,
    ),

But i don't want block anything...

4

Re: PDF Blocked

Just remove 'pdf' in the block setting in Amavisd config file, then restart amavisd service.

5

Re: PDF Blocked

Which block setting ?

root! :/etc/amavis/conf.d# grep -R "pdf"
0 result.

i don't have any «terms» of PDF in configuration.

6

Re: PDF Blocked

Could you try to turn on debug mode in Amavisd and try again? It should log the ban rule in log file.

7 (edited by Ange7 2018-09-18 15:13:44)

Re: PDF Blocked

ZhangHuangbin wrote:

Could you try to turn on debug mode in Amavisd and try again? It should log the ban rule in log file.

Here : https://pastebin.com/MUgHhZPT

it's a tar.gz file with PDF inside

8

Re: PDF Blocked

Sep 18 09:01:22 myserver amavis[32248]: (32248-01) p.path BANNED:DISCARD ar@my-domain.com: "P=p004,L=1,M=multipart/mixed | P=p003,L=1/2,M=application/gzip,T=gz,N=documents_comptable.tar.gz | P=p006,L=1/2/1,T=tar,N=documents_comptable.tar | P=p018,L=1/2/1/12,N=Banque LCL,A=D", matching_key="(?^mix:T=(rar|arc|arj|zoo|gz|bz2)(,|\t))"

Seems it's blocked due to 'gz'.

9

Re: PDF Blocked

Thank you.

ZhangHuangbin wrote:

Sep 18 09:01:22 myserver amavis[32248]: (32248-01) p.path BANNED:DISCARD ar@my-domain.com: "P=p004,L=1,M=multipart/mixed | P=p003,L=1/2,M=application/gzip,T=gz,N=documents_comptable.tar.gz | P=p006,L=1/2/1,T=tar,N=documents_comptable.tar | P=p018,L=1/2/1/12,N=Banque LCL,A=D", matching_key="(?^mix:T=(rar|arc|arj|zoo|gz|bz2)(,|\t))"

Seems it's blocked due to 'gz'.