We are having the exact same issue and think we have found the cause although we do not have a workaround.
01.
When sending outgoing mail through an IMAP connection the message is delivered, however the Apple Mail client fails to copy the sent message to the 'Sent Messages' folder on the IMAP server and the message is lost forever!
Here is whats reported in the Console:
27/02/2012 10:22:45.572 Mail: Error (null) occurred while trying to append messages to outgoing store. Ignoring and proceeding with delivery...
02.
We have also tested this with the Microsoft Outlook for Mac Client software and are having the same issue, however Outlook reports the error "Unable to add message to IMAP mailbox. The corresponding local folder will be used instead." and we don't loose any messages.
03.
Thunderbird for Mac seems to work OK.
04.
We have tested on different machines and also tested it on a different network to rule out an ISP or firewall issue.
05.
Finally we have been in contact with the technical support team who maintain our mail server and they have identified the cause of this issue.
Here is the response from them:As discussed on the telephone, we have now identified the cause of this issue.
Our Intrusion Detection & Prevention (IDP) systems block the connection from your Email client when it attempts to store outgoing Emails, which contain attachments, to the users' 'Sent' folder.
This is due to the Mac OS/Mac Mail sending non-standard or erroneous commands to the server, emulating the activity which would be generated by an attacker attempting to abuse an exploit in the IMAP server.
Details of this are;
IMAP:EXPLOIT:CMD-FORMAT-STRING has been detected from xx.xxx.xxx.xx/xxxx to xxx.xxx.xxx.xx/xxx through policy 324 1 times.
This error-level signature provides protection to our network from the following type of attack;
Name: IMAP: Command Line Format String
Description: This signature detects attempts to exploit format string vulnerabilities through IMAP. Attackers can send a malformed commands prior to authentication. A successful attack can allow execution of arbitrary code.
So it seems that the Apple Mail or something else happening at the OS level may be sending non-standard commands to the mail server, causing the security software to block the connection.