[SOLVED] How does Mail Filter Rules work?

zolthar

Active Member
Dec 27, 2020
108
17
38
45
Can I get clarification on how the rules part actually work (ie. not the priority) as I read this section although it does not clarify exactly the workings:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#chapter_mailfilter

What I am referring to is the following example:
1609142674188.png

1609144034397.png

Can someone confirm my logic that rules are "OR" and not "AND"; and therefore the following is a correct statement:
QUARANTINE any email that matches "ANY" OBJECTS (and sub-objects) defined; as opposed to
QUARANTINE any email that matches "ALL" OBJECTS (and sub-objects) defined​

What if I stupidly used "Accept", "Block" and "Quarantine" together - which would take precedence?
 

Attachments

  • 1609143910020.png
    1609143910020.png
    7.3 KB · Views: 20
Roughly it works as follows:
* within In each object group (What, From, To, When) - the entries are matched OR wise
* all object groups must match (i.e. if you set a from and a to object - only the mails going from <from-object> to <to-object> will match)
* actions should all be exectued on a particular rule

What if I stupidly used "Accept", "Block" and "Quarantine" together - which would take precedence?
I usually try those things, by setting up a simple testrule matching a specific sender/recipient configuration and sending a test-mail - that way you get a feeling how the rules work together.

* each action has a (hardcoded) priority (for the 3 mentioned ones it's Accept>Block>Quarantine)
* each action on a matching rule is executed in order of it's priority
* if an action is final (accept, block, quarantine are final) - then processing stops

I hope this explains it!
 
  • Like
Reactions: zolthar