Hello everyone,
Is there any way to increase verbosity of debugging router condition? It's not
enough in one complicated case I have - I need (incoming mail) router to skip
one (outgoing) address and can't get it to work:
condition = ${if and { \
{ !eq {$local_part@$domain}
{${readfile{/home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out}}} } \
...
{ exists{/home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.in} } \
{ !eq {$received_protocol} {filtered} } \
The .out file contains address for copying outgoing mail.
Debugging router seems to get correct local part and domain:
local_part=fout domain=da6.promo.pl
Ye, this expression doesn't seem to work and I don't know any way of debugging
this in expression debugging mode (exim -be):
{${readfile{/home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out}}}
Anybody knows how to debug such conditions?
--------> copy_in_virtual_domain router <--------
local_part=fout domain=da6.promo.pl
checking "condition"
search_open: lsearch "/etc/virtual/domainowners"
cached open
search_find: file="/etc/virtual/domainowners"
key="da6.promo.pl" partial=-1 affix=NULL starflags=1
LRU list:
:/etc/virtual/domainowners
:/etc/virtual/domains
End
internal_search_find: file="/etc/virtual/domainowners"
type=lsearch key="da6.promo.pl"
cached data used for lookup of da6.promo.pl
in /etc/virtual/domainowners
lookup yielded: da6
search_open: lsearch "/etc/virtual/domainowners"
cached open
search_find: file="/etc/virtual/domainowners"
key="da6.promo.pl" partial=-1 affix=NULL starflags=1
LRU list:
:/etc/virtual/domainowners
:/etc/virtual/domains
End
internal_search_find: file="/etc/virtual/domainowners"
type=lsearch key="da6.promo.pl"
cached data used for lookup of da6.promo.pl
in /etc/virtual/domainowners
lookup yielded: da6
calling copy_in_virtual_domain router
rda_interpret
(file): /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.in
search_open: lsearch "/etc/virtual/domainowners"
cached open
search_find: file="/etc/virtual/domainowners"
key="da6.promo.pl" partial=-1 affix=NULL starflags=1
LRU list:
:/etc/virtual/domainowners
:/etc/virtual/domains
End
internal_search_find: file="/etc/virtual/domainowners"
type=lsearch key="da6.promo.pl"
cached data used for lookup of da6.promo.pl
in /etc/virtual/domainowners
lookup yielded: da6
expanded: /home/da6/.in
18 bytes read from /home/da6/.in
file is not a filter file
parse_forward_list: fin@???
extract item: fin@???
copy_in_virtual_domain router generated fin@???
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by copy_in_virtual_domain router (unseen)
envelope to: fout@???
transport: <none>
"unseen" set: replicated fout@???
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
copy_out_virtual_domain:
driver = redirect
condition = ${if and { \
{
exists{/home/${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out} } \
{ !eq {$received_protocol} {filtered} } \
{ !eq {$local_part@$domain}
{${readfile{/home/${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out}}} } \
} \
}
file
= /home/${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out
unseen
copy_in_virtual_domain:
driver = redirect
condition = ${if and { \
{ !eq {$local_part@$domain}
{${readfile{/home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.out}}} } \
{ exists{/home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.in} } \
{ !eq {$received_protocol} {filtered} } \
} \
}
file = /home/${lookup{$domain}lsearch*{/etc/virtual/domainowners}
{$value}}/.in
unseen
--
Marcin Krol