Re: [exim] exim sometimes requeues messages after local_scan…

Top Page
Delete this message
Reply to this message
Author: Jack Bailey
Date:  
To: exim-users
Subject: Re: [exim] exim sometimes requeues messages after local_scan()

>> This morning my filter program (the exim child process) which uses
>> libspf2 to look up SPF records threw an error. The error is actually
>> generated by libspf2, written to stderr, and appears in the exim main
>> log, e.g.:
>
> As far as I can tell, this must be something that your local_scan function
> is doing, because it isn't something Exim normally does. (The return_fail
> mechanism used for the pipe transport isn't provided to local_scan
> functions.)


That was my thinking too, but the error only occurred when something
wrote to stderr, so I started looking at exim. I've been reading the
code and found this (exim-4.62):

$ nl -ba src/child.c
[snip]
   379    (void)close(inpfd[pipe write]);
   380    force fd(inpfd[pipe read], 0);
   381
   382    (void)close(outpfd[pipe read]);
   383    force fd(outpfd[pipe write], 1);
   384
   385    (void)close(2);
   386    (void)dup2(1, 2);


stdout and stderr share file descriptor 1. My code is looking for
results on stdout. SPF library output to stderr appears on stdout and
that trips up my stuff.

Jack