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 Wildcard Email Filter Possible?

Discussion in 'E-mail Discussions' started by Dave__W, Jun 29, 2017.

Tags:
  1. Dave__W

    Dave__W Registered

    Joined:
    Jun 29, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hey everyone,

    I am trying to setup email forwarding so we can use wildcard addresses to send to certain accounts. Eg "usera*@domain.com" > "usera@domain.com" where * is wildcard so anything sent to usera123@domain.com/usera456@domain.com etc will be forwarded to "usera@domain.com".

    There are no full email accounts or forwarders setup for this domain.

    So i have created a rule in 'Global Email Filters' to redirect all mail that begins with "usera" to redirect to another email address and then discard the message.

    However when i send a mail to any of these addresses they just bounce back and say the address doesn't exist?

    Do accounts need to be setup in cPanel for the global email filters to work? If so this obviously makes what we're trying to do pointless as we'd have to setup separate email accounts for each possible address which is what we're trying to avoid.

    Does anyone know if what i'm trying to do should work and, if so, is there anything you could suggest as to what i'm doing wrong/how i can make it work?

    If you need any other info about the setup then let me know.

    Thanks very much,

    Dave
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    You can browse to the "Default Address" option in cPanel to set the default behavior for unroutable emails:

    Default Address - Documentation - cPanel Documentation

    It needs to be set to an option such as "Forward to your system account" in order to avoid bounces for messages sent to email accounts that do not exist.

    Thank you.
     
  3. Dave__W

    Dave__W Registered

    Joined:
    Jun 29, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi Michael,

    Thanks so much for your quick reply, that makes perfect sense :) However I did want to check something if you'd be so kind? We are happy to discard any mail that does not match the Global Email Filter rules (there are no actual email accounts or specific forwarders setup for this domain). If I use the 'Default Address' options to 'Forward to your system account' then presumably this will fill up with all inbound mail (spam and everything else)?

    So presumably the best method would be to set the Default Address to 'Forward to your system account', add the Global Email Filter rules that we need and add one or more additional Global Email Filter rules to catch ALL other emails that aren't covered by other rules and discard or fail these messages. So i think that should mean any mail that matches one of the existing rules should be forwarded, and all other mail will be discarded, which will prevent any mail actually being sent to the 'system account'?

    Would you mind confirming that my logic/process is correct and is the best way to achieve this (and will prevent the build up of unwanted email in the system account)?

    Thanks so much for your help, it's massively appreciated

    Dave
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    As I understand, yes that should work as you intend it to. You may want to send some test messages upon setting up the filter rules just to make sure it works as expected.

    Thank you.
     
  5. Dave__W

    Dave__W Registered

    Joined:
    Jun 29, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks so much for the clarification Michael, i will go ahead and test the filter rules after setting it up like this to ensure all is as expected.

    Thanks again, Dave
     
Loading...

Share This Page