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!

Forwarding emails by wildcard (name*@domain.com)

Discussion in 'E-mail Discussion' started by rmsuydam, Apr 28, 2009.

  1. rmsuydam

    rmsuydam Registered

    Joined:
    Apr 28, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    My company does a lot of software testing, and we need to frequently create new users (by email address) for testing. Rather than manually creating a forward every time, I'd love to create a wildcard forwarder. For instance, any email I send to USER****@domain.com would be forwarded to my main account. IE, user1234@domain.com, user042809@domain.com, etc.

    I cannot do a catch all forward, as I have several users wanting to do this. So, USERA****@domain.com, USERB****@domain.com, etc.

    Any ideas?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You can set up an account-level filter and for the To field use a regular expression. For more information about Exim's regular expressions, check out: http://www.exim.org/exim-html-4.69/doc/html/spec_html/ch08.html
     
  3. 8p-design

    8p-design Active Member

    Joined:
    Mar 25, 2006
    Messages:
    42
    Likes Received:
    1
    Trophy Points:
    158
    Hi,
    I am also in the same testing situation seeking for emails sent to user.WILDCARD@domain.tld be forwarded to another email address of my choice. And I don't want to create a huge number of forwarders.

    I followed the supplied link about EXIM, but I'm not sure this answers the question.

    Could anyone point what needs to be done for this to work?

    I need:
    user.1548987@domain.tld
    user.skjdhfgsg@domain.tld
    user.o948kokjo@domain.tld
    user.ANYTHING@domain.tld

    to forward the email to:
    someuser@domain.tld

    thanks!
     
  4. 8p-design

    8p-design Active Member

    Joined:
    Mar 25, 2006
    Messages:
    42
    Likes Received:
    1
    Trophy Points:
    158
  5. Moja

    Moja Registered

    Joined:
    Feb 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Genius! Worked perfectly for me, thank you!
     
  6. gsloop

    gsloop Registered

    Joined:
    Jan 11, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    This doesn't work...

    I've tried this, specifically.
    CPanel v11.25.0

    (cpanel > Account Level Filtering)
    Create a new filter

    Rules
    Using either "to" or "any header" matches regex
    "prefix_.+@domain.com" substituting the prefix I want and the domain this account is for...

    Forward to the email addy I want it forwarded to.

    This doesn't work, it produces a 550 bouce - "550 no such address here" (state 14)

    Can someone please help - as far as I can tell, that regex should match, but this technique simply doesn't work anymore, if it really ever did.

    -Greg
     
  7. vishun

    vishun Registered

    Joined:
    Jul 2, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Did you know that with Gmail you can make use of yourname+anythinghere@gmail.com and receive those emails? It is a great feature for creating multiple accounts while testing, identifying where your email address got leaked from (e.g. yourname+someservice@domain.com), and many more reasons.

    I am posting a new thread about this since I was not able to reply to this one due to 7 years elapsing: Forwarding emails by wildcard (name*@domain.com) -- It comes up with a high rank in search results and I wish that we could update the thread with the updated instructions that follow:
    1. Login to cPanel
    2. Go to Global Email Filters
    3. Click the Create a New Filter button
    4. Under the Rules header, change the left drop down to Any Recipient to match emails with more than one recipient
    5. Change the right dropdown to matches regex
    6. In the input area below the rule drop downs, enter recipient_.+@domain.com while replacing "recipient_" and "domain.com" appropriately (e.g. recipient@domain.com)
    7. Under the Actions header, change the drop down to Redirect to Email
    8. In the input area below the action drop down, enter the real email address recipient@domain.com

    cPanel version 70.0.53
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @vishun,

    I've moved your post into the requested thread.

    Thanks!
     
    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