Re: What might cause sendmail to close inp ut?

Sam Varshavchik <[email protected]> Mon, 24 Mar 2025 19:43:41 -0400
Newsgroups gmane.mail.imap.courier.general
Message-ID <[email protected]>
Alessandro Vesely writes:

> Hi,
>
> a zdkimfilter user receives this error from a cron job:
>
> Mar  2 00:40:02 picalibre zdkimsign[15641]: zdkimfilter[15645]:exiting
> Mar  2 00:40:02 picalibre zdkimsign[15641]: zdkimfilter, [15645]: abort on  
> Broken pipe (sig 13)
> Mar  2 00:40:02 picalibre zdkimsign[15641]: zdkimfilter terminated with  
> signal 6, rtc=3
>
> The "exiting" means the mail file was written out and the signing program  
> (called by the script, not the filter) was in that limbo after returning  
> from main().  The mail file was probably small enough to fit into a 4K  
> buffer.
>
> The script basically boils down to printf "..."| zdkimsign| sendmail -f  
> bounce-$VAR.  EPIPE should imply that sendmail bailed out.  Why?  I tried  
> some possible malformed values of VAR, but sendmail listens until ^D.
>
> zdkimsign runs zdkimfilter as a child and waits for it.  It pipes stderr  
> while leaving stdin and stdout untouched for the child.  So EPIPE must occur  
> when the library-or-system routine tries to flush the buffer.
>
> Any hint?

I think that if there are local mail filters they can intercept the sender  
and the recipient address and reject them. If the message sender is rejected  
or if all of the message's recipients are rejected, sendmail/submit won't  
bother reading the entire message.

Now, there should be an error message that gets dumped to standard error  
before sendmail exits. But if the sending program is coded to dump the  
message without bothering to check for this, this can happen.

_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQRupkKLJP96aW75pIOKYPgoojZS4gUCZ+HuLQAKCRCKYPgoojZS
4lA8AQD+YltN6PWL3cIcb+j2NnUXOAZj/zg/qUE3dCqh9WMxCAD/RMJuWVnpCfWb
jxoiEaDtUE0imfFjDKo+m9ecR1Z1TgI=
=JqzL
-----END PGP SIGNATURE-----