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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

global filter that forwards and keeps local copies?

Discussion in 'E-mail Discussions' started by rvdb, Sep 21, 2017.

Tags:
  1. rvdb

    rvdb Registered

    Joined:
    Sep 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    computer
    cPanel Access Level:
    Root Administrator
    I am trying to find a mechanism in cPanel that:
    1. detects all mails sent from a specific domain (e.g. domain.toforward) to any email account on my domain (e.g. account1@example.com, account2@example.com, ...)
    2. forwards those messages to a specific email account on my domain (e.g. mailsfrom.domain@example.com)
    3. also keeps a copy of the message in the original inbox
    Both [1] and [2] work well with a global filter that redirects emails sent from "@domain.toforward" to "mailsfrom.domain@example.com".

    Yet, this redirection does not keep a copy of the message in the inbox of the account it was sent to originally (e.g. account1@example.com). Adding a second (or first) action to the filter which delivers the message to a specific folder comes close, but this seems only possible to specific folders. Is there perhaps a variable that can be used in the folder path which resolves to the specific account that has received the original message, e.g.:
    Code:
    /${domain}/${local_part}
    ?

    I've tried these variables from the exim documentation, but cPanel doesn't allow to store this path for a "deliver to folder" action :
    Or am I missing anything obvious, and is there a better way to set up a global filter that forwards and keeps local copies?

    Hm, I can't edit my original post, but I'd like to state that I'm using cPanel version 66.0.23. I do have SSH access to the server but am on a limited end-user account, so I probably don't have access to all configuration files.
     
    #1 rvdb, Sep 21, 2017
    Last edited by a moderator: Sep 21, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You won't be able to use those variables using the "Deliver to Folder" action with cPanel access only. However, one alternative would be to setup individual filter rules for each specific email account so that you can save the copy of the message to the individual INBOX folder for each email account. Or, you could reach out to your hosting provider to see if they could setup a rule using the Exim system filter file.

    Thank you.
     
  3. rvdb

    rvdb Registered

    Joined:
    Sep 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    computer
    cPanel Access Level:
    Root Administrator
    Thanks for your reply.

    I've realized, however, that I can access a filter file through the cPanel "Email Forwarders and Filters" backup, so could this perhaps provide a more advanced way of editing filter rules (download filters, update filter file locally, upload again)?

    Is it possible make use of variables in that downloaded filter file itself, or to otherwise add a rule that also keeps a local copy in the receiving email account before redirecting?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe you'd face the same error message when restoring a filter file with that type of variable that you would when editing a filter. You are welcome to try it, however you may want to instead consider opening a feature request for this functionality via:

    Submit A Feature Request

    Thank you.
     
Loading...

Share This Page