Disable SPF DKIM and DMRAC

Revision as of 07:15, 10 November 2022 by Rnoti (talk | contribs) (Created page with "=Disable SPF, DKIM, and DMARC validation= <hr> {{KB|{{WIP}}|{{ZCS 8.8}}|{{ZCS 9.0}}}} <hr> __FORCETOC__ ====Problem==== Receiving spam mails with unwanted/unknown language(s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Disable SPF, DKIM, and DMARC validation


   KB 24484        Last updated on 2022-11-10  




0.00
(0 votes)

Problem

Receiving spam mails with unwanted/unknown language(s) in the message body.

Solution

Disable SPF, DKIM, and DMARC validation of incoming messages. Note: Disabling SPF, DKIM, and DMARC validation is not best practice because these records helps to identify spam messages.

Step 1:

  • Load TextCat module from a custom file /opt/zimbra/data/spamassassin/localrules/custom_plugins.pre
echo -e "loadplugin Mail::SpamAssassin::Plugin::TextCat\n" > /opt/zimbra/data/spamassassin/localrules/custom_plugins.pre
Notes:
Run as zimbra user [su - zimbra]
Default file of TextCat module is /opt/zimbra/data/spamassassin/localrules/v310.pre

Step 2:

  • Add below line in the file "/opt/zimbra/conf/salocal.cf.in"
ok_languages <Short code of language one>,<Short code of language two>
Example:
ok_languages en,es
Notes:
ok_languages means spam assassin will accept emails in those languages and it will add spam score to all other languages.
We can add ok_languages before the line # accept email from zimbra support and forums
Add at least two languages as accepting languages.

Step 3:

  • Edit spam score for unwanted languages. Open "/opt/zimbra/data/spamassassin/rules/50_scores.cf" and edit UNWANTED_LANGUAGE_BODY
score UNWANTED_LANGUAGE_BODY <score>
Example:
score UNWANTED_LANGUAGE_BODY 4.0

Step 4:

  • Verification, send an email with unwanted language in the body and check X-Spam-Status of the message in recipient side.
Example:
If message identified unwanted language, it will be tagged as
X-Spam-Status: No, score=4.59 required=6.6 tests=[DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, NO_DNS_FOR_FROM=0.379, T_REMOTE_IMAGE=0.01, UNWANTED_LANGUAGE_BODY=4]
Reference:
https://metacpan.org/pod/Mail::SpamAssassin::Plugin::TextCat
Submitted by: Raghu Noti
Verified Against: ZCS 8.8.15, ZCS 9.0 Date Created: 2022-08-07
Article ID: https://wiki.zimbra.com/index.php?title=Disable_SPF_DKIM_and_DMRAC Date Modified: 2022-11-10



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search