Hi Jeremy,
>> -> Result: "DEBUG: local_part=my-pub-folder r_1= r_2="
>
> Let's see the entire debug output, from the start of the
> router being run to that point.
Ok, here is a simplified router configuration
public_folder_maildir:
driver = accept
set = r_dir = ${extract{folder}{${lookup{$local_part} \
lsearch{/etc/pubfolders}}}{$value}}
debug_print = r_dir=$r_dir
condition = ${if exists{/home/imappublic/.$r_dir/cur}}
local_parts = ${extract{folder}{${lookup{$local_part} \
lsearch{/etc/pubfolders}}}{$value}}
transport = public_folder_maildir_delivery
This the debug trace information which I captures as I sent an
email to spam-mail@???
7828 --------> public_folder_maildir router <--------
7828 local_part=spam-mail domain=mydomain.de
7828 checking local_parts
7828 search_open: lsearch "/etc/pubfolers"
7828 search_find: file="/etc/pubfolders"
7828 key="spam-mail" partial=-1 affix=NULL starflags=0
7828 LRU list:
7828 5/etc/pubfolders
7828 5/etc/aliases
7828 End
7828 internal_search_find: file="/etc/pubfolders"
7828 type=lsearch key="spam-mail"
7828 file lookup required for spam-mail
7828 in /etc/pubfolders
7828 lookup yielded: path=./ folder=Spam-Mail group=users
7828 spam-mail in "Spam-Mail"? yes (matched "Spam-Mail")
7828 r_dir=
7828 checking "condition" "${if exists{/home/imappublic/
.$r_dir/cur}}"...
7828 public_folder_maildir router skipped: condition failure
As you can see the lookup succeeds but the variable 'r_dir# isn't
set at all.
Regards
Juergen