Re: [Exim] environment vars & extension addresses

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jason R. Mastaler
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] environment vars & extension addresses
Philip Hazel <ph10@???> writes:

> Come to think of it, YES! There is an "environment" option for the
> pipe transport. You can add anything you like to it. Why had I
> forgotten that simple answer? Check it out in TFM.


Excellent. Can this `environment' option be used in user's .forward
(filter) files, or only in the Exim config file?

BTW, here is how I'm using it to add Postfix equivalent $EXTENSION and
$RECIPIENT variables to the environment:

address_pipe: 
  driver = pipe 
  return_fail_output 
  environment = EXTENSION=${sg{$local_part_suffix}{(^\\-|\\+)}{}}:\ 
                RECIPIENT=$local_part$local_part_suffix@$domain 


Since $local_part_suffix includes the suffix character (usually `+' or
`-'), I had to remove it. If you end up adding additional environment
variables, a nice one would be a representation of $local_part_suffix
but without the leading suffix character. This is how Postfix's
$EXTENSION and qmail's $EXT work.

> I'm always open-minded!


That's a nice change of pace. Many MTA authors/maintainers are
anything but.