Stopping messages without To: or Cc: header(s)

Jules Field MailScanner at
Sun Nov 22 12:18:12 GMT 2009

You can do this with a simple SpamAssassin rule to pick up the 
"undisclosed-recipients" in the "To" header. Assign it a score of just 
off zero (so it gets executed). Then use a "SpamAssassin Rule Actions" 
setting to delete any messages hitting this rule.

Dead easy :-)


On 20/11/2009 19:16, Hugo van der Kooij wrote:
> Hi,
> I want to stop messages without a To: or Cc: header. Postfix will 
> translate them to:
> To: undisclosed-recipients:;
> In the postfix cleanup(8) manual page I found this:
>        undisclosed_recipients_header   (To:   undisclosed-recipi-
>        ents:;)
>               Message  header  that the Postfix cleanup(8) server
>               inserts when a message contains no To: or Cc:  mes-
>               sage header.
> I would prefer to kill them at postfix entry before they even get 
> accepted. But if this is not possible I would like to kill them in 
> MailScanner as high scoring spam.
> Any suggestion?
> Hugo.


Julian Field MEng CITP CEng
Buy the MailScanner book at

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at and

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

More information about the MailScanner mailing list