Re: Postfix and virtual users with additional_condition

2009-03-23 Thread Victor Duchovni
On Mon, Mar 23, 2009 at 03:26:36PM +0100, Sebastian Chociwski wrote: > > Identity mappings (fixedu...@example.com -> fixedu...@example.com) are > > not terribly useful unless you also have a catch-all address. Why do you > > have these at all? > > Becouse I thought it is responsible for delivering

Re: Postfix and virtual users with additional_condition

2009-03-23 Thread Sebastian Chociwski
Victor Duchovni pisze: > On Mon, Mar 23, 2009 at 09:41:14AM +0100, Sebastian Chociwski wrote: > >>> On Fri, Mar 20, 2009 at 11:35:09PM +0100, Sebastian Chociwski wrote: >>> > WHICH CONFIGURATION SETTINGS DO YOU EXPECT DO THIS? Of course I thought it was _email2email.cf . Now I see how wrong I was.

Re: Postfix and virtual users with additional_condition

2009-03-23 Thread Victor Duchovni
On Mon, Mar 23, 2009 at 09:41:14AM +0100, Sebastian Chociwski wrote: > > On Fri, Mar 20, 2009 at 11:35:09PM +0100, Sebastian Chociwski wrote: > > > >> I am (almost ;) ) 100% sure that only mail could be delivered is in ONE > >> mysql db. > > > > What in your Postfix configuration do you expect to

Re: Postfix and virtual users with additional_condition

2009-03-23 Thread Brian Evans - Postfix List
Sebastian Chociwski wrote: > myhostname = suse11.eurimage.pl > mydestination = suse11.eurimage.pl, localhost, localhost.localdomain > mynetworks = 127.0.0.0/8 > virtual_alias_domains = > virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, > mysql:/etc/postfix/mysql-virtual_e

Re: Postfix and virtual users with additional_condition

2009-03-23 Thread Sebastian Chociwski
Hello, sorry for the trouble i couse but as you may nothice I'm not very experienced user . I am really grateful for your help. I DO. Victor Duchovni pisze: > On Fri, Mar 20, 2009 at 11:35:09PM +0100, Sebastian Chociwski wrote: > >> I am (almost ;) ) 100% sure that only mail could be delivered is

Re: Postfix and virtual users with additional_condition

2009-03-21 Thread Victor Duchovni
On Fri, Mar 20, 2009 at 11:35:09PM +0100, Sebastian Chociwski wrote: > I am (almost ;) ) 100% sure that only mail could be delivered is in ONE > mysql db. What in your Postfix configuration do you expect to reject mail not listed in that MySQL table? > _email2email.cf points at DB I use to decid

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Sebastian Chociwski
I am (almost ;) ) 100% sure that only mail could be delivered is in ONE mysql db. serwersuse111:~ # cat /etc/postfix/main.cf queue_directory=/var/spool/postfix command_directory=/usr/sbin daemon_directory = /usr/lib/postfix data_directory=/var/lib/postfix mail_owner=postfix myhostname = suse11.eur

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Victor Duchovni
On Fri, Mar 20, 2009 at 10:17:28PM +0100, Sebastian Chociwski wrote: > I knew it must be something I am missing but the mails are still delivered. > MYSQL cut : > mailactiv int(1) 0 > mail varchar(1) n > email2email.cf : > query = SELECT email FROM

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Sebastian Chociwski
I knew it must be something I am missing but the mails are still delivered. MYSQL cut : mailactivint(1) 0 mailvarchar(1) n email2email.cf : query = SELECT email FROM users WHERE email='%s' AND mailactiv= 1 (checked as well : query = SELECT ema

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Victor Duchovni
On Fri, Mar 20, 2009 at 08:19:42PM +0100, Sebastian Chociwski wrote: > OH sorry for that , heres more information: > Activmail is integer. Then the correct SQL query syntax is: activmail=1 NOT activmail='1' This is basic SQL, not Postfix. -- Viktor. Disclaimer: off-

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Sebastian Chociwski
OH sorry for that , heres more information: Activmail is integer. I checked the varchar "mail" column with default 'y' and got : query = SELECT email FROM users WHERE email='%s' AND mail='y' serwersuse111:~ # postmap -q sebastian...@example.pl mysql:/etc/postfix/mysql-virtual_email2

Re: Postfix and virtual users with additional_condition

2009-03-20 Thread Victor Duchovni
On Fri, Mar 20, 2009 at 03:59:05PM +0100, Sebastian Chociwski wrote: > query = SELECT email FROM users WHERE email='%s' > AND mailactiv='1' Is the "mailactiv" column integer-valued or string-valued? > NOT WORK. You really should report output from tests with "postmap -q". "NOT WOR

Postfix and virtual users with additional_condition

2009-03-20 Thread Sebastian Chociwski
Hello, I'm trying to make additional conditions work on my system : Suse 11.1 , postfix 2.5.5 and mysql 5.0.67. Forwarding and delivering mails to V_USERS works fine for me but I need to make additional condition so I make new column mailactiv with default '1'. If the mailactiv is set to '1' mail