[exim] condition failure

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Daniel Lafraia
Data:  
Para: exim-users
Assunto: [exim] condition failure
Guys.

I'm having troubles with the "condition" option in a router. I want to
setup a router that will only work if the address is not listed in a dbm
(each user has a separate dbm file). It will be basically a whitelist
router (everything else is considered blacklist). For some reason it
does not work.

Here's what I have (router config):

CATATUDO_LIST =
/mail/mailbox/${substr_0_1:$local_part}/${substr_1_1:$local_part}/$local_part/catatudo.list.db

catatudo_notok:
driver = accept
check_local_user
transport = catatudo_delivery_withreply
user = ${local_part}
condition = ! ${if exists {CATATUDO_LIST} {
${lookup{$sender_address}dbm*@{CATATUDO_LIST}} } { no } }
cannot_route_message = Unknown User
no_verify

The DB looks like this:

sender@??? : no

Note: It would be better to have just the key (without a value), but I'm
not sure how the lookup would work this way.

Here's the debug. When the lookup yielded "no", the router should NOT be
called, is that correct? Later in the transport I'll implement something
to reply to the sender with a "double checker" (a webpage that will
release the message and add the sender automatically to whitelist).

--------> catatudo_notok router <--------
local_part=lafraia-mail domain=domain.com
checking for local user
finduser used cached passwd data for lafraia-mail
checking "condition"
search_open: dbm "/mail/mailbox/l/a/lafraia-mail/catatudo.list.db"
search_find: file="/mail/mailbox/l/a/lafraia-mail/catatudo.list.db"
key="sender@???" partial=-1 affix=NULL starflags=2
LRU list:
1/mail/mailbox/l/a/lafraia-mail/catatudo.list.db
1/etc/mail/aliases.db
1/etc/mail/virtusertable/i/iron.com.br/virtusertable.db
1/etc/mail/local-domains.db
End
internal_search_find:
file="/mail/mailbox/l/a/lafraia-mail/catatudo.list.db"
type=dbm key="sender@???"
file lookup required for sender@???
in /mail/mailbox/l/a/lafraia-mail/catatudo.list.db
lookup yielded: no
calling catatudo_notok router
catatudo_notok router called for lafraia-mail@???
domain = domain.com
set transport catatudo_delivery_withreply
finduser used cached passwd data for lafraia-mail
queued for catatudo_delivery_withreply transport: local_part =
lafraia-mail
domain = domain.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by catatudo_notok router
envelope to: lafraia-mail@???
transport: catatudo_delivery_withreply



I appreciate your attention.

Daniel Lafraia
Technical Director
Iron Internet
CCNP,CCDP

buyers: http://www.xcomprar.com/