Block unencrypted messages

Mark Sapiro mark at msapiro.net
Sat Apr 30 16:54:57 IST 2011


On 11:59 AM, Ralf Bardoel wrote:
> 
> First of all I want to say I love your product and I hope you’ll all
> keep up the good work! I have a small problem. I want to block
> unencrypted email messages passing my mail gateway, but instead of
> blocking unencrypted messages all the messages are blocked. The maillog
> shows the following information:
> 
> Apr 29 14:39:03 AAA MailScanner[16925]: Content Checks: Detected and
> blocked unencrypted message in p3TFd2TS016946
> Apr 29 14:39:03 AAA MailScanner[16925]: Content Checks: Found 1 problems
> Apr 29 14:39:03 AAA MailScanner[16925]: Uninfected: Delivered 1 messages
> Apr 29 14:39:03 AAA MailScanner[16925]: Deleted 1 messages from
> processing-database
> 
> These lines show the rejection of an encrypted message. Is this a known
> bug or can I debug this check somewhere? Thank you in advance!


Look at a raw "encrypted" message.

The code (sub EncryptionStatus in module
/usr/lib/MailScanner/MailScanner/SweepContent.pm) seems very
straightforward.

It looks at the Content-Type: of the message and all its sub-parts for a
match on the pattern /\/encrypted/i. If any header matches, it says the
message is encrypted, otherwise not.

Thus, it seems that your encrypted messages do not contain any

Content-Type: multipart/encrypted

or similar headers.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the MailScanner mailing list