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 users WHERE email='%s' AND mailactiv= 1
(checked as well : query = SELECT email FROM users WHERE email='%s' AND
mailactiv=1)
And some log again :
// user with mailactiv default set to 1
serwersuse111:~ # postmap -q [email protected]
mysql:/etc/postfix/mysql-virtual_email2email.cf
[email protected]
// user with mailactiv changed to 0 with phpmyadmin (maybe it matters?)
serwersuse111:~ # postmap -q [email protected]
mysql:/etc/postfix/mysql-virtual_email2email.cf
serwersuse111:~ #

and maillog from delivery :
Mar 20 22:06:55 serwersuse111 postfix/smtpd[18723]: connect from
mail-bw0-f161.google.com[209.85.218.161]
Mar 20 22:06:56 serwersuse111 postfix/smtpd[18723]: 07EA440E19F:
client=mail-bw0-f161.google.com[209.85.218.161]
Mar 20 22:06:56 serwersuse111 postfix/cleanup[18732]: 07EA440E19F:
message-id=<[email protected]>
Mar 20 22:06:56 serwersuse111 postfix/qmgr[18697]: 07EA440E19F:
from=<[email protected]>, size=4787, nrcpt=1 (queue active)
Mar 20 22:06:56 serwersuse111 amavis[5402]: (05402-05) (!!)WARN: all
primary virus scanners failed, considering backups
Mar 20 22:07:13 serwersuse111 postfix/smtpd[18739]: warning: dict_nis_init:
NIS domain name not set - NIS lookups disabled
Mar 20 22:07:13 serwersuse111 postfix/smtpd[18739]: connect from
localhost[127.0.0.1]
Mar 20 22:07:13 serwersuse111 postfix/smtpd[18739]: 80AAA40E3E0:
client=localhost[127.0.0.1]
Mar 20 22:07:13 serwersuse111 postfix/cleanup[18732]: 80AAA40E3E0:
message-id=<[email protected]>
Mar 20 22:07:13 serwersuse111 postfix/smtpd[18739]: disconnect from
localhost[127.0.0.1]
Mar 20 22:07:13 serwersuse111 postfix/qmgr[18697]: 80AAA40E3E0:
from=<[email protected]>, size=5240, nrcpt=1 (queue active)
Mar 20 22:07:13 serwersuse111 amavis[5402]: (05402-05) Passed CLEAN,
[209.85.218.161] [209.85.218.161] <[email protected]> ->
<[email protected]>, Message-ID:
<[email protected]>, mail_id:
zN+0L8bSr-Og, Hits: 1.36, size: 4787, queued_as: 80AAA40E3E0, 17228 ms
Mar 20 22:07:13 serwersuse111 postfix/smtp[18734]: 07EA440E19F:
to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=18,
delays=0.41/0.01/0/17, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=05402-05,
from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 80AAA40E3E0)
Mar 20 22:07:13 serwersuse111 postfix/qmgr[18697]: 07EA440E19F: removed
Mar 20 22:07:13 serwersuse111 postfix/virtual[18740]: 80AAA40E3E0:
to=<[email protected]>, relay=virtual, delay=0.12,
delays=0.05/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
Mar 20 22:07:13 serwersuse111 postfix/qmgr[18697]: 80AAA40E3E0: removed



Victor Duchovni pisze:
> 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.
>
Good to know. Always open to learn new things.
And sorry to say it - I'm still not able to make it work.

-- 
best regards,
Sebastian Chociwski

Reply via email to