man pipe suomi
On 2009-11-10 07:49, Arora, Sumit wrote:
Hi folks, I'm using mysql local_recipient_maps for rejecting email for unknown local users. Here are the changes in my main.cf local_recipient_maps = proxy:unix:passwd.byname $alias_maps virtual_alias_maps = mysql:/etc/postfix/mysql-relays.cf Here is my mysql-relays.cf hosts=16.123.123.123 user=root password=***** dbname=testDB table=users query = select emailaddress from users where emailaddress='%s' I'm able to query successfully. But I'm stuck as my requirement is to query database according to sender. Let's say some user with emailaddress 'sen...@myhostname.com' is sending email to my postfix and I need to validate him. query = select emailaddress from users where emailaddress='%s' && allowedusers='sen...@myhostname.com' Can anybody suggest me how can I get the sender email address in mysql-relays.cf on runtime. Thanks, Sumit Arora