|Main Archive Page > Month Archives > postfix-users archives|
Assuming that I had enabled SASL mechanism. Can I use a mysql: something list (probably a custom query probing the user table for "1" in a particular column) to restrict the access to SMTP relay to a very few users?
smtpd_sender_login_maps = mysql:/server/etc/postfix/allowrelay.sql
with allowrelay.sql something like that?
hosts = unix:/var/lib/mysql/mysql.sock
user = someuser
password = somepassword
dbname = mail_postfix
query = SELECT `address` FROM `mailbox` WHERE `address` = '%s' AND `relay` = '1';
Is this going to do the trick?