[Exim] environment vars & extension addresses

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jason R. Mastaler
Päiväys:  
Vastaanottaja: exim-users
Aihe: [Exim] environment vars & extension addresses
I'm running a script that is invoked from the user's .forward and
which needs the following information to do its processing:

- the full envelope sender address

- the full envelope recipient address

- the address extension (e.g, with mail sent to johndoe+foo, the
address extension is foo)

With qmail and Postfix this is very easy as all three are provided as
environment variables (SENDER, RECIPIENT, and EXTENSION).

I'm having more trouble with Exim. Exim appears to set a SENDER
variable, so that is straightforward, but what about the other two?

There is no RECIPIENT variable, so is there a reliable way to discern
this info from the other variables? Perhaps LOCAL_PART + DOMAIN?

The address extension seems to just get tossed. I added `suffix = +*'
to both the "localuser" and "userforward" directors in my Exim config
file. Then I sent a message to "johndoe+foo" on my system. The
environment as seen from johndoe's .forward looks like:

USER=johndoe
HOME=/home/johndoe
DOMAIN=exim.la.mastaler.com
LOGNAME=johndoe
PATH=/usr/bin
SENDER=jasonrm@???
SHELL=/bin/sh
QUALIFY_DOMAIN=exim.la.mastaler.com
MESSAGE_ID=E15ykFk-0001Is-00
LOCAL_PART=johndoe

What happened to the `+foo'? There is no mention of it in the
environment. Is there a way to fix this?

Thanks.