Re: [exim] how to make use of custom variables in a router

Top Page

Reply to this message
Author: Jürgen Edner
To: exim-users
Subject: Re: [exim] how to make use of custom variables in a router
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

    driver      = accept
    set = r_dir = ${extract{folder}{${lookup{$local_part} \
    debug_print = r_dir=$r_dir
    condition   = ${if exists{/home/imappublic/.$r_dir/cur}}
    local_parts = ${extract{folder}{${lookup{$local_part} \
    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
  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/
  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.