----- Original Message -----
From: "LuKreme" <krem...@kreme.com>
To: "postfix-users@postfix.org postfix" <postfix-users@postfix.org>
Sent: Wednesday, 4 September, 2013 8:05:58 PM
Subject: Re: Inject email

On 04 Sep 2013, at 10:07 , Phil Daws <ux...@splatnix.net> wrote:
> a little help please.  I have a text file which includes all the headers and 
> MIME entities that I would like to pass through Postfix but for some reason 
> when I am using sendmail -t it appears to completely bypass the HOLD header 
> check I have in place and just gets delivered.  Is it due to running the 
> sendmail command on the actual Postfix server itself ? What would be the best 
> way to send the email through Postfix as I need to test this particular 
> emails content.

How are you checking?

main.cf:
mime_header_checks = pcre:$config_directory/mime_headers.pcre

$ cat /etc/postfix/mim_headers.pcre
/^\s*Content-(Disposition|Type).*name\s*=\s*"?(.*\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|dll|exe|hlp|hta|inf|ins|isp|js|jse|lnk|mdb|mde|mdt|mdw|msc|msi|msp|mst|nws|ops|pcd|pif|prf|reg|scf|scr\??|sct|shb|shs|shm|swf|vb[esx]?|vxd|wsc|wsf|wsh))(\?=)?"?\s*(;|$)/x
 REJECT Attachment name "$2" may not end with ".$3"

That file was last modified in 2004 (to add swf and pif, IIRC). The check 
nearly never hits anymore (It has not hit at all in over a week).

-- 
Actually all I wanted to do was to put an incoming email in the hold queue.  I 
was using, in the header check, /^Received:/ HOLD which works fine when an 
email comes in from an external source.  If I try and inject a complete email 
from the Postfix server itself using sendmail -t < filename.eml it was 
bypassing all checks.  On checking the logfile, and in the man page, it would 
seem the sendmail Postfix program just uses postdrop and places it straight 
into the outbound queue.  I thought locally injected emails would have passed 
through the same checks. Thanks.

Reply via email to