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!

Regex delivery

Discussion in 'E-mail Discussion' started by Hoekynl, Oct 3, 2017.

Tags:
  1. Hoekynl

    Hoekynl Registered

    Joined:
    Oct 3, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Reseller Owner
    Hello Everyone,

    I need to add a domain-wide email suffix filter.
    I've got most part working, but the delivery part will not work.

    The regex is:
    To matches: #.+@domain.tld

    Deliver to:
    email@domain.tld

    I want this to be
    Deliver to:
    *part before #*@domain.tld

    I have made a regex that removes the # and the part between the @ but it gives a error at delivery:
    Code:
    error in filter file: malformed address "#(.*?)(?:(?!@).)*" in filter file: missing or malformed local part (expected word or "<")
    I guess that the deliver to: part doesn't work with regex?
    You can see it work here: regex101.com/r/zF0wB3/8
    Regex101 - online regex editor and debugger
     
    #1 Hoekynl, Oct 3, 2017
    Last edited by a moderator: Oct 3, 2017
  2. 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
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Hoekynl

    Hoekynl Registered

    Joined:
    Oct 3, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Reseller Owner
    Hello Michael,

    Unfortunately this does not have a fix for me :/

    I just need to be able to "insert" a variable (taken from regex) to the "Deliver to" part in the filter, I hope this is possible.

    Thanks
     
  4. 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
    That's not possible without root access to the server to setup a custom Exim system filter. Regular expressions are only supported in the filter rule itself with the "matches regex" and "does not match" operators when using cPanel to create a filter.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Hoekynl

    Hoekynl Registered

    Joined:
    Oct 3, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Reseller Owner
    Hello Michael,

    What would the settings be? I work at the hosting company and will have to ask tech if it's possible for them to set it up for me.

    Thanks :)
     
  6. 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
    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