Hi,
Hopefully someone on this list can help me out. I am trying to set up
mime-header checking to only allow through emails with a particular file
extension, that is I want to block any email without this attachment type or
any other attachment type.
I have created the map file with postmap and it picks up my regexp ok, when I
send emails through and look in the mail log though it warns on all emails and
it also appears to be matching on other lines in the header such as
Content-Transfer-Encoding, below are the regexp's I have tried and also the
extract from my mail log.
I would be grateful if anybody is able to offer some assistance.
mime_header_checks
#!/^\s*Content-(Disposition|Type).*name\s*=\s*"{1,1}.+\.(ecf)"{1,1}\s*$/!/name=[^>]*\.(ecf)/
WARN Would normally reject this message
#!/^[[:space:]]*content-(type|disposition):.*name[[:space:]]*=.*\.(ecf)/
# WARN Bad attachment file name extension
/var/log/maillog extract
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499:
message-id=<494c599007dda542a4811051b82e39da540a7f6...@nhs-pcli-mbc015.ad1.nhs.net>
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
Content-Type:
multipart/alternative;??boundary="_000_494C599007DDA542A4811051B82E39DA540A7F603DNHSPCLIMBC015_"
from unknown[xx.xx.xx.xx]; from=<[email protected]> to=<[email protected]>
proto=SMTP helo=<relay.xx.uk>: Would normally reject this message
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
MIME-Version: 1.0 from unknown[xx.xx.xx.xx]; from=<[email protected]>
to=<[email protected]> proto=SMTP helo=<relay.xx.uk>: Would normally reject this
message
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
Content-Type: text/plain; charset="us-ascii" from unknown[xx.xx.xx.xx];
from=<[email protected]> to=<[email protected]> proto=SMTP helo=<relay.xx.uk>: Would
normally reject this message
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
Content-Transfer-Encoding: quoted-printable from unknown[xx.xx.xx.xx];
from=<[email protected]> to=<[email protected]> proto=SMTP helo=<relay.xx.uk>: Would
normally reject this message
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
Content-Type: text/html; charset="us-ascii" from unknown[xx.xx.xx.xx];
from=<[email protected]> to=<[email protected]> proto=SMTP helo=<relay.xx.uk>: Would
normally reject this message
Jun 8 11:46:57 hriapp1 postfix/cleanup[10213]: 5CB123D8499: warning: header
Content-Transfer-Encoding: quoted-printable from unknown[xx.xx.xx.xx];
from=<[email protected]> to=<[email protected]> proto=SMTP helo=<relay.xx.uk>: Would
normally reject this message
Thanks,
Paul
********************************************************************************************************************
This message may contain confidential information. If you are not the intended
recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take
any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.
Thank you for your co-operation.
NHSmail is the secure email and directory service available for all NHS staff
in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information
with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be
accessed anywhere
For more information and to find out how you can switch, visit
www.connectingforhealth.nhs.uk/nhsmail
********************************************************************************************************************