Comment 0 for bug 1617808

Revision history for this message
Grintor (grintor) wrote : sendmail will not return exit code

The default behavior for sendmail is normally to return a status code on error as defined in sysexits.h. But on my ubuntu 16.04 default install, it only returns exit code 0 and then mails the error. This is behavior that is expected when ErrorMode=m in the options. But this happens even if I do:

echo test | sendmail -OErrorMode=p -ODeliveryMode=interactive <email address hidden>

In the above example, sendmail should print an error and return exit code 68 (EX_NOHOST) but it instead acts exactly as if ErrorMode=m and mails the message.