implement subaddressing defining a router in ROUTERMIDDLE

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463

enboig

Member
Apr 25, 2008
18
0
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
I am happy to see you were able to find a solution. Thank you for posting the instructions to this thread.