The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Account Level Spam filter redirect to Spam Box

Discussion in 'E-mail Discussions' started by GuntherR, Nov 16, 2009.

  1. GuntherR

    GuntherR Member

    Joined:
    Nov 16, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    How can one direct spam mails identified by a Account or User level filter to the Spam Box (spam)?
    I have access to the .cpanel/filter.yaml Exim script, but I do not see how I can achieve this with the cPanel Spam Filter 'Actions'. Is there some variable available I can use in the 'Forward to' Actions selection (or any other action).
    I want that every user can take care of their own junk mail.
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    SpamAssassin Spam Box

    The Spam Box feature may be enabled or disabled via the SpamAssassin page within the Mail features in cPanel.
    Menu path, cPanel: Mail >> Spam Assassin
    Related Documentation: SpamAssassin

    Please note that in order for the Spam Box to function it is necessary to ensure that SpamAssassin is enabled.
     
  3. GuntherR

    GuntherR Member

    Joined:
    Nov 16, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I enabled Spamassassin and Spam Box and it works fine for 'standard' junk identified by the standard SA rules.
    But what happen to the filters I can add under "Filter for All Mail On Your Account"? I have to add a filter name, rules and actions. What do I have to specify in the Actions part to let the mail, which was identified as spam by the Rules section, end up in the Spam Box directory 'spam'?
    I found out how to do this on a User Level (Deliver to folder: .spam), but not on the account level. Is there maybe a variable I have to add into the path as the path always starts with /, e.g. /$MAILDIR/$SPAMBOX or do I have to use a different Action? Or ... do I need to edit the backup/Restore Exim script?
    Thanks!
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I am not aware of a special variable to use that would work for the given requirements; however, it is entirely possible to setup a filter within Account-Level Filtering that matches a given recipient and then delivers the message into the recipient's "spam" folder.

    When using Account-Level Filtering to setup custom filters that redirect to a specific folder unique to each e-mail account the only differences during setup would be that you may want or need to add a rule that matches the filter to a recipient while also using a longer folder path for delivery (a folder path that uses the domain name), as seen in the following example when using the action "deliver to folder" and using a path like the following, where "domain.tld" should be replaced by the applicable domain name and where "emailuser" should be replaced by the applicable name of the e-mail account:
    Code:
    /domain.tld/emailuser/.spam
    The above folder path may be selected via a drop-down menu after setting the action as "deliver to folder."

    Related Documentation:
    Account Level Filtering
    User Level Filtering
     
  5. GuntherR

    GuntherR Member

    Joined:
    Nov 16, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Well, your example code would allow to set to one particular user and adding a filter per user would mean that for a company of 100 people I would have to add hundreds of filter rules. I just want to work on a single filter for all employees. In procmail I simply do the following:

    The main thing here, I can extract the individual mailbox ($POPBOX aka emailuser) out of procmails $EXT2 variable. If I need the domain.tld, I can use $EXT.

    But I do not see how I can achieve this with the cPanel facility I have access to.

    If I could set the following:
    Since Exim is the mailer, Exim apparently does not know the user specific part when going through these filters. A 'router' for the specific user would have to be configured or so ... but I am not (yet) sure about this as I just started using Exim and cPanel.
     
Loading...

Share This Page