Lawrence Posted June 20, 2011 Share Posted June 20, 2011 Hi, We notice that some e-mail attachments are being blocked by WHMCS when a client sends them to any support department. We tested this ourselves with the following setting: Allowed File Attachment Types: .jpg,.gif,.jpeg,.png,.pdf,.doc,.zip,.docx,.eml E-mail with attachment "test.eml" (saved email file from Thunderbird): accepted with a problem E-mail with attachment "lfd on athena.lcwsoft.com WHM root access alert from 174.116.97.205 (m).eml": accepted but attachment blocked with the message "Attachment blocked - file type not allowed." It appears there is a bug with the determining the extension from the file name. 0 Quote Link to comment Share on other sites More sharing options...
mylove4life Posted June 20, 2011 Share Posted June 20, 2011 sounds like WHM is blobking it, not WHMCS 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted June 20, 2011 Share Posted June 20, 2011 That error message suggests your running mailscanner along with CSF/LFD. .eml attachments (forwarded messages, as attachments from some email clients) are blocked by default. More often than not they're viruses. It's not WHMCS that's blocking it. 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted June 21, 2011 Author Share Posted June 21, 2011 Nope, it's definitely WHMCS. I sent the EXACT same e-mail from the second example to a e-mail account on the same domain and server, and the attachment came through just fine. I would hazard a guess that it's the extra dots in the filename that is causing the problem. WHMCS is checking the extension starting with the first dot, instead of the last one. Based on the brief test I did, it's the only logical conclusion. 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted June 21, 2011 Author Share Posted June 21, 2011 In case anyone wants an example of the code that would get the extension properly from a string $filename = 'image.new2.jpg'; // will return just "jpg", which is the proper result $extension = end(explode('.', $filename)); 0 Quote Link to comment Share on other sites More sharing options...
rcasey Posted August 31, 2011 Share Posted August 31, 2011 Did you manage to get anywhere with this? I'm having an issue with importing .eml attachments as well, although it's a different scenario. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.