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!

implement subaddressing defining a router in ROUTERMIDDLE

Discussion in 'E-mail Discussion' started by enboig, Mar 1, 2016.

  1. enboig

    enboig Member

    Joined:
    Apr 25, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    I have tried to modify exim.conf to accept subaddressing (account+anysuffix@example.com to account@example.com); but cpanel overwrites my changes.

    How could I write a "new router" to redirect addesses containging subaddressing to the correct account?

    Thanks.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    To clarify, did your custom changes work until overwritten? If so, ensure you use the "Advanced Editor" in "WHM >> Exim Configuration Manager". This will ensure the changes are preserved. Also, please see this feature request:

    Email sub-addressing (plus addressing)

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. enboig

    enboig Member

    Joined:
    Apr 25, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    51
    Finally I added it at "Section: PRENOALIASDISCARD", I copied the router "virtual_user" which is just above just adding support for suffixt:

    virtual_user_suffix:
    driver = accept
    headers_remove="x-spam-exim"
    domains = +user_domains
    require_files = "+${extract{5}{::}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd"
    condition = ${if eq {${lookup {$local_part} lsearch {${extract{5}{:}{${lookup passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/etc/$domain/passwd}}}{} {false}{true}}
    transport = virtual_userdelivery
    local_part_suffix = +*
    local_part_suffix_optional


    It works, but I would have preferred a more elegant way of doing it.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I am happy to see you were able to find a solution. Thank you for posting the instructions to this thread.
     
    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