Dňa 8. novembra 2022 15:17:23 UTC používateľ Frank Richter via Exim-users <exim-users@exim.org> napísal: >Hello, > >we'd like to allow subaddresses like user+sub@domain to deliver to users’s >folder sub (if existent) via lmtp. Target system is cyrus-imapd. >We have these routers: > >global_aliases: > driver = redirect > allow_defer > allow_fail > data = ${lookup{$local_part@$domain}dbm{DBM/aliases}} > local_part_suffix = "+*" > local_part_suffix_optional > retry_use_local_part > no_rewrite >
The suffix is in the $local_part_suffix variable and contains separator already (eg. +tag). I use this: dovecot_ualias: ... domains = +our_domains local_part_suffix = +* local_part_suffix_optional qualify_preserve_domain data = ${lookup{$local_part} lsearch{VMAIL_DOM_DIR/$domain_data/aliases} \ {${quote_local_part:$value$local_part_suffix}} } I have per domain alias file with data without RHS part, thus lookup returns only local_part, to which is suffix appended. If your lookup returns qualified addresses, try something as this with lookup's result (not tested): ${sg{$value}{\N(@[^@]+)$\N}{$local_part_suffix\$1}} regards -- Slavko https://www.slavino.sk/ -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/