I spent yesterday getting a transport filter to work. Eventually it did, but I don't understand why. Can anyone suggest some more effective way to debug such problems?
I tried -d with various options, but the result was not illuminating (see below for an excerpt). I tried to write to some files from the filter, but that mostly didn't work (and in some cases may have been responsible for the error). And I ran the filter standalone. Observations on the trace below: "R=filter_test T=easy_test defer (-24): transport filter process failed (2) while writing to /home/ross/mailutil/mbox" made me think the issue was actually in writing to the mbox. I think the actual error was in running the filter. Is that correct? "appendfile yields 10 with errno=-24 more_errno=2"? Could someone help me interpret that? What do the 10, -24, and 2 mean in general--that is, what kind of things do they indicate, and what do the specific values mean in this case? At one point I thought the problem was that the python process was trying to write some temp files, even though the code did not appear to be accessing the disk (i.e., no calls to open()). I updated the configuration file but did not restart the daemon. I thought since my tests were all using the command line (exim -bm) the state of the daemon wouldn't matter, but perhaps it does. Should it? I'm running exim 4.69 on Debian Lenny. Thanks. Ross Boylan --------------------------- tracing output from transport ------------------------- 20:49:28 changed uid/gid: local delivery to ross <[email protected]> transport=easy_test 20:49:28 uid=1000 gid=1000 pid=19933 20:49:28 auxiliary group list: <none> 20:49:28 home=/home/ross/mailutil current=/home/ross/mailutil 20:49:28 set_process_info: 19933 delivering 1R82Bz-0005BJ-PB to ross using easy_test 20:49:28 direct command: 20:49:28 argv[0] = /usr/bin/python 20:49:28 argv[1] = /home/ross/mailutil/linefilter.py 20:49:28 direct command after expansion: 20:49:28 argv[0] = /usr/bin/python 20:49:28 argv[1] = /home/ross/mailutil/linefilter.py 20:49:28 T: easy_test 20:49:28 appendfile transport entered 20:49:28 appendfile: mode=660 notify_comsat=0 quota=0 warning=0 20:49:28 file=/home/ross/mailutil/mbox format=unix 20:49:28 message_prefix=From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox}\n 20:49:28 message_suffix=\n 20:49:28 maildir_use_size_file=no 20:49:28 locking by lockfile fcntl 20:49:28 lock name: /home/ross/mailutil/mbox.lock 20:49:28 hitch name: /home/ross/mailutil/mbox.lock.corn.betterworld.us.4e7ff648.00004ddd 20:49:28 lock file created 20:49:28 mailbox /home/ross/mailutil/mbox is locked 20:49:28 writing to file /home/ross/mailutil/mbox 20:49:28 condition: def:return_path 20:49:28 result: true 20:49:28 expanding: $return_path 20:49:28 result: [email protected] 20:49:28 expanding: MAILER-DAEMON 20:49:28 result: MAILER-DAEMON 20:49:28 skipping: result is not used 20:49:28 expanding: From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox} 20:49:28 20:49:28 result: From [email protected] Sun Sep 25 20:49:28 2011 20:49:28 20:49:28 writing data block fd=6 size=50 timeout=0 20:49:28 process 19934 running as transport filter: write=9 read=10 20:49:28 writing data block fd=9 size=993 timeout=0 20:49:28 process 19935 writing to transport filter 20:49:28 copying from the filter 20:49:28 waiting for filter process 20:49:28 filter process returned 2 20:49:28 waiting for writing process 20:49:28 end of filtering transport writing: yield=0 20:49:28 errno=-24 more_errno=2 20:49:28 appendfile yields 10 with errno=-24 more_errno=2 20:49:28 search_tidyup called 20:49:28 easy_test transport returned PANIC for [email protected] 20:49:28 post-process [email protected] (10) 20:49:28 LOG: MAIN PANIC 20:49:28 == [email protected] R=filter_test T=easy_test defer (-24): transport filter process failed (2) while writing to /home/ross/mailutil/mbox ------------------------------------------------------------------------- -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
