Under certain circumstances, files attached to emails sent from SquirrelMail contain headers which are folded in a way that causes the receiving mail client to mangle the file name.
When the total length of the encoded file name is about 90 characters, SquirrelMail puts a line break about 1-2 characters from the end, which breaks the file extension.
Error occurs in both 1.4.8 and 1.4.9a.
* Create a file with the following file name:
12 blablabla bläb bläblabl bla bla blablab blöblablåbla 1234.txt
(The swedish characters åäö are used here, but other characters that are QP encoded will probably trigger the error.)
12 blablabla bléb blíblabl bla bla blablab bláblablúbla 1234.txt
* Attach the file to an email and send the email.
* Open the sent email or view the received email in SquirrelMail or Mozilla Thunderbird. Both clients will display the file name as
"12 blablabla bläb bläblabl bla bla blablab blöblablåbla 1234.tx t" (note the space inside "txt")
This is what the relevant part of the email source looks like:
Content-Type: text/plain; name="12 blablabla
Content-Disposition: attachment; filename="12 blablabla
The problem is probably located in the foldLine() function in class/deliver/Deliver.php