Prevent internal messages from being tagged as spam

By admin at 2020-01-04 • 0 collector • 1677 pageviews

Purpose

When an internal message is sent to another account on the Zimbra system, it is tagged as spam.

Resolution

To prevent this, run one of the following commands based on your Zimbra Collaboration version:

In ZCS 8.5.x / 8.6.x

su - zimbra
zmprov ms `zmhostname` zimbraAmavisOriginatingBypassSA TRUE
zmamavisdctl restart

In ZCS 8.0.x:

su - zimbra
zmlocalconfig -e amavis_originating_bypass_sa=true  
zmamavisdctl restart

Additional Content

At present we can bypass virus checking for internal network in all ZCS version with the following manual steps:-

  • Open "/opt/zimbra/conf/amavisd.conf.in" and make below entry under ORIGINATING policy bank:

 bypass_virus_checks_maps   => [1], # don't virus-check internal mail

After making change the policy_bank section should be look like the following example:

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  originating => 1,  # declare that mail was submitted by our smtp client
  allow_disclaimers => %%binary VAR:zimbraDomainMandatoryMailSignatureEnabled%%,  # enables disclaimer insertion if available
  # notify administrator of locally originating malware
  virus_admin_maps => ['@@av_notify_user@@'],
  spam_admin_maps  => ['@@av_notify_user@@'],
  warnbadhsender   => 0,
  bypass_spam_checks_maps   => [1], # don't spam-check internal mail
  bypass_virus_checks_maps   => [1], # don't virus-check internal mail
  # forward to a smtpd service providing DKIM signing service
%%uncomment SERVICE:opendkim%%  forward_method => 'smtp:[%%zimbraLocalBindAddress%%]:10030',
  # force MTA conversion to 7-bit (e.g. before DKIM signing)
  smtpd_discard_ehlo_keywords => ['8BITMIME'],
  bypass_banned_checks_maps => [0],  # allow sending any file names and types
  terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};
  • Now restart Amavisd service using:

zmamavisdctl restart

Notes: Before applying above changes mail-header contains below entries when Spam/Virus scanning is enabled.

X-Virus-Scanned: amavisd-new at YOURMTA.SERVER.COM
X-Spam-Flag: NO
X-Spam-Score: -2.91
X-Spam-Level:
X-Spam-Status:

When you bypassed/disabled spam and virus checking for the local network, X-Virus and X-Spam entries will not occurs in mail-headers.


Requires Login

Loading...