On 2015-08-18 18:51, [email protected] wrote:
>
> Even more useful than checking the Subject, I use header_checks to check
> some properties on attachments. In fact, I've picked Wietse's example on
> the header_checks (5) man page [1] and tuned it to my needs. This allows
> one to reject mails based on attachment patterns.
> 
> [1] http://www.postfix.org/header_checks.5.html
>

Do I need to check both Content-(Type|Disposition) ?

from what I can see, an attachment is always identified by its filename,
as in:

Content-Disposition: attachment;
        filename="bla_bla.docx"; size=168097;
        creation-date="Tue, 02 Dec 2014 13:26:29 GMT";
        modification-date="Tue, 02 Dec 2014 13:26:29 GMT"

If I wanted to reject all doc|docx attachments, can I use this simpler
rule ?

/^Content-Disposition: .*filename=".*\.(doc|docx)"/ REJECT Attachment
rejected

or will some attachments slip through ?

Reply via email to