That problem I reported where Squirrelmail on a Win2k server gave
corrupted attachments in forwarded attachments also applied to
attachments in sent items or draft items that were re-edited and sent as
new. The cause was very simple: files not being opened in binary mode.
The smtp module does open attached files in 'wb' mode, which is why
attachments to new messages worked fine. But in every other place
(compose.php, read_body.php etc), files are opened in 'w' mode, which on
Windows means that '\r\n' is added at each perceived line ending, making
a real mess of binary attachments.
The fix is simply to change all occurences of fopen($file, 'w') to
I suppose this shows that not many people are running Squirrelmail on
Windows (wish I weren't, hands are tied) or the bug would have been
Get latest updates about Open Source Projects, Conferences and News.