--- Begin Message ---
Victor Duchovni wrote:
> On Tue, Nov 10, 2009 at 10:54:10AM -0500, Angus March wrote:
>
>   
>> I have a C program that calls Postfix's sendmail front-end using execv()
>> (after calling fork()).  I also have a waitpid() on the process, which
>> diligently checks the status value returned by sendmail. I tried to
>> sabotage an e-mail by inserting a sender that is un-RFC822, and there
>> were errors sent to the standard error, but the return status that
>> waitpid() received was 0. What's the proper way to be checking for
>> errors generated by sendmail? This could lead to lost mail, since silent
>> errors will allow for mail to be deleted when it is presumed sent.
>>     
>
> Postfix works hard to atomically spool the message to the "maildrop"
> directly with the least fuss possible. Any errors after that are reported
> via a bounce.
>
> If sendmail(1) is unable to en-queue a message, it reports an error.
> In all other cases (message en-queued), error reporting is asynchronous.
>
>   
    Well, that's the problem here. There was no bounce, obviously, since
the sender was bogus, and sendmail's return value (as taken from
waitpid()) was 0.

--- End Message ---


Reply via email to