Hello everybody,

I'm struggling to stop abusing SASL usernames. My idea is to allow any
particular SASL username send only from his domain, that is "
u...@example.com" can send from "anyth...@example.com", but not from "
u...@otherexample.com".

I know it should be done with "reject_authenticated_sender_login_mismatch"
and "smtpd_sender_login_maps", but what kind of PCRE rules should I write?
Or PCRE is not a good option to achieve this?

Tried these:

/.*(@.*)/ ${1}

they return only the domain part, but sending fails with error:

"Sender address rejected: not owned by user"

Thanks in advance!

Reply via email to