[exim] Re: Errors in transport filters

Top Page
Delete this message
Reply to this message
Author: Felix Schwarz
Date:  
To: exim-users
Subject: [exim] Re: Errors in transport filters
Philip Hazel wrote:
> Which release of Exim? A bug that probably relates to this was fixed at
> release 4.51.


I compiled Exim 4.60 on a local CentOS build machine. This is my Exim
config:
-------------------------------------------
begin routers

transport_filter_router:
domains = xams.example
condition = ${if ! eq {$received_protocol}{scanned} }
driver = accept
transport = transport_filter_transport
no_verify

ablage_router:
domains = xams.example
driver = accept
transport = ablage_transport
(...)


begin transports
transport_filter_transport:
driver = pipe
command = /usr/sbin/exim -oi -oMr scanned -f '$sender_address'
'$local_part@$domain'
transport_filter = /tmp/test.py
log_output = true
temp_errors = *
user = exim
group = exim
return_path_add = false


ablage_transport:
driver = appendfile
directory = /var/mail/test
maildir_format
user = virtualmail
group = virtualmail
delivery_date_add
envelope_to_add
return_path_add
(...)
-------------------------------------------


/tmp/test.py looks like this:
-------------------------------------------
#!/usr/bin/env python

import sys

input = sys.stdin.read()

fp = file('/tmp/1.log', 'w')
fp.write(input)
fp.close()

print input,
sys.exit(1)
-------------------------------------------

Sending a mail with
exim -d-all+transport -bm realuser@??? < testmessage.msg
-------------------------------------------
Exim version 4.60 uid=0 gid=0 pid=2838 D=10000000
Berkeley DB: Sleepycat Software: Berkeley DB 4.2.52: (February 22, 2005)
(...)
cwd=/root 4 args: exim -d-all+transport -bm realuser@???
trusted user
admin user
LOG: MAIN
<= root@??? U=root P=local S=2739
id=000001c53b6a$11454778$abe01a9e@???
>>>>>>>>>>>>>>>> Exim pid=2838 terminating with rc=0 >>>>>>>>>>>>>>>>

Exim version 4.60 uid=93 gid=93 pid=2839 D=10000000
(...)
>>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>

--------> realuser@??? <--------
direct command:
argv[0] = /tmp/test.py
direct command after expansion:
argv[0] = /tmp/test.py
transport_filter_transport transport entered
direct command:
argv[0] = /tmp/test.py
direct command after expansion:
argv[0] = /tmp/test.py
transport_filter_transport transport entered
direct command:
argv[0] = /usr/sbin/exim
argv[1] = -oi
argv[2] = -oMr
argv[3] = scanned
argv[4] = -f
argv[5] = $sender_address
argv[6] = $local_part@$domain
direct command after expansion:
argv[0] = /usr/sbin/exim
argv[1] = -oi
argv[2] = -oMr
argv[3] = scanned
argv[4] = -f
argv[5] = root@???
argv[6] = realuser@???
Writing message to pipe
writing data block fd=9 size=67 timeout=3600
process 2843 running as transport filter: write=10 read=11
writing data block fd=10 size=2739 timeout=3600
process 2844 writing to transport filter
copying from the filter
waiting for filter process
filter process returned 1
waiting for writing process
end of filtering transport writing: yield=0
errno=-24 more_errno=1
transport_filter_transport transport returned PANIC for
realuser@???
LOG: MAIN PANIC
== realuser@??? R=transport_filter_router
T=transport_filter_transport defer (-24): Transport filter process
failed (1)
>>>>>>>>>>>>>>>> Exim pid=2839 terminating with rc=0 >>>>>>>>>>>>>>>>


So far everything looks good to me. The problem is that this Exim
instance passed the output of test.py to another Exim as you can see in
main.log (sorry for the wrapping):
-------------------------------------------
2005-12-08 12:50:29 1EkKI9-0000jm-E6 <=
root@??? U=root P=local S=2739
id=000001c53b6a$11454778$abe01a9e@???
2005-12-08 12:50:30 1EkKI9-0000jm-E6 == realuser@???
R=transport_filter_router T=transport_filter_transport defer (-24):
Transport filter process failed (1)
2005-12-08 12:50:30 1EkKI9-0000jp-Oe <=
root@??? U=exim P=scanned S=363
2005-12-08 12:50:30 1EkKI9-0000jp-Oe => realuser <realuser@???>
R=ablage_router T=ablage_transport
2005-12-08 12:50:30 1EkKI9-0000jp-Oe Completed
-------------------------------------------

The last 3 items are related to the new exim instance which delivers my
mail. This last instance should not be started.

fs