Incoming mail - attaching multiple disclaimers

tux-o-mat

New Member
Apr 23, 2024
7
1
3
Hi!
I am searching for a method to attach more than one disclaimer to a mail. Currently only the last one ist attached.

Example:
Rule1 (weight 50) | Direction in | Disclaimer "this mail is send from external"
Rule2 (weight 49) | Direction in | If Office-File | remove file | Disclaimer "this mail contained an office file which was removed"

Now for mails without the office-attachment, Rule1 is executed fine. Mails with the office-attachment will only get the disclaimer from Rule2.

The log suggests, both rules are executed, but the first disclaimer never makes it into the mail:
Code:
2024-04-23T14:23:05.927923+02:00 mailrelay pmg-smtp-filter[1364]: 3805D16627A8297A54C: added disclaimer (rule: external_sender)
2024-04-23T14:23:05.928186+02:00 mailrelay pmg-smtp-filter[1364]: 3805D16627A8297A54C: added disclaimer (rule: external_sender)
2024-04-23T14:23:05.929721+02:00 mailrelay pmg-smtp-filter[1364]: 3805D16627A8297A54C: removed attachment 5 ('test.docx', rule: unwanted_files)
2024-04-23T14:23:05.930267+02:00 mailrelay pmg-smtp-filter[1364]: 3805D16627A8297A54C: added disclaimer (rule: unwanted_files)
2024-04-23T14:23:05.930545+02:00 mailrelay pmg-smtp-filter[1364]: 3805D16627A8297A54C: added disclaimer (rule: unwanted_files)

Has anyone else had this behaviour?

PMG Version: 8.1.2

thx
 
  • Like
Reactions: SteveSteve
Unfortunately not. We settled for the "from external" Disclaimer as we deemed it the most important one. Yet it is still on the todo list.
 
It's probably a weird workaround, but I also wanted to add multiple disclaimers to messages, and what I ended up doing was "stacking" multiple disclaimers texts into one disclaimer, with a complex ruleset for each combination of possibilities of when I'd want to apply them.

I'm not sure if that exactly makes sense, but instead of thinking both of these things would happen... (like let's say that Disclaimer A talks about external mail, and Disclaimer B talks about mail that's probably spam)

PRIORITY 1 RULES
If message matches rule A, apply disclaimer A
If messages matches rule B, apply disclaimer B

...what I'm doing instead is...

PRIORITY 2 RULES
If message matches rule A, apply disclaimer A
If messages matches rule B, apply disclaimer B

PRIORITY 1 RULES
If message matches rule AB, apply disclaimer AB

...and so on for each possible condition, where that third one (Disclaimer AB) is matching a third rule checking the conditions of both A and B, and contains the disclaimer text of both Disclaimer A and the text of Disclaimer B.
 
Last edited: