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_email2email.cf sebastian...@example.pl
When I set 'mail' to 'n : serwersuse111:~ # postmap -q sebastian...@eurimage.pl mysql:/etc/postfix/mysql-virtual_email2email.cf serwersuse111:~ # So I guess it should work. But i does not and with 'n' set the mails are sill delivered to my email account. The log from delivery : Mar 20 20:08:44 serwersuse111 postfix/qmgr[17359]: 8382F40E3E0: from=<x...@gazeta.pl>, size=1547, nrcpt=1 (queue active) Mar 20 20:08:44 serwersuse111 postfix/smtpd[17396]: disconnect from localhost[127.0.0.1] Mar 20 20:08:44 serwersuse111 amavis[5402]: (05402-04) Passed CLEAN, [209.85.218.161] [209.85.218.161] <x...@gazeta.pl> -> <sebastian...@example.pl>, Message-ID: <917ea74b0903201212l537eb7d1v6f5d38900b03f...@mail.gmail.com>, mail_id: mlaPdXK+zvkO, Hits: 1.601, size: 1094, queued_as: 8382F40E3E0, 17678 ms Mar 20 20:08:44 serwersuse111 postfix/smtp[17367]: B463840E19F: to=<sebastian...@example.pl>, relay=127.0.0.1[127.0.0.1]:10024, delay=18, delays=0.29/0/0/18, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=05402-04, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 8382F40E3E0) Mar 20 20:08:44 serwersuse111 postfix/qmgr[17359]: B463840E19F: removed Mar 20 20:08:44 serwersuse111 postfix/virtual[17397]: 8382F40E3E0: to=<sebastian...@example.pl>, relay=virtual, delay=0.14, delays=0.07/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir) Mar 20 20:08:44 serwersuse111 postfix/qmgr[17359]: 8382F40E3E0: removed Mar 20 20:08:57 serwersuse111 postfix/smtpd[17376]: disconnect from mail-bw0-f161.google.com[209.85.218.161] Thank you for your time and sorry if I missed anything. Victor Duchovni pisze: > 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? > > >> query = SELECT email FROM users WHERE mailactiv='1' AND email='%s' > > Ditto, the order of constraints in SQL is not significant. > >> SETS THE WHOLE SYSTEM OUT OF ORDER. > > How are we supposed to know what "sets the whole system out of order" > means? > It mean the '/etc/rc.d/postfix restart' fails with the last setting.