On Wed, Sep 17, 2014 at 01:24:27AM +0200, li...@rhsoft.net wrote: > I still don't understand why "postmap" has a result but with > postfix Viktors rule don't catch the attachment and so finally > my one from the initial posting two lines below triggers
The live configuration must differ from the test configuration, or your test is flawed. Submit mail with sendmail(1): ( printf 'From: %s\n' "$(id -nu)" printf 'To: %s\n' "$(id -nu)" printf 'Subject: test %d\n' "$(date +%s)" printf 'MIME-Version: 1.0\n' printf 'Content-Type: application/octet-stream;\n' printf ' name=test.exe; charset=us-ascii\n' printf '\n' printf 'Hi there.\n' ) | /usr/sbin/sendmail -it Likewise: ( printf 'From: %s\n' "$(id -nu)" printf 'To: %s\n' "$(id -nu)" printf 'Subject: test %d\n' "$(date +%s)" printf 'MIME-Version: 1.0\n' printf 'Content-Type: application/octet-stream;\n' printf ' name=test.exe; charset=us-ascii\n' printf '\n' printf 'Hi there.\n' ) | postmap -h -q - $(postconf -hx mime_header_checks) Compare mail logs with command-line output. If not the same, something in your configuration is causing a different set of rules to be used. Perhaps you've multiple cleanup instances (different cleanup for submission). -- Viktor.