cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
529 stars 145 forks source link

imip notifications: junk error in http output? #1984

Open elliefm opened 7 years ago

elliefm commented 7 years ago

This function in imap/http_caldav_sched.c:

/* Send an iMIP request for attendees in 'ical' */
static int imip_send_sendmail(icalcomponent *ical,
                              const char *recipient, int is_update)

calls this one in imap/smtpclient.c:

EXPORTED pid_t open_sendmail(const char *argv[], FILE **sm)

which has error handling like this:

        printf("451 lmtpd: didn't start pipe()?!?\r\n");
[...]
        printf("451 lmtpd: didn't exec() sendmail?!?\r\n");

I think this results in those incorrect "451 lmtpd: ..." messages being dumped out into the http output stream when it fails...

We should refactor open_sendmail to provide a more generic error reporting interface, and let lmtpd/httpd each decide their own way how to propagate those reports outward

elliefm commented 6 years ago

I think this is fixed (for master) by the sendmail API refactor, but that won't be backported to 3.0