associate no-reply@domain.com with authenticated users in postfix through login_maps
by vincix from LinuxQuestions.org on (#50KPB)
Hi,
I'm trying to allow access to only some authenticated users to send e-mails using no-reply@domain.com, while allowing them to also use their corresponding e-mail addresses.
Such as:
whatever@domain.com should be allowed to send e-mails both using no-reply@domain.com and whatever@domain.com.
The other authenticated users should use their own e-mail addresses.
So I got it to work for only one e-mail address, but the second one doesn't seem to work, and I'm guessing simply because no-reply@domain.com matches the first user.
In main.cf I've got:
Code:smtpd_sender_login_maps = pcre:/etc/postfix/sender_login_maps.pcreCode:cat /etc/postfix/sender_login_maps.pcre
/no-reply@domain.com/ whatever@domain.com
/no-reply@domain.com/ user@domain.com
/^(.*)/ ${1}Any ideas? Maybe If I could use two files, and if doesn't match the first one, then it goes on to the second?


I'm trying to allow access to only some authenticated users to send e-mails using no-reply@domain.com, while allowing them to also use their corresponding e-mail addresses.
Such as:
whatever@domain.com should be allowed to send e-mails both using no-reply@domain.com and whatever@domain.com.
The other authenticated users should use their own e-mail addresses.
So I got it to work for only one e-mail address, but the second one doesn't seem to work, and I'm guessing simply because no-reply@domain.com matches the first user.
In main.cf I've got:
Code:smtpd_sender_login_maps = pcre:/etc/postfix/sender_login_maps.pcreCode:cat /etc/postfix/sender_login_maps.pcre
/no-reply@domain.com/ whatever@domain.com
/no-reply@domain.com/ user@domain.com
/^(.*)/ ${1}Any ideas? Maybe If I could use two files, and if doesn't match the first one, then it goes on to the second?