Sorry!! Could not find anything relevant....

Need help!

-----Original Message-----
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of suomi
Sent: Tuesday, November 10, 2009 3:05 PM
To: postfix-users@postfix.org
Subject: Re: Required sender email address while table lookup for rejecting 
mails for unknown local users

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
>

Reply via email to