RE: [Exim] Re: Passing Environment Variables to a pipe

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dan Egli
Dátum:  
Címzett: patrick-dated-1039876036.3ba1bc
CC: exim-users
Tárgy: RE: [Exim] Re: Passing Environment Variables to a pipe
Ok. I did some checking and TMDA works great if I don't use procmail.
But sorting over 500 messages a day manually is not an option. There has
to be a way to make the environment variables pass across to procmail
and then to TMDA?

Help!?

Thanks!

-- Dan

-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On
Behalf Of Patrick Starrenburg
Sent: Saturday, November 30, 2002 8:00 AM
To: exim-users@???
Subject: [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





--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##