From time to time, archivemail run against the exchange server may fail with an error such as:
archivemail: Failed to fetch message sizes; server says 'The requested message could not be converted to an RFC-822 compatible format.' archivemail: unexpected error encountered - shutting down
When it does, determine the problem message by running fetchmail by hand:
fetchmail -v | grep couldn\'t
and delete it via IMAP manually as such
# openssl s_client -crlf -connect server:993
. login user@domain {password}
. select INBOX
. store
. expunge
. logout
Note: the ‘.’ above are necessary.
http://bobpeers.com/technical/telnet_imap