Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

File Import Error

Hi guys

I am receiving file import errors every now and then.  I've noticed a trend for the majority of emails.  The scenario is that whenever the attachment is an email message (email.eml) that contains an attachment (attach.pdf), the body of the attached email (email.eml) is added to the ticket thread and the attachment (attach.pdf) is not imported and the ticket thread says "SYSTEM - File Import Error" "attach.pdf:  Unable to save file".
This tends to happen at least once a day.

I am running osTicket v1.10.1 on Ubuntu 14.04 LTS.  php version is 5.6.  I use IMAP to import emails and use the attachment plugin to save to the file system.

Any help would be much appreciated.


  • This has been reported a few times but only appears to happen when a user uses Outlook to attach .eml files with attachments embeded in them.  I would recommend training people not to do that. 
  • It is very difficult as our emails come in from many different external parties.  We can't train them unfortunately.  Is this something that will be looked at in future?
  • I'm not aware of, but I'll ask.
  • Thank you. That would be much appreciated.
  • Thanks @pauloens, I wish I'd spotted that before - I was up til the small hours last night doing a similar patch :)

    The problem is caused by the fact that mail fetcher skips the attached message because it has no name (understandably), so ends up skipping the attachment altogether.  If the attachment has a named attachment in itself, like an image, the structure walk finds that and notes its name and mime type.  Unfortunately, when it comes to add the body content, it then finds the content of your attached message.  So you end up with an attachment called maybe image001.png, type image/png, but the content of it is "<html>... your attached message ... </html>".  All a bit screwy.

    The solution is to treat the rfc822 attachment as a first class citizen regardless of being unnamed, not recurse, and give it a name with a .eml extension.  Then it adds the attachment which you can click on and it should open in your mail client, certainly works with Outlook.
  • Hi @pauloens.  Thanks for the advice.  The attachments do have filenames though?  Or does this solve the same problem?

    @ntozier - is this something that will be merged in future?

    Thanks all!
  • I dont know.
  • For me just resolved evrything and the attachments are working as they should.
Sign In or Register to comment.