Page MenuHomePhabricator

Creating Tasks with umlauts via Email leads to a malformed Title >> =?utf-8?Q?
Closed, InvalidPublic

Description

Creating Tasks with umlauts via Email leads to a malformed Title. Taskdescription is created as expected.

MailClient: OSX Mail (8.1)

Expected Title

Neuer ä Task via = Mail ß mit ö Umlauten $ und  % Sonderzeichen...

Created Maniphest Subject

=?utf-8?Q?Neuer_=C3=A4_Task_via_=3D_Mail_=C3=9F_mit_=C3=B6_Umlau?= =?utf-8?Q?ten_=24_und__=25_Sonderzeichen=2E=2E=2E?=

Event Timeline

rphl raised the priority of this task from to Needs Triage.
rphl updated the task description. (Show Details)
rphl added a project: Maniphest.
rphl changed the edit policy from "All Users" to "Custom Policy".
rphl added a subscriber: rphl.
chad changed the edit policy from "Custom Policy" to "All Users".Jan 8 2015, 5:38 PM

I would make sure nothing is intercepting and transforming your mail before Phabricator gets it, as well as check out our guide on bug reporting (make sure your install is at HEAD). https://secure.phabricator.com/book/phabcontrib/article/bug_reports/

I think phabricator received the mail correctly. The confirmation Email has the expected Subject with correct umlauts. Just the Task itself is malformed.

Screenshot Email

Bildschirmfoto_2015-01-08_um_18.35.02.png (296×1 px, 54 KB)

Screeenshot Maniphest

Bildschirmfoto_2015-01-08_um_18.37.21.png (95×903 px, 21 KB)

Phabricator is at HEAD.

@rphl I still am not able to reproduce the issue and linked to my test here. You are welcome to try to reproduce here at bugs@phabricator.com.

See T6900 T6901 T6902 for various tests I performed (using Mail 8.1, Sparrow, and Mailbox).

chad claimed this task.

I don't think we can provide any additional assistance here, unfortunately.

hmm. our pharicator is running on a google vm. we are forced to use sendgrid for email, otherwise it is not possible sent mails from the vm. maybe sendgrid could be the reason.

Don't convert plain text emails to HTML is checked. (sendgrid config)

$ ./mail list-inbound
15 USER -            =?iso-8859-1?Q?Neuer_=E4_Ta?= =?iso-8859-1?Q?sk_via_=3D_M?= =?iso-8859-1?Q?ail_=DF_mit_?= =?iso-8859-1?Q?=F6_Umlauten?= =?iso-8859-1?Q?_$_und__%_?= =?iso-8859-1?Q?Sonderzeic?= =?iso-8859-1?Q?hen...?=

We've continually seen oddness from sendgrid (see T4199 for example) and prefer Mailgun. Google Cloud Engine seems to heavily favor sendgrid, but it didn't read like it was required.

I have stumbled upon this as well - every email I forward to Phabricator with Unicode characters has the same problem with the title. I'm also using Sendgrid out of necessity but I don't believe that is the cause, because the subject was like that already in the raw message source when I sent it.

E.g. an email with

Subject: Fw: [redacted]
 =?utf-8?Q?atsl=C4=93gas_v=C4=81rds?=

appears in Maniphest like this:

Fw: [redacted] =?utf-8?Q?atsl=C4=93gas_v=C4=81rds?=

./bin/mail list-inbound also lists it like

Fw: [redacted] =?utf-8?Q?atsl=C4=93gas_v=C4=81rds?=

Sendgrid hasn't altered anything between me sending it and it arriving.

It also doesn't seem to be caused by the fact that the subject is split into multiple lines like in my previous example - a one liner has the same behavior – the subject was "āžššš" for testing. It was sent out as

Subject: =?utf-8?Q?=C4=81=C5=BE=C5=A1=C5=A1=C5=A1?=

and arrived as

=?utf-8?Q?=C4=81=C5=BE=C5=A1=C5=A1=C5=A1?=

The real cause, I think, is that Mailgun actually parses the subject and transcodes it before routing it to Phabricator whereas Sendgrid doesn't change anything. It is implied in Mailgun's documentation:

When you specify a URL of your application as a route destination through a forward() action, Mailgun will perform an HTTP POST request into it using one of two following formats:
Fully parsed: Mailgun will parse the message, transcode it into UTF-8 encoding, process attachments, and attempt to separate quoted parts from the actual message. This is the preferred option.
Raw MIME: message is posted as-is. In this case you are responsible for parsing MIME. To receive raw MIME messages, the destination URL must end with mime.

Basically, I believe that Mailgun does the MIME header decoding for you, whereas Sendgrid hands you the header as-is.