[exim] Exim4 pipe email through two commands

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: David Hoepelman
Fecha:  
A: exim-users
Asunto: [exim] Exim4 pipe email through two commands
Hi,
I currently have a few adresses that are set up as follows (in a aliases file):

someemail: "|/usr/bin/somecommand -opt someoption"

However, I would like the message to pass through another command
first, much like normal shell pipeling:

user@computer: echo "someemailcontents" | /usr/bin/somefilter -n 5 |
/usr/bin/somecommand -opt someoption

There are a couple of ways I imagine I could do this:
1. hardcode the second command in the first script (=> saving all the
output and calling the command with that output on its input
afterwards)
2. Modify the aliases file so that the mail goes through 2 commands
(like shell pipelining)
3. Modify the router in the config file so all email of that router
will go through that filter first (all the "special" adresses are in a
seperate router directive)

However I do not know if 2 or 3 is possible with exim4. Can anyone
enlighten me on this?

Thanks,
David