Topic: How to block extensions with Amavisd-new?
Hello all hope I'm not breaking any rules or posting this in the wrong area.
my Linux is 32bit CentOS 5.2
I installed and followed the guide: iRedMail-0.5.0.tar.bz2 2009-08-16. Works on RHEL / CentOS / Debian / Ubuntu.
My problem is the following:
installed and loved this one server solution for email, so I came across disability (perhaps because it is my beginner) to block certain extensions of attachments, eg mp3, avi, mpg, etc..
as did the documentation of amavisd-new:
@
qr '. \. (exe | vbs | pif | scr | cpl | mp3) $' i, # banned extension - basic
@
and already includes the end of the file "/ etc / amavisd.conf" the following line:
@
$ banned_filename_re new_RE = (
qr '. \. (bat | exe | scr | mp3) $' i,
qr '. ^ \. (exe | zip | lha | tnef | mp3) $' i,
);
@
So well that even when I send an e-mail with an attachment I get the mp3 file normally in another account.
When I look at "/ var / log / maillog" I see that it delivers the message with the following log:
@
[root @ mail ~] # tail-f / var / log / maillog | grep mymail@mydomain
Feb 23 17:46:32 mail postfix / qmgr [2770]: 87E8F500044: <mymail@mydomain > from =, size = 9653650, nrcpt = 1 (queue active)
Feb 23 17:46:41 mail amavis [2720]: (02720-01) Passed BANNED (audio / mpeg,. Dat, dragonforce-through_the_fire_and_flames.mp3), LOCAL [192.168.0.101] [192.168.0.101] <@ mymail@mydomain > -> <mymail@mydomain >, quarantine: banned-D4ubTm8CJu44, Message-ID: <00d601cab4c9 $ 46c78ef0 $ d456acd0 ind.br $ @>, mail_id: D4ubTm8CJu44, Hits: -, size: 9653650, queued_as: E84DD500051, 8744 ms
Feb 23 17:46:41 mail postfix / smtp [3171]: 87E8F500044: <mymail@mydomain > to =, relay = 127.0.0.1 [127.0.0.1]: 10024, delay = 12, delays = 3.6 / 0.06/0.08/8.7, dsn = 2.0.0, status = sent (250 2.0.0 Ok, id = 02720-01, from MTA ([127.0.0.1]: 10025): 250 2.0.0 Ok: queued as E84DD500051)
Feb 23 17:46:41 mail postfix / qmgr [2770]: E84DD500051: <mymail@mydomain > from =, size = 9654693, nrcpt = 1 (queue active)
Feb 23 17:46:43 mail postfix / pipe [3176]: E84DD500051: <mymail@mydomain > to =, relay = dovecot, delay = 3.1, delays = 1.9/0.05/0/1.1, dsn = 2.0 .0, status = sent (delivered via dovecot service)
@
I apologize for the broken English, the more I am Brazilian, I hope you help me with this doubt.
I thank you.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.