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!

Filtering mail by wildcard (abc.*

Discussion in 'E-mail Discussion' started by GuyScharf, Mar 19, 2010.

  1. GuyScharf

    GuyScharf Registered

    Mar 19, 2010
    Likes Received:
    Trophy Points:
    I want to forward/filter email by wildcard so that all mail addressed to abc.* is delivered to the abc mailbox, mail addressed to def.* goes to the def mailbox etc. The purpose of this addressing convention is primarily for the user to be able to route mail to folders easily and secondarily to identify and block addresses that have become contaminated with spam.

    The Cpanel Forwarding feature apparently doesn't support wildcards or Regex, so I can't use that.

    I tried using Regex in an account-level filter. With a RegEx of "abc[.].*@.*" on the To: field and an action of "Redirect to email ...", all mail addressed to abc.* was delivered to the abc mailbox.

    But I discovered two problems in testing:

    1) When an email is addressed to two accounts at my domain, for example "" and "def", the Envelope-To field contained both accounts. However, the "redirect to email" put the email in the abc mailbox but a copy was not delivered to the def mailbox. The "redirect" function seems to cancel all other delivery destinations when executed.

    2) The To: field does not necessarily contain relevant information. Especially in the case of distribution lists, the To: field is likely to contain the list name, and not the account the mail is actually to be delivered to.

    How can I resolve these problems? The first one where the filter results in cancelling other destinations is especially a problem. For the second problem, I really want to filter based on the Envelope-To field.



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