On Mon, Jun 02, 2014 at 12:22:14AM +0300, Inteq Solution - Dep. Tehnic wrote:

> I admit, I am not a guru in Postfix but I am trying.
> I do not understand where the confusion is?

The patterns in header_checks need to be identical to the patterns
in mime_header_checks.  Usually, one simply has:

        header_checks = ...
        mime_header_checks = $header_checks

Then you get consistent processing for attached files whether they are the
message body or a component of a multipart.

Once you're using a single pattern for both cases, you can begin
tuning it for blocking exactly what you want to block.

> Using both my examples (mime_header_checks and header_checks), my executable
> (.bat) is blocked when I send a test email from Outlook with the correct
> REJECT text.
> But, when testing from emailsecuritycheck.net, I receive the .bat
> attachment.
> I double checked for inbound whitelisting also.

You need to post and test with the headers and MIME headers of the
original MIME source they sent you.  Save the message into a maildir
mailbox, and look at how they encoded they attachment.

Note, header_checks is not a full MIME parser, some attachments encoded
in complex ways will get through.  You need a MIME parser with policy
to do the job more completely.

-- 
        Viktor.

Reply via email to