5 Dec 11:35
Restrict senders for particular e-mail address
From: Jakub Nadolny <jakub.nadolny <at> carrywater.pl>
Subject: Restrict senders for particular e-mail address
Newsgroups: gmane.mail.postfix.user
Date: 2008-12-05 10:37:09 GMT
Subject: Restrict senders for particular e-mail address
Newsgroups: gmane.mail.postfix.user
Date: 2008-12-05 10:37:09 GMT
Hi, I have some collective e-mail aliases like: all-people-in-company <at> company-domain.pl I need to limit senders to this address to few authorised people only. So, in other words: What is the best way to allow users: some.name1 <at> company-domain.pl, some.name2 <at> company-domain.pl send e-mails to all-people-in-company <at> company-domain.pl, while all other users will not be allowed to do it? I was trying to achieve it by header_checks, but I could not find if there is any way to do something like: if /^To: .*all-people-in-company <at> company-domain.pl/ if /^From: .*some.name1 <at> company-domain.pl/ or /^From: .*some.name2 <at> company-domain.pl/ OK else REJECT You are not authorised to send e-mail to this address. endif (I know this is not proper construction in header_checks but it should show my intention). How can I do it? Thank you in advance, Jakub(Continue reading)
>> I got to solve it by:
>> smtpd_sender_login_maps = $virtual_mailbox_maps
>>
>
> do not reuse maps this way. use a script to generate each map instead
> (or use
>
> note that smtpd_sender_login_maps returns one or more logins, while
> virtual_mailbox_maps returns the path to the mailbox.
Since I'm using Cyrus LMTP, I don't have the "path to mailbox" variable, so
I could return whatever in $virtual_mailbox_maps. What I did was to return
the email address (which in turn corresponds to the SASL login).
So now it's perfectly "compatible" to use the same Mysql map for both
variables. I mean:
hsnew:/etc/postfix# cat /etc/postfix/vuser.mysql
# Virtual users (Mysql)
hosts = unix:/var/run/mysqld/mysqld.sock
user = postfix
password = xxxxxxxxxx
dbname = postfix
query = select user from user where user = '%s'
RSS Feed