Results 1 to 6 of 6

Thread: spam management (external mx & junk folder)

  1. #1
    Join Date
    Dec 2006
    Location
    Paris
    Posts
    78
    Rep Power
    9

    Default spam management (external mx & junk folder)

    Hello,

    Sorry if this has already been covered, looking for spam gives so many result that I'm not sure this has not been discussed.

    We have a dedicated antispam server (MailScanner). I'd like this server to deliver spams whose score is over 6 and zimbra to store them in users "junk" folder automatically.
    What should I do to achieve this ?
    Moreover, is it possible to desactivate spam analysis for these messages ?

    Finally, is there a way to automatically remove old messages from this junk folder (useful if user forgets to clean this folder to avoid over quota situation).

    Thanks,

    Artturi

  2. #2
    Join Date
    Oct 2006
    Location
    Mountain House, CA
    Posts
    24
    Rep Power
    9

    Default

    The below headers configuration is what ZCS looks for to send spam messages in junk folder:

    zmprov gacf | grep Header
    zimbraSpamHeader: X-Spam-Flag
    zimbraSpamHeaderValue: YES

    You can modify the header and value, to what you 3rd party spam engine tags your messages with. To modify:

    zmprov mcf zimbraSpamHeader X-MySpamEngineTag
    zmprov mcf zimbraSpamHeaderValue SPAM

    To disable Spam Engine on ZCS

    you're going to need to modify the /opt/zimbra/conf/zmmta.cf file, and remove anything that looks like

    if SERVICE antivirus
    POSTCONF content_filter smtp-amavis:[127.0.0.1]:10024
    fi
    if SERVICE !antispam
    POSTCONF content_filter smtp-amavis:[127.0.0.1]:10024
    fi

    Then, do a
    postconf -e content_filter=

    and restart postfix; this will completely bypass the system.

    If you don't want to bypass AV, then edit amavisd.conf.in:
    Change the line
    %%comment SERVICE:antispam%% @bypass_spam_checks_maps = (1);
    to
    @bypass_spam_checks_maps = (1);

    Then restart all services on the box.

    #content_filter = smtp-amavis:[127.0.0.1]:10024t

  3. #3
    Join Date
    Mar 2007
    Posts
    24
    Rep Power
    8

    Default

    What would be the result if the MailScanner server were configured to add the same header that Zimbra is looking for by default (X-Spam-Flag: YES)?

    Would the message still get passed to Amavisd? To SpamAssassin? I guess the key question is, at what point in mail delivery does Zimbra look for the X-Spam-Flag header?

  4. #4
    Join Date
    Mar 2007
    Posts
    24
    Rep Power
    8

    Default can't add X-Spam-Flag

    It looks like some piece of Zimbra's mail delivery chain (postfix, amavis, spamassassin) removes the X-Spam-Flag header that my Brightmail anti-spam appliance adds. This, I think, is the header that Spamassassin uses to identify spam too.

    I'd like to combine the spam-fighting abilities of my Brightmail appliance, and Zimbra's Spamassassin. But if SA removes the header that Brightmail adds, this doesn't seem to be possible.

    Any suggestions?

  5. #5
    Join Date
    Dec 2006
    Location
    Paris
    Posts
    78
    Rep Power
    9

    Default

    Quote Originally Posted by abhullar View Post
    The below headers configuration is what ZCS looks for to send spam messages in junk folder:

    zmprov gacf | grep Header
    zimbraSpamHeader: X-Spam-Flag
    zimbraSpamHeaderValue: YES

    You can modify the header and value, to what you 3rd party spam engine tags your messages with. To modify:

    zmprov mcf zimbraSpamHeader X-MySpamEngineTag
    zmprov mcf zimbraSpamHeaderValue SPAM
    I finally applied this modification to my system but I left spam detection active :
    zmprov gacf | grep Header
    zimbraSpamHeader: X-paris.iufm.fr-MailScanner-SpamCheck
    zimbraSpamHeaderValue: polluriel
    The last line is perhaps wrong because "polluriel" is only the beginning of the value. After this, Mailscanner adds the score.

    Now that's in place, spams do not arrive in "Junk" folder but in Inbox.

    Do you have an idea of what to do to correct that ?

    Thanks in advance,

    Artturi
    Artturi

  6. #6
    Join Date
    Jun 2008
    Location
    Lexington, KY
    Posts
    65
    Rep Power
    7

    Default

    Quote Originally Posted by abhullar View Post
    The below headers configuration is what ZCS looks for to send spam messages in junk folder:

    zmprov gacf | grep Header
    zimbraSpamHeader: X-Spam-Flag
    zimbraSpamHeaderValue: YES

    You can modify the header and value, to what you 3rd party spam engine tags your messages with. To modify:

    zmprov mcf zimbraSpamHeader X-MySpamEngineTag
    zmprov mcf zimbraSpamHeaderValue SPAM

    To disable Spam Engine on ZCS

    you're going to need to modify the /opt/zimbra/conf/zmmta.cf file, and remove anything that looks like

    if SERVICE antivirus
    POSTCONF content_filter smtp-amavis:[127.0.0.1]:10024
    fi
    if SERVICE !antispam
    POSTCONF content_filter smtp-amavis:[127.0.0.1]:10024
    fi

    Then, do a
    postconf -e content_filter=

    and restart postfix; this will completely bypass the system.

    If you don't want to bypass AV, then edit amavisd.conf.in:
    Change the line
    %%comment SERVICE:antispam%% @bypass_spam_checks_maps = (1);
    to
    @bypass_spam_checks_maps = (1);

    Then restart all services on the box.

    #content_filter = smtp-amavis:[127.0.0.1]:10024t
    Since we know what Zimbra looks for to consider spam and place in the Junk folder, what does it look for to be considered on a whitelist? Or is this just handled through Amavis/Spamassassin?

    God Bless,
    Marty

Similar Threads

  1. I got Ubuntu and Zimbra working
    By pacsteel in forum Installation
    Replies: 73
    Last Post: 06-23-2008, 12:41 PM
  2. Spam training. Junk or Junk E-mail folders?
    By azilber in forum Zimbra Connector for Outlook
    Replies: 0
    Last Post: 02-15-2007, 01:24 PM
  3. Spam training and Junk folder behavior
    By flyerguybham in forum Administrators
    Replies: 9
    Last Post: 02-14-2007, 12:09 PM
  4. Replies: 5
    Last Post: 02-09-2007, 10:10 PM
  5. Junk folder and IMAP
    By richard-hdd in forum Installation
    Replies: 3
    Last Post: 09-17-2006, 03:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •