Skip to Content.
Sympa Menu

en - [sympa-users] Need help creating an attachment rejecting scenario

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Sven Hartge <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] Need help creating an attachment rejecting scenario
  • Date: Wed, 12 Jan 2022 14:27:05 +0100

Hello .*,

Using Sympa-6.2.66 (latest stable at time of writing) I want to create a scenario for a newsletter mailinglist that should do the following:

1) rejects any mail with file attachments (i.e. office documents, PDF, PNG, JPG, etec.)
2) sends all non-attachment containing mails to the editors ("editorkey).

The reason for rejecting mails with attachments before sending them to the editors is that frankly, we do not trust the mostly non-technical editors to catch a mail with a file attachment before clicking the "propagate" button.

It looks like this:

---------8<------------
title.gettext THM Newsletter

match([header->Content-Disposition],/attachment/) smtp,dkim,md5,smime -> reject(reason='send_multipart')
match([header->Content-Type],/multipart\/mixed/) smtp,dkim,md5,smime -> reject(reason='send_multipar')
true() smtp,dkim,smime,md5 -> editorkey
---------8<------------

And this works but for one case: If the mail has an S/MIME signature, then even mails with attachments are passed to the editors.

I now have bonked my head against this for two days, looked at log_level=3 debug outout but I cannot find a way to make this work for signed mails.

To me it looks like a bug where the MIME structure is not unraveled far enough to find the Content-Type or Content-Disposition headers in the deeper levels.

Mit freundlichen Grüßen,
Sven Hartge

--
Dipl.-Inform. (FH) Sven Hartge
Technische Hochschule Mittelhessen
- University of Applied Sciences -
IT-Services Bereich Gießen
Server-, Dienst- und Netz-Administration

Postanschrift: Wiesenstraße 14, 35390 Gießen
Tel.: +49 641 309-1291
Fax: +49 641 309-1288
Web: www.its.thm.de, E-Mail: address@concealed


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page