[exim] SMTP message using MIME ACL

Etusivu
Poista viesti
Vastaa
Lähettäjä: HARMEL Patrick
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] SMTP message using MIME ACL
Hi,

I'm running Debian Etch with exim4 v4.63
I'm trying to have File attachment blocking according to extension, with
an explicit SMTP message.

According to Tim Jackson's "Spam and Virus Scanning with Exim 4
mini-Howto" (§6.2.3.2), I tried to have it in the MIME ACL.
So i first configure the use of the MIME ACL :

|MAIL_ACL_CHECK_MIME = acl_check_mime
acl_smtp_mime = MAIL_ACL_CHECK_MIME
|
then i configured the MIME ACL :

|acl_check_mime:

  deny
    condition = ${if match {${lc:$mime_filename}} 
{\N\.\s*(bat|com|exe|pif|prf|scr|vbs)\s*$\N}}
    message = My own message|



Then i send a mail with a .bat attachment.
The work is done, but the reject message my exim server give is
"Administrative prohibition". Here is the reject notification :

This is the Postfix program at host smtp8-g19.free.fr.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

            The Postfix program


<user@mydomain>: host
    smtp.mydomain[xxx.xxx.xxx.xxx] said: 550 Administrative
    prohibition (in reply to end of DATA command)


------------------------------------------------------------------------

Reporting-MTA: dns; smtp8-g19.free.fr
X-Postfix-Queue-ID: 9E67F193B8
X-Postfix-Sender: rfc822; anotheruser@anotherdomain
Arrival-Date: Fri, 11 May 2007 17:24:48 +0200 (CEST)

Final-Recipient: rfc822; user@mydomain
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host smtp.mydomain[xxx.xxx.xxx.xxx] said:
    550 Administrative prohibition (in reply to end of DATA command)



If I do it the way Tim called the old way (§6.2.3.1), without the use
of the MIME ACL, but using the DATA ACL :

| deny

     message = My own message
     demime  = vbs:com:bat:pif:prf:lnk
|
when i make the test again with a .bat attachment, every thing are correct.
Here is the reject notification :


This is the Postfix program at host smtp8-g19.free.fr.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

            The Postfix program


<user@mydomain>: host
    smtp.mydomain[xxx.xxx.xxx.xxx] said: 550 My own message (in reply
    to end of DATA command)


------------------------------------------------------------------------

Reporting-MTA: dns; smtp8-g19.free.fr
X-Postfix-Queue-ID: 36648197D5
X-Postfix-Sender: rfc822; anotheruser@anotherdomain
Arrival-Date: Fri, 11 May 2007 17:37:52 +0200 (CEST)

Final-Recipient: rfc822; user@mydomain
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; host smtp.mydomain[xxx.xxx.xxx.xxx] said:
    550 My own message (in reply to end of DATA command)


Is there a way to give an explicit SMTP reject message using the MIME ACL?

Thanks

Patrick HARMEL