Re: [Exim] Bug in prefix generic director option?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John R. Shearer
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] Bug in prefix generic director option?
>> It appears that the prefix definition is not being subjected to
>> string expansion. I don't know if this qualifies as a bug report
>> or a feature request, but I do think that it would be consistent to
>> expand prefix/suffix definitions.
>
> From: Dennis Davis <D.H.Davis@???>
>
> You don't say what version of exim you are using. However
> prefix/suffix are exim3 options. Their exim4 equivalents are
> local_part_prefix and local_part_suffix. Both exim3 and exim4
> manuals document these options as string lists that aren't expanded.
> So this would be a feature request, not a bug report.


Dennis:

Thanks for the reply. Exim version is 3.35; sorry for the critical
omission.

In case anyone is interested, here's my work-around. It is not perfect in
that if the user's mailbox contains a dash then this director will produce
undesirable results.

# Define date macro
THE_DATE = ${lc:${extract{3}{ }{$tod_full}}${extract{4}{ }{$tod_full}}}

  dateprefix_director:
    driver = smartuser
    # Note: Prefixes are not subject to string expansion,
    # so instead of 'prefix = THE_DATE' we do this...
    condition = "${if \
      match {THE_DATE} {${extract{1}{-}{${local_part}}}} \
      {1} {0} \
    }"
    new_address = ${extract{2}{-}{${local_part}}}@${domain}



- John R. S.