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

Apple opt out email categorized as "vacation" #279

Closed
mnmallea opened this issue May 2, 2024 · 3 comments
Closed

Apple opt out email categorized as "vacation" #279

mnmallea opened this issue May 2, 2024 · 3 comments

Comments

@mnmallea
Copy link

mnmallea commented May 2, 2024

When an Apple email user unsubscribes from an email list using the unsubscribe button in the email client, Apple sends an automated opt out message like this one:

Date: Thu, 2 May 2024 17:48:55 +0000 (UTC)
From: example@icloud.com
Reply-To: example@icloud.com
To: opt-out-100731.e75std53hz8rnmy4r@example.org
Message-ID: <898B6152-36BC-4F4B-ABF8-2694A88CB5FC@icloud.com>
Subject: unsubscribe
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com;
	s=1a1hai; t=1714672136;	bh=63IYtxpNtEan90vzJQT9iqnMeWHy9rlx8iFLnco1rRc=;
	h=Content-Type:From:Mime-Version:Date:Subject:Message-Id:To;
	b=AoovfvadwxCx8Pp5yD62kw1AcKMQV32RhSrBsyw4qLr/CVsQo1tIh+xCUPdI7So9i
	 paxzn20YdVvHuP3f8CxT/q3x9WaQV3NDAmbbQumYwOpJk7yNXRkuWNjIlt6isZM0tb
	 FK8v+Tq3j3Va83mZ6OeR8ZjvfY8ImjewEOTEZ79sNxToaaHvRuDWRbzt4uaktRuL44
	 j1wEjiKxgy6f7bOC2XJyRaf41BtCm4V6TGtcBF9hOEMzn6LulaLgashs3yGQ92wkb9
	 OLSy1uP0iA4nj/qAM+QaauAFzmqYmqa9r7rUFCjqf01q4gvn1QfO4QVqiRQXiMXc8e
	 QPSqskbSbsIQA==
X-Proofpoint-GUID: fiybgv3DewxSxApGH8GnpeSw3OZld4ll
Auto-Submitted: auto-replied
X-Apple-Unsubscribe: true
X-Proofpoint-ORIG-GUID: fiybgv3DewxSxApGH8GnpeSw3OZld4ll
X-Virus-Status: Clean

Apple Mail sent this email to unsubscribe from the message =E2=80=9Cunsubsc=
ribe=E2=80=9D.

After analyzing it with sisimai I got this response:

➜  ~ ruby -rsisimai -e 'print Sisimai.dump($*.shift, vacation: true)' ./apple-opt-out-example.eml | json_pp 
[
   {
      "action" : "",
      "addresser" : "opt-out-100731.e75std53hz8rnmy4r@example.org",
      "alias" : "",
      "catch" : "",
      "deliverystatus" : "",
      "destination" : "icloud.com",
      "diagnosticcode" : "Apple Mail sent this email to unsubscribe from the message �unsubscribe�.",
      "diagnostictype" : "",
      "feedbacktype" : "",
      "hardbounce" : false,
      "lhost" : "",
      "listid" : "",
      "messageid" : "",
      "origin" : "./apple-opt-out-example.eml",
      "reason" : "vacation",
      "recipient" : "example@icloud.com",
      "replycode" : "",
      "rhost" : "",
      "senderdomain" : "example.org",
      "smtpagent" : "RFC3834",
      "smtpcommand" : "",
      "subject" : "",
      "timestamp" : 1714672135,
      "timezoneoffset" : "+0000",
      "token" : "a68c9c71e8103ff7a1fc5846e7808fa8fb06954f"
   }
]

I think that it shouldn't be classified with vacation reason as the email text doesn't say anything about being on vacation or out of office.

@azumakuniyuki
Copy link
Member

@mnmallea Thank you for the report. I agree that unsubscribe notifications should be treated as "feedback" (optout) rather than "vacation". I will try to make a correction so that they can be classified correctly.

@azumakuniyuki
Copy link
Member

@mnmallea The code implemented at #280 returns the following result:

% ruby -Ilib -rsisimai -e 'puts Sisimai.dump($*.shift)' ./apple-feedback-unsubscribe.eml | jq
[
  {
    "action": "",
    "alias": "",
    "catch": "",
    "deliverystatus": "",
    "destination": "icloud.com",
    "diagnosticcode": "",
    "diagnostictype": "",
    "feedbacktype": "opt-out",
    "lhost": "",
    "listid": "",
    "messageid": "",
    "origin": "./apple-feedback-unsubscribe.eml",
    "reason": "feedback",
    "replycode": "",
    "rhost": "",
    "senderdomain": "example.org",
    "smtpagent": "Feedback-Loop",
    "smtpcommand": "",
    "subject": "",
    "timezoneoffset": "+0000",
    "token": "a68c9c71e8103ff7a1fc5846e7808fa8fb06954f",
    "hardbounce": false,
    "addresser": "opt-out-100731.e75std53hz8rnmy4r@example.org",
    "recipient": "example@icloud.com",
    "timestamp": 1714672135
  }
]

@mnmallea
Copy link
Author

mnmallea commented May 9, 2024

Thank you @azumakuniyuki! That output looks good

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