1

We have a script that moves messages from an inbox into a CRM against the contact record of the sender (nice one CiviCRM!)

It has stopped working because someone has sent us a message in UTF-7 encoding, and the script can't or won't convert it to UTF-8

We now have a backlog of over a thousand messages.

How do we find the needle in this Inbox?

Does anyone know a script that will produce a report listing any messages in UTF-7 encoding, or of any other sneaky way to find the offending messsage(s)?

  • The message is in UTF-7? That's.... exceedingly odd. That should be declared in the Content-Type of the relevant MIME section of the message. So, you could do a BODYSTRUCTURE query for all messages in the mailbox (``[tag] FETCH 1:* (BODYSTRUCTURE``), and try to identify any that mention UTF-7 encoding. – Max Sep 24 '12 at 14:24
  • Thanks for your rapid response, Max - yep, very odd - but there are no messages that stand out as really odd to a human being. - I'm searching google for what a BODYSTRUCTURE query is! – user1694595 Sep 24 '12 at 14:38
  • Agh - so anything that will look through the header files - yes, but I can't work out how to query the encoding - any ideas? – user1694595 Sep 24 '12 at 14:41
  • When looking at raw source I can see some have charset=UTF-8 included as a parameter of Content-Type - but so far using rules in a mail client hasn't found an answer.. – user1694595 Sep 24 '12 at 15:01
  • Oh, you're trying to do this from a mail client. This should be on the system administration (serverfault) or end user (superuser) overflow. This one is specifically for programming, so I thought you were interacting with IMAP directly. – Max Sep 24 '12 at 16:44

0 Answers0