Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MailCore2 parsing problem with RFC822 data modified by BoxTrapper #714

Closed
junjie opened this issue May 10, 2014 · 2 comments
Closed

MailCore2 parsing problem with RFC822 data modified by BoxTrapper #714

junjie opened this issue May 10, 2014 · 2 comments

Comments

@junjie
Copy link
Contributor

junjie commented May 10, 2014

BoxTrapper is a server-side tool used to prevent spam. I don't have much experience with it. But one user reported that mails begin to show raw source after he turned on BoxTrapper on his server. These mails render properly on Mail.app, as well as other third-party Mac and iPhone email clients.

I got hold of the RFC822 data of an email that I've sent him and attempt to initialise an MCOMessageParser with [[MCOMessageParser alloc] initWithData:data];

I can confirm that the htmlBodyRendering and plainTextBodyRendering returns the entire RFC822 headers along with the body of the email.

The full RFC822 data with the sender's name and email redacted:

From support@dispatchapp.net Fri May 09 09:24:54 2014
Received: from mail-pd0-f172.google.com ([209.85.192.172]:44087)
    by gator3312.hostgator.com with esmtps (TLSv1:RC4-SHA:128)
    (Exim 4.82)
    (envelope-from <support@dispatchapp.net>)
    id 1WiljI-000733-4C
    for redacted@redacted.com; Fri, 09 May 2014 09:24:53 -0500
Received: by mail-pd0-f172.google.com with SMTP id g10so3751842pdj.31
        for <redacted@redacted.com>; Fri, 09 May 2014 07:24:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:content-transfer-encoding
         :content-disposition;
        bh=wolknFiNjtUWi0jv/Y1ueiW3JsadWhfLxZ5eyqktZHA=;
        b=AMpvrQAslvV3pKws6lypNM87z5nAkN0QA/SqskVb6ahPnmgNXGrefPXS0HbIsgqwjo
         CoW3umjRbgpJBmgY0n3x7IZUOJA1Mq1cNPWxTIY37unYOs7v2xyNXvHhy42NePkOdvvX
         EjXpAj7jjN/pXTHad9y0BgTmvBU49mVBXM8iJB0oqkR8E0IgfuXt05xdw5zfiWnZdVWA
         Z9WTgKA6fP1zksGJ8UvRGDuc4XKUrJi9qmMKhjHsdIhbci5UGHZ8GGb3jhDQt6cSx7u8
         6tOz17uJPRX4JwP1ARBOxF1LuBShe6BoTLmY9YfKSiwZD+VGgbB0yZBvMrogSQ5Yl9/p
         yCeg==
X-Gm-Message-State: ALoCoQmlqWxYy8xdVdzU26g2gm1lv0niRhma+te8l0w1XaySxly93eLueG8IiGU20Io14QaM8XC1
X-Received: by 10.66.66.225 with SMTP id i1mr8015507pat.0.1399645490157;
        Fri, 09 May 2014 07:24:50 -0700 (PDT)
Received: from [192.168.1.10] ([132.147.80.149])
        by mx.google.com with ESMTPSA id mt1sm7905897pbb.31.2014.05.09.07.24.48
        for <redacted@redacted.com>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Fri, 09 May 2014 07:24:49 -0700 (PDT)
Date: Fri, 9 May 2014 22:24:46 +0800
From: Junjie <support@dispatchapp.net>
To: Redacted Redacted <redacted@redacted.com>
Message-ID: <47645C8595AF409C8838705A083F98A7@dispatchapp.net>
In-Reply-To: <2A1D7D44-6E89-48CA-ADA4-E6B2B0D24445@redacted.com>
References: <2A1D7D44-6E89-48CA-ADA4-E6B2B0D24445@redacted.com>
Subject: Re: Support for Dispatch
X-Mailer: sparrow 1.6.4 (build 1178)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-Spam-Status: No, score=-0.0
X-Spam-Score: 0
X-Spam-Bar: /
X-Spam-Flag: NO
X-BoxTrapper-Match: white: 231: support@dispatchapp.net

Hi Redacted, =20

Thanks for getting in touch.

I suspect Box Trapper might have altered the data of the email in a way t=
hat does not conform strictly to the R=46C specifications.

The mail engine and parser that we=E2=80=99re using is quite strict about=
 the formatting, whereas other clients could be more forgiving.

Could you send a copy of one or two of such emails (the simpler, the less=
 content, the better) by reading the mail in Dispatch > View Source > Sha=
re and send a copy to support=40dispatchapp.net=3F We can take a look fro=
m there. =20

=E2=80=94 JJ


On =46riday, 9 May, 2014 at 8:49 pm, Redacted Redacted wrote:

> Hello, =20
> =20
> After I enabled 'Box Trapper' in my cPanel to reduce spam, all the emai=
ls in Dispatch do not show properly. Instead of the email, I see the whol=
e source code of the email. =20
> =20
> I don't have this problem in other clients on my iPhone (Boxer and nati=
ve Mail app). Nor do I have this problem on my computers (Outlook and Thu=
nderbird). =20
> =20
> I have tried to delete and reconfigure my account a couple of times. I =
have even uninstalled and reinstalled Dispatch app. But nothing has helpe=
d. =20
> =20
> Since I did not have any display/rendering issues of emails on other em=
ail clients as mentioned above, I feel you can help me on how I can resol=
ve this challenge. =20
> =20
> Please help. Dispatch is very important for my workflow. =20
> =20
> Thanks
> Redacted Redacted =20
> =20
> -----
> Dispatch 1.3.12 (4242)
> =20
> =20
> Sent from my iPhone =20




Additionally, the only fields populated in MCOMessageParser.header are messageID, date and receivedDate.

subject, sender, from, to, references and inReplyTo are all nil.

@junjie
Copy link
Contributor Author

junjie commented May 10, 2014

Seems related to #689.

@dinhvh
Copy link
Member

dinhvh commented May 20, 2014

Duplicate of #689

@dinhvh dinhvh closed this as completed May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants