Content filter for mailing lists
-
We need to use the content filter rules to prohibit the delivery of emails from mail addresses that do not belong to our mail domains (example.com , example.org ), up to some mailing lists (for example, all@example.com ). At the moment, we have used the following type of rules:
[Rule 005]Rule Name=Alluid={d06f1798-42a4-459a-9447-235f1f90449c}Enable=YesThis Rule Condition=AllProcessQueue=BOTHCondition01=TO|contains|AND|all@example.com|Condition02=FROM|does not contain|AND|example|Action 01=move to public folders|"Bayesian Learning/Spam"With this rule, we have moved emails from email addresses that do not contain a string with the name of our mail domain and must be delivered to mail lists. We are faced with the fact that this rule may not work.
Mon 2024-07-15 21:20:31.526: [49255345] <-- MAIL FROM:<filosofia@faculdadecatolicadaparaiba.edu.br> SIZE=20081 BODY=7BIT
Mon 2024-07-15 21:20:31.526: [49255345] Performing PTR lookup (148.119.12.177.IN-ADDR.ARPA)
Mon 2024-07-15 21:20:31.527: [49255345] * D=148.119.12.177.IN-ADDR.ARPA TTL=(1403) PTR=[faculdadecatolicadaparaiba.edu.br]
Mon 2024-07-15 21:20:31.527: [49255345] * D=faculdadecatolicadaparaiba.edu.br TTL=(17) A=[177.12.119.148]
Mon 2024-07-15 21:20:31.527: [49255345] ---- End PTR results
Mon 2024-07-15 21:20:31.527: [49255345] Performing IP lookup (faculdadecatolicadaparaiba.edu.br)
Mon 2024-07-15 21:20:31.528: [49255345] * D=faculdadecatolicadaparaiba.edu.br TTL=(17) A=[177.12.119.148]
Mon 2024-07-15 21:20:31.528: [49255345] ---- End IP lookup results
Mon 2024-07-15 21:20:31.528: [49255345] Performing SPF lookup (faculdadecatolicadaparaiba.edu.br / 177.12.119.148)
Mon 2024-07-15 21:20:31.528: [49255345] * Policy (cache): v=spf1 mx ip4:177.12.119.148 -all
Mon 2024-07-15 21:20:31.529: [49255345] * Evaluating mx: match
Mon 2024-07-15 21:20:31.529: [49255345] * Result: pass
Mon 2024-07-15 21:20:31.529: [49255345] ---- End SPF results
Mon 2024-07-15 21:20:31.529: [49255345] --> 250 2.1.0 Sender OK
Mon 2024-07-15 21:20:31.529: [49255345] <-- RCPT TO:<all@example.com>
Mon 2024-07-15 21:20:31.543: [49255345] Производится поиск DNS-BL (177.12.119.148 – соединение с IP)
Mon 2024-07-15 21:20:31.723: [49255345] * b.barracudacentral.org - прошло
Mon 2024-07-15 21:20:32.432: [49255345] * rbl.rbldns.ru - прошло
Mon 2024-07-15 21:20:32.432: [49255345] ---- Конечные результаты DNS-BL
Mon 2024-07-15 21:20:32.432: [49255345] --> 250 2.1.5 Recipient OK
Mon 2024-07-15 21:20:32.434: [49255345] <-- DATA
Mon 2024-07-15 21:20:32.434: [49255345] --> 354 Enter mail, end with <CRLF>.<CRLF>
Mon 2024-07-15 21:20:32.864: [49255345] Message size: 20080 bytes
Mon 2024-07-15 21:20:32.877: [49255345] Performing DKIM verification
Mon 2024-07-15 21:20:32.877: [49255345] * File: e:\mdaemon\queues\temp\md5001002554211.tmp
Mon 2024-07-15 21:20:32.877: [49255345] * Message-ID: <230061694.52802.1721065400552.JavaMail.zimbra@faculdadecatolicadaparaiba.edu.br>
Mon 2024-07-15 21:20:32.877: [49255345] * Result: neutral
Mon 2024-07-15 21:20:32.877: [49255345] ---- End DKIM results
Mon 2024-07-15 21:20:34.058: [49255345] Passing message through Outbreak Protection...
Mon 2024-07-15 21:20:34.058: [49255345] * Message-ID: <230061694.52802.1721065400552.JavaMail.zimbra@faculdadecatolicadaparaiba.edu.br>
Mon 2024-07-15 21:20:34.058: [49255345] * Reference-ID: str=0001.0A682F1D.66956871.0E24,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0
Mon 2024-07-15 21:20:34.058: [49255345] * Virus result: 0 - Clean
Mon 2024-07-15 21:20:34.058: [49255345] * Spam result: 1 - Clean
Mon 2024-07-15 21:20:34.058: [49255345] * IWF result: 0 - Clean
Mon 2024-07-15 21:20:34.058: [49255345] ---- End Outbreak Protection results
Mon 2024-07-15 21:20:34.274: [49255345] Создание сообщения successful: e:\mdaemon\queues\inbound\md5001012800458.msg
Mon 2024-07-15 21:20:34.274: [49255345] --> 250 2.6.0 Ok, message saved <Message-ID: <230061694.52802.1721065400552.JavaMail.zimbra@faculdadecatolicadaparaiba.edu.br>>
Mon 2024-07-15 21:20:34.274: [49255345] <-- QUIT
Mon 2024-07-15 21:20:34.275: [49255345] --> 221 2.0.0 See ya in cyberspace
Mon 2024-07-15 21:20:34.275: [49255345] SMTP session successful (Bytes in/out: 21483/4957)In the content filter logs, the header "To" is empty, most likely it was sent to several addresses at once, including mail lists, since there are records with an empty "To" and with addressees, among which there was all@example.com , and the content filter did not work. The real mail domain has been replaced here with "example".
Mon 2024-07-15 21:20:37.649: Content Filter processing e:\mdaemon\queues\inbound\md5001012800458.msg...Mon 2024-07-15 21:20:37.649: * Message return-path:Mon 2024-07-15 21:20:37.649: * Message from: filosofia@faculdadecatolicadaparaiba.edu.brMon 2024-07-15 21:20:37.649: * Message to:Mon 2024-07-15 21:20:37.649: * Message subject: [***SPAM*** Score/Req: 14.8/7.0] Срок действия пароля для электронной почты Zimbra скоро истекает с сегодняшнего дняMon 2024-07-15 21:20:37.649: * Message ID: <230061694.52802.1721065400552.JavaMail.zimbra@faculdadecatolicadaparaiba.edu.br>Mon 2024-07-15 21:20:37.649: Start Content Filter resultsMon 2024-07-15 21:20:37.652: * Message matched rule: 33 "External sender WARNING RU" (Hits: 216443)Mon 2024-07-15 21:20:37.668: * Action: HTML warning added to messageMon 2024-07-15 21:20:37.671: * Matched 1 of 29 active rulesMon 2024-07-15 21:20:37.671: End of Content Filter resultsWe tried to apply filters based on the X-MDMailing-List header, but this rule did not work when testing sending to mailing lists. Perhaps mdaemon adds this header after the initial processing by the content filter. Please explain where the content filter processes the email for the first time, if there are only two types of queues in the content filter itself - local and remote, and the email arrives initially in the inbox.
An example of a rule that does not work on the header X-MDMailing-List when sending an email from an external mail to a mailing list test2@example.com
[Rule040]RuleName=Test2 (X-MDMailing-List)uid={0a835b85-6d44-494d-a2ea-2b5de2271d98}Enable=YesThisRuleCondition=AllProcessQueue=BOTHCondition01=FROM|does not contain|AND|example|Condition02=X-MDMAILING-LIST|contains|AND|test2@example.com|Action01=move to public folders|"Bayesian Learning/Spam"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1 / 2
- 2