[Exim] Re: Passing Environment Variables to a pipe

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Patrick Starrenburg
Date:  
À: exim-users
Nouveaux-sujets: Re: [Exim] Re: Passing Environment Variables to a pipe [way OT]
Sujet: [Exim] Re: Passing Environment Variables to a pipe
Kirill Miazine <km@???> writes:

> >   environment = EXTENSION=${substr_1:local_part_suffix}:\
>                                       ^ <- this should be doubled
> >                 RECIPIENT=$local_part$local_part_suffix@$domain

>
> This is wrong! Better to say (note the ";" used as the list separator):
>
> environment = <; EXTENSION=${substr_1:$local_part_suffix} ; \
>                  RECIPIENT=$local_part$local_part_suffix@$domain

>
> You're also missing the "$" in $local_part_suffix
>
> Besides, your transport was badly configured. environment option expects
> a list. All colons should be doubled unless you use something else to
> separate list items. See my example above.


Hi guys

If I could add some further info here. Kirill Dan is trying to get Exim,
Procmail and TMDA working together. I didn't answer earlier because I don't
use Procmail but I have sucessfully got Exim 4 & TMDA to work together -
and Dan I agree there is not much info on the combination yet :-)

Some points:

* Dan got his environment setting from TMDA website setting for Exim but he did
mistype one part missing a $. But my setup below, using same environment
setting from website works fine.
* I am interested to clarify this (also because there is not that much info on
using Exim 4 with TMDA) the Exim spec doc says that environment is a string
which is expanded to colon separated list of values so shouldn't mine below be
OK? It is working correctly.

Dan why don't you try out Exim -> TMDA functionality without procmail to see
if it works OK then plug procmail back in? Can't help you on the procmail side
but happy to help with Exim/TMDA.

Cheers

PS

================================
tmda_router:
driver = accept
check_local_user
no_verify
no_expn
local_part_suffix = -*
local_part_suffix_optional
transport = tmda_pipe

tmda_pipe:
  driver = pipe
  command = /usr/bin/python2 /usr/bin/tmda-filter
  return_path_add
  delivery_date_add
  envelope_to_add
  user = $local_part
  group = tmda
  environment = EXTENSION=${substr_1:$local_part_suffix}:\
                RECIPIENT=$local_part$local_part_suffix@$domain