1 Oct
2015
1 Oct
'15
9:41 p.m.
At the end of a direct IMAP conversation with the imap binary, it writes an informative message like "imap(josh): Info: Connection closed in=0 out=365" to stderr. With stderr closed, the imap binary will exit with exit code 81 after it gets EBADF from that write. While it makes sense to fail on failure to write an error message, I don't think it makes sense to fail if writing an info message fails.
I encountered this when using /usr/lib/dovecot/imap with mutt's "tunnel" option. Mutt seems to run the configured tunnel program with stderr closed, which triggers this error.
- Josh Triplett