Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Deliver Spam to Spam folder, globally

Discussion in 'E-mail Discussion' started by intelihost, Jan 20, 2017.

Tags:
  1. intelihost

    intelihost Registered

    Joined:
    Jan 20, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hi guys.
    I had this Exim Filter set up globally, so all Spam was delivered right to a Spam Folder.
    Then I set up a new server running CentOS 7 and decided to set the rule up again, using the /usr/local/cpanel/etc/exim/sysfilter/options directory, so it would be listed as a separate filter in Mail Settings.

    However, nothing happens. Can you guys help me out?

    Code is:
    Code:
    # Exim filter
    
    if not first_delivery and error_message then finish endif
    
    #Spam
    if ($h_X-Spam-Status: contains "Yes") then
      if "${if exists {$home/mail/$domain/$local_part/.Spam}{yes}{no}}" contains "yes"
       then
        save "$home/mail/$domain/$local_part/.Spam/" 660
        finish
       endif
    endif
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,435
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The filter rule would not work in cases where the .Spam folder is not yet created.

    An alternative method is to simply create the /home/$username/.spamassassinboxenable file under all accounts, which will enable the Spam Box option. There are some user-submitted commands discussed on the following thread:

    Apache SpamAssassin global enable anyone?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice