Hello all! I'd like to configure exim to use an external mailfilter to scan incoming mails, so I wrote the following router:
--- snip ---
##
## mailfilter incoming
##
mailfilter_incoming_director:
driver = manualroute
domains = +forward_domains
condition = "${if and { \
{ !eq {$received_protocol}{mailfilter} } \
{ eq
[EMAIL PROTECTED]/etc/exim4/whitelisted-recipients}}}{}
} \
} {yes}{no}}"
transport = mailfilter_incoming
route_list = "* localhost byname"
verify = false
--- snap ---
The file /etc/exim4/whitelisted-recipients looks similar to the following:
--- snip ---
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--- snap ---
Now if I run exim in debug mode with batched SMTP (exim4 -d -bS) and send a
mail to [EMAIL PROTECTED], debugging shows the following lines:
---
checking "condition"
search_open: lsearch "/etc/exim4/whitelisted-recipients"
search_find: file="/etc/exim4/whitelisted-recipients"
key="[EMAIL PROTECTED]" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/exim4/whitelisted-recipients
:/etc/exim4/forward-domains
End
internal_search_find: file="/etc/exim4/whitelisted-recipients"
type=lsearch key="[EMAIL PROTECTED]"
file lookup required for [EMAIL PROTECTED]
in /etc/exim4/whitelisted-recipients
lookup failed
calling mailfilter_incoming_director router
---
Ok so long, but if I do it again with [EMAIL PROTECTED], debbugging always
looks like that:
---
checking "condition"
search_open: lsearch "/etc/exim4/whitelisted-recipients"
search_find: file="/etc/exim4/whitelisted-recipients"
key="[EMAIL PROTECTED]" partial=-1 affix=NULL starflags=0
LRU list:
:/etc/exim4/whitelisted-recipients
:/etc/exim4/forward-domains
End
internal_search_find: file="/etc/exim4/whitelisted-recipients"
type=lsearch key="[EMAIL PROTECTED]"
file lookup required for [EMAIL PROTECTED]
in /etc/exim4/whitelisted-recipients
lookup yielded:
calling mailfilter_incoming_director router
---
So it always calls the mailfilter director no matter if the recipient's
address is listed in my whitelist.
What is wrong with that condition? I think the line should read "lookup
yieled: [EMAIL PROTECTED]", so the lookup result is expanded and can be
compared in my condition. Perhaps someone knows a better way how to
configure the router to do what it is intended to do.
Any help is greatly appreciated.
Cheers,
--
Christian Hertel
Netzwerk-Sicherheit/Netzwerk-Applikationen
infoServe GmbH
Nell-Breuning-Allee 6
D-66115 Saarbruecken
T: (0681) 8 80 08 - 59
F: (0681) 8 80 08 - 33
www.infos.de
mailto: [EMAIL PROTECTED]
Handelsregister: Amtsgericht Saarbrücken, HRB 11001
Erfüllungsort: Saarbrücken
Geschäftsführer: Dr. Werner Stein
Ust-IdNr.: DE168970599
smime.p7s
Description: S/MIME cryptographic signature
-- ## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
