On Tuesday, November 10, 2009 at 07:49 CET, "Arora, Sumit" <sumit.ar...@hp.com> wrote:
> 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 I assume this should be: 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. What does "validate the sender" mean? Check that the sender address, if it's one of your own domains, is a valid recipient address? Only allow a select number of sender addresses? Please be more complete. You do know that sender addresses are easily spoofed? [...] -- Magnus Bäck mag...@dsek.lth.se