[Exim] Question about self defined router (was: Questions us…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tim Tassonis
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [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:

2002-04-16 17:19:22 16xUjq-0000ct-00 <= timtas@???
H=localhost.localdomain (trivadis.com) [127.0.0.1] P=smtp S=573 2002-04-16
17:19:23 16xUjq-0000ct-00 => tim.tassonis@??? R=smime_router
T=smime_transport 2002-04-16 17:19:23 16xUjq-0000ct-00 Completed

But the mail never gets there.

Does anybody realize what I'm doing wrong?

ByeTim