Hi,
If helps, and your problem is than alias can be completly different than
sasl, I'm just implementing several approach, and I configure 2 diferent
maps
hash:aliases.map
em...@domain.tld alias,em...@domain.tld
Another one with authorized domains:
regexp:authdomains.map
/.*@authorixed\.tld/ alias,em...@domain.tld
smtpd_sender_login_maps = regexp:authdomains.map, hash:aliases.map
Best,
El 5/7/22 a las 16:02, Viktor Dukhovni escribió:
On 5 Jul 2022, at 7:31 am, Wietse Venema<wie...@porcupine.org> wrote:
This lookup table looks for the sender address and returns the SASL
username that is allowed to send mail with that address. I could (with
much additional complexity) generate all the app-specific uids and
return these, but I prefer keeping it simple.
Could you use a regexp: or pcre: tabble?
https://www.postfix.org/pcre_table.5.html
https://pcre.org/current/doc/html/pcre2syntax.html
I don't think this can work, because the request is not to match
variable senders in the lookup key, but rather for a single key
to return an RHS value that is itself a SASL login *pattern*.
That said, if the application sending email could be convinced to
explicitly specify envelope sender address extensions, so that each
SASL login has its own dedicated sender address, compatible with a
table of the form:
# Sender address login (same as sender)
magicuser+e...@example.com magicuser+e...@example.com
magicuser+e...@example.com magicuser+e...@example.com
magicuser+e...@example.com magicuser+e...@example.com
...
then the whole thing could be (carefully) simulated with an RE table:
# PCRE only
/^(magicuser[+][^,\s@]+@example\.com)$/ $1
where "carefully" means not allowing at least ",", whitespace and
perhaps other characters in the extension. Or just specify a set
of allowed characters:
# PCRE only
/^(magicuser[+][-\w]+@example\.com)$/ $1