Auteur: Tim Tassonis Date: À: exim-users Sujet: [Exim] Question about self defined router (was: Questions using transport filter)
Hi
In order to process all outgoing mails in exim 3, I setup a router and an
according transport to make sure all mail is piped through my command:
#
# Not at the begginning of transport section, since order does not matter
#
smime_transport:
driver = pipe
command = "/opt/exim/bin/smime_transport -f ${sender_address} -d
${pipe_addresses}" prefix =
suffix =
check_string =
escape_string =
# for debugging change return_output to true
return_output = false
return_path_add = false
user = mail
group = mail
path = "/bin:/sbin:/usr/bin:/usr/sbin"
current_directory = "/var/log/exim"
#
# At the beginning of router section since "ORDER DOES MATTER"
#
smime_router:
condition = "${if eq {$received_protocol}{smime} {0}{1}}"
driver = domainlist
route_list = "*"
transport = smime_transport
errors_to = timtas@???
My testscript /opt/exim/bin/smime_transport looks as follows (and as
proposed):#!/bin/ksh
tmpmail=/tmp/tmpmail_$$.txt
logfile=/tmp/smime_transport_$$.log
cat >$tmpmail
cat $tmpmail >> $logfile
/opt/exim/bin/exim -oMr smime < $tmpmail
#rm -f $tmpmail
exit 0
The script is called fine on every outgoing mail, gets the maildata (it is
stored in tmpmail), but then the delivery is finished. In the mainlog I
get: