[exim] $local_part_suffix not set in router condition while …

Etusivu
Poista viesti
Vastaa
Lähettäjä: Lutz Preßler
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] $local_part_suffix not set in router condition while verifying? (4.67)
Hello,

this may be a bug: with 4.67 the following router

 localuser_missingfolder:
   driver = redirect
   local_part_suffix = +*
   condition = ${if exists {MAIL/$domain/USERS}\
               {${lookup{$local_part}lsearch{MAIL/$domain/USERS}\
               {${if !exists {MAIL/$domain/$local_part/.${substr_1:${lc:$local_part_suffix}}}}}}}}
   allow_fail
   data = :fail:Unknown mailbox folder


is not "behaving" as I want it to. For local adresses with +-suffix it should
fail routing if the corresponding delivery folder is not existing yet.
This does work correctly in address testing mode (and a later router with
local_part_suffix_optional is accepting the other ones and the delivery
transport is using $local_part_suffix just fine). But it seems not to work
while verifying. While evaluating condition the suffix is stipped off $local_part,
but $local_part_suffix not set. At least the condition is true for
known users with existing (and nonexisting) suffixes - and so they are
all rejected.

Reading 3.12 in the spec

  * The local_part_prefix and local_part_suffix options can specify that the
    local parts handled by the router may or must have certain prefixes and/or
    suffixes. If a mandatory affix (prefix or suffix) is not present, the
    router is skipped. These conditions are tested first. When an affix is
    present, it is removed from the local part before further processing,
    including the evaluation of any other conditions.
[...]
  * If the local_parts option is set, the local part of the address must be in
    the set of local parts that it defines. If local_part_prefix or
    local_part_suffix is in use, the prefix or suffix is removed from the local
    part before this check. If you want to do precondition tests on local parts
    that include affixes, you can do so by using a condition option (see below)
    that uses the variables $local_part, $local_part_prefix, and
    $local_part_suffix as necessary.


I don't think this is intended behaviour.
Any other opinion? Shall I file a bug report in bugzilla?

An earlier (vacation) router with local_part_suffix = +*,
local_part_suffix_optional is using !def:local_part_suffix
in its condition (not to be considered for suffixed
addresses), but agian with no_verify.

I'll do the check now manually for the time beeing.


Lutz


-- 
Lutz Preßler  <Lutz.Pressler@???>    http://www.SerNet.DE/
SerNet Service Network GmbH, Bahnhofsallee 1b, D-37081 Göttingen
Tel.: +49-551-370000-2,      FAX: +49-551-370000-9
AG Göttingen, HRB 2816,      GF: Dr. Johannes Loxen