V?ctor Rubiella Monfort:
> Hello,
>
> I'm working on a map for restrict MAIL_FROM declared on mail based on
> sasl user authenticated.
>
> For example if we want that all accounts for domain @domain1.com can
> define MAIL_FROM @domain1.com and @domain2.com accounts:
>
> @domain1.com [email protected] [email protected]
> [email protected] [email protected]
> @domain2.com [email protected] [email protected]
> [email protected] [email protected]
Perhaps you can use reject_sender_login_mismatch with
main.cf:
smtpd_sender_login_maps = pcre:$config_directory/sender-login.pcre
sender-login.pcre
/^(.+)@domain1\.example$/ [email protected] [email protected]
/^(.+)@domain2\.example$/ [email protected] [email protected]
Assuming that the usernames are the same in different domains.
Wietse