Hanford, Seth wrote:

relaydb only reads the beginning of the headers (up to a certain number of Received: lines), then just terminates. It doesn't read the entire data it gets piped. Now, if the program that pipes the data to relaydb doesn't handle that case gracefully (usually SIGPIPE i.e. "broken pipe"), it might return a failure.

That sounds about right. Either patch relaydb to read and ignore the rest of the data, or write a shell script around it that eats the rest of the data.


The patch would involve putting two lines of code in the main function of relaydb:

        char eatem[1024];
        while(read(0, eatem, 1024));

The dummy buffer (named "eatem") should be with the rest of the variable declarations, and the while line should be the last thing the main function does before it returns.

The shell script version goes like this:

#!/bin/sh

/usr/local/bin/relaydb "$@"
cat > /dev/null

You should be able to use that shell script instead of calling relaydb directly, and use the same arguments.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to