This document offers some information about how to get Mutt working with Courier IMAP's Outbox extension. It came about because it took quite a bit of testing and reading between the lines of the spotty documentation to get Mutt working with Courier's outbox enhancement.

Courier's outbox enhancement allows you to send email by copying the message to a special folder, typically INBOX.Outbox. Mutt, however, assumes that all email will be sent via SMTP. Getting the two to communicate properly requires use of Mutt's FCC facilities, and a null application in place of the SMTP MTA.


Configuring Mutt

First, you should configure Mutt for use with IMAP based on the the information at the excellent Mutt and IMAP web page. Keep in mind that Courier uses Maildirs to store mail, so set mbox_type to Maildir.

Second, you need to set sendmail to point to /bin/true. This causes Mutt to believe it successfully sent the email via SMTP.

Finally, you need to configure Mutt to FCC all outgoing email to the special outbox folder. Set record to point to the outbox, typically "=INBOX.Outbox". Additionally, set copy to either yes or ask-yes.


Patching Mutt

To make things more interesting, Mutt uses Status: headers to store the state of messages. However, according to RFC 2076 the Status: header "should never appear in mail in transit", since new mail can appear in another person's inbox as being already read. Some mail servers and mailing lists (notably lkml) are configured to reject emails which contain the Status: header.

I have created a patch which prevents a particular instance of the Status: header from being emitted when Mutt FCC's a message to an IMAP folder. The patch is against version 1.5.4i, but it should work against any version from 1.4 upwards.