How to block messages without MESSAGE-ID header
If you would like to reject messages without some headers you cannot use built-in header_checks content inspection, because it scans one header at a time and does not save state between headers. Making it impossible to detect missing headers.
You need to use a 3rd party tool called MSH Traffic Policy. It is an email management system that allows you to set server-side rules for automatic content control and flow administration. The application works as an external standalone mail filtering plug-in that integrates with MTA through the milter API.
Block an email message
In this scenario, we will discard the message using the Block Message action. You could also notify the sender with a text reply or temporarily reject the message. See the image below for how the options were set.
Detect missing message header
To test a message for a header that is not present, use the Message Header condition. It has the ability to scan through a message and detect missing headers. Select the not have Header option and enter message-id in the Header name field.
What else…
MSH Traffic Policy has many features you will love:
- take control over your mail flow
- block unwanted spam
- check messages for sensitive content (credit cards numbers etc.)
- limit number of recipients, attachments, message size, number of sent messages
- manage attachments (add, remove, strip, compress)
- modify message headers, sender and recipients
- send new and forward emails to another mailbox
- create server side auto replies
To learn more visit MSH Traffic Policy website.