вот такое я условие ставлю в начале
begin acl
.ifdef GREYLIST_ENABLED
greylist_acl:
deny condition = ${if eq{${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}}}{}{yes}{no}} ------- вот я ставлю
# For regular deliveries, check greylist.# check greylist tuple, returning "accepted", "deferred" or "unknown"
# in acl_m8, and the record id in acl_m9warn set acl_m8 = ${lookup mysql{GREYLIST_TEST}{$value}{result=unknown}}
# here acl_m8 = "result=x id=y"set acl_m9 = ${extract{id}{$acl_m8}{$value}{-1}}
# now acl_m9 contains the record id (or -1)set acl_m8 = ${extract{result}{$acl_m8}{$value}{unknown}}
# now acl_m8 contains unknown/deferred/accepted# check if we know a certain triple, add and defer message if not
accept
# if above check returned unknown (no record yet)
condition = ${if eq{$acl_m8}{unknown}{1}}
# then also add a record
condition = ${lookup mysql{GREYLIST_ADD}{yes}{no}}# now log, no matter what the result was
# if the triple was unknown, we don't need a log entry
# (and don't get one) because that is implicit through
# the creation time above.
.ifdef GREYLIST_LOG_ENABLED
warn condition = ${lookup mysql{GREYLIST_LOG}}
.endif
# check if the triple is still blocked
accept
# if above check returned deferred then defer
condition = ${if eq{$acl_m8}{deferred}{1}}
# and note it down
condition = ${lookup mysql{GREYLIST_DEFER_HIT}{yes}{yes}}# use a warn verb to count records that were hit
warn condition = ${lookup mysql{GREYLIST_OK_COUNT}}# use a warn verb to set a new expire time on automatic records,
# but only if the mail was not a bounce, otherwise set to now().
warn !senders = : postmaster@*
condition = ${lookup mysql{GREYLIST_OK_NEWTIME}}
warn senders = : postmaster@*
condition = ${lookup mysql{GREYLIST_OK_BOUNCE}}deny
.endifесли так
deny condition = ${if eq{${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}}}{}{yes}{no}}То все письма проходят вообще без проверки Greylist
если так
deny condition = ${if eq{${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}}}{}{no}{yes}}
То тогда все письма проходят проверку Greylist , т.е. реакции на домен
??
deny condition = ${if eq{${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}}}{}{no}{yes}}Вы, на мой взгляд, производите не вполне корректное сравнение (eq) отсутсвующего результата с пустой строкой.
В то же время lookup сам может вернуть произвольный результат:
${lookup <search type> {<query>} {<string1>} {<string2>}}
....
If the lookup succeeds, <string1> is expanded and replaces the entire item.
....
If the lookup fails, <string2> is expanded and replaces the entire item.Соответсвенно, стоит попробовать так:
deny condition = ${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}{no}{yes}}
>
>
> deny condition = ${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}{no}{yes}}
>Тоже самое не работает ((
>>
>>
>> deny condition = ${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}{no}{yes}}
>>
> Тоже самое не работает ((А дело не в том, что у Вас в таблице 'email', а ищете Вы '$domain' ?
>>>
>>>
>>> deny condition = ${lookup mysql{SELECT email FROM whitelist WHERE email = '$domain'}{no}{yes}}
>>>
>> Тоже самое не работает ((
> А дело не в том, что у Вас в таблице 'email', а
> ищете Вы '$domain' ?не-а вот
+------------+
| email |
+------------+
| cisco.com |
| ua.fm |
| bigmir.net |
| meta.ua |
| mail.ru |
| bk.ru |
| gmail.com |
| i.ua |
+------------+
>> Тоже самое не работает ((
> А дело не в том, что у Вас в таблице 'email', а
> ищете Вы '$domain' ?Да к тому же, по логике, это должен быть $sender_address_domain ...
When an ACL is running for a RCPT command, $domain contains the domain of the recipient address.
Впрочем, что это я Вам spec пересказываю?... Сами почитайте.