forwardemail / free-email-forwarding

The best free email forwarding for custom domains. Visit our website to get started (SMTP server)
https://forwardemail.net
Other
2.44k stars 182 forks source link

Issues with windows-1251 encoding #241

Closed AyumuKasuga closed 3 years ago

AyumuKasuga commented 3 years ago

Hello guys! I use https://forwardemail.net/ for forwarding emails from a custom domain to my Gmail account, almost everything works great, thank you.

But I found some issues with windows-1251 encoding (not sure if it affects also other encodings). Currently I have at least two emails with broken encoding, for example here is a email from Microsoft:

image

Email's headers (included all of them just in case):

Delivered-To: *@gmail.com
Received: by 2002:a4f:26c4:0:0:0:0:0 with SMTP id m187csp2534175ivm;
        Mon, 26 Oct 2020 08:43:24 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJyIL4G6E2u8uXPMKjtRnZC+YZRXqytBAoakCGCCxi/I525HrewDL/0qvAadVOh7ImC9sFD4
X-Received: by 2002:aa7:82ce:0:b029:142:2501:35cb with SMTP id f14-20020aa782ce0000b0290142250135cbmr14026839pfn.43.1603727004092;
        Mon, 26 Oct 2020 08:43:24 -0700 (PDT)
ARC-Seal: i=3; a=rsa-sha256; t=1603727004; cv=pass;
        d=google.com; s=arc-20160816;
        b=fFWUFQ6gNZcHFv9YvbZMjvyiRlzQtvdhQzUGyVXpEdUVgxDYykdHCbVu+J3S50e3y+
         /xm9osM+pkEWWr0GAZzvAXrtdmEORbsauZeYjmVzprhHoxYoD3SxLcgVQQSdSJkBusUo
         /7862tPsxw3bLLSwfVkCY0ubdRXPPpP7YFLmIEaDvdY7Lr9T2uBBE9V31ui1VZz3TLrw
         QxqKOki/EPAqLq+OlbEkL38icguZdq4Z/ejMyugpiqVhWjUvvZ6lqKWE74ZwJwW8KiCM
         X/zNsj03l0PBobOsfIt2zYWBXqvB5PhHwGbzgDDpnnh28MvRPjG/e6xRFbDgMhCMGwth
         yRUw==
ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=mime-version:message-id:to:subject:date:from:dkim-signature;
        bh=z0/Q7DK4Au9XdWWPXYLHnG80EGtb2AyCuqC6Kqhu+Yc=;
        b=KqSCqNv8c4KoYgI0GNU91NsewNfg0v3cZCDC5TG8k9g2ilLaaOLoSOFuFGdt6U5jWE
         ILn0MAX/4CSsD/flAQ9GHWgexYoXRjimLYi2feaHD4W1M5+lOOGvJa+2kDo+gBn0tVbd
         EPHsjotxpUaB3lPJmjN1vC/KgiU8JkzynWo2vJ6Jv1mwpW0nFNaB2Rosr3slGLFFmyGD
         FXrnnPuqQzp9wGR/z+Bvx8i65kYFb7lIicA5jFV8oCUYB2gcIz69MHrK1vyf1gE3xZ6v
         UnFNd2NHNYFNAVphGUdANUrl2bkoFEUSP1YEAB4SBsmWS8axHfhvSOc9KqAf0g58jvBH
         ufSA==
ARC-Authentication-Results: i=3; mx.google.com;
       dkim=pass header.i=@accountprotection.microsoft.com header.s=selector1 header.b=Y9C5leD8;
       arc=pass (i=2 spf=pass spfdomain=nam11-dm6-obe.outbound.protection.outlook.com dkim=pass dkdomain=accountprotection.microsoft.com dmarc=pass fromdomain=accountprotection.microsoft.com);
       spf=pass (google.com: domain of srs0=09a0=ec=accountprotection.microsoft.com=account-security-noreply@forwardemail.net designates 138.197.213.185 as permitted sender) smtp.mailfrom="SRS0=09a0=EC=accountprotection.microsoft.com=account-security-noreply@forwardemail.net";
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=accountprotection.microsoft.com
Return-Path: <SRS0=09a0=EC=accountprotection.microsoft.com=account-security-noreply@forwardemail.net>
Received: from mx1.forwardemail.net (mx1.forwardemail.net. [138.197.213.185])
        by mx.google.com with ESMTPS id v22si9475645pfm.4.2020.10.26.08.43.23
        for <*@gmail.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Mon, 26 Oct 2020 08:43:24 -0700 (PDT)
Received-SPF: pass (google.com: domain of srs0=09a0=ec=accountprotection.microsoft.com=account-security-noreply@forwardemail.net designates 138.197.213.185 as permitted sender) client-ip=138.197.213.185;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@accountprotection.microsoft.com header.s=selector1 header.b=Y9C5leD8;
       arc=pass (i=2 spf=pass spfdomain=nam11-dm6-obe.outbound.protection.outlook.com dkim=pass dkdomain=accountprotection.microsoft.com dmarc=pass fromdomain=accountprotection.microsoft.com);
       spf=pass (google.com: domain of srs0=09a0=ec=accountprotection.microsoft.com=account-security-noreply@forwardemail.net designates 138.197.213.185 as permitted sender) smtp.mailfrom="SRS0=09a0=EC=accountprotection.microsoft.com=account-security-noreply@forwardemail.net";
       dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=accountprotection.microsoft.com
ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=forwardemail.net; s=default; t=1603727003; b=jhFpy7HqAQ8Fi/3wxHTIZFfp5WjoLAVdH6w6MsjZTrymjwT7CQ4d1klH+aEegdwXP8b3S U/PZQ3fakZeYMUqPCl2eHqZ7bVTdkbuwWzkc8Ph1JjEDHo0hNIYc5FbxoDESTEfwmOAsKyk jc5tmOCy37Gy9XIqD7VQ7MBzxeOrxVQ=
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=forwardemail.net; s=default; t=1603727003; h=from : date : subject : to : message-id : mime-version : content-type : from; bh=z0/Q7DK4Au9XdWWPXYLHnG80EGtb2AyCuqC6Kqhu+Yc=; b=GCkMJvmkn9NjUHTVJlGiKyesssMo7VBQWMGXBat3y1b9jX64yxSsd3cG6k6KhpCb/+Ltk vkzMDbBbSd/PBAmqloxQP5T+c64FhyE3bCZDLhBCk2lR39OS8kAXWbwK6lMXs2CCNdlvlwX Ah144y193TdwMqO+r8q0o3dv8fJSmmU=
ARC-Authentication-Results: i=2; mx1.forwardemail.net; spf=pass reason="sender SPF authorized" smtp.helo=nam11-dm6-obe.outbound.protection.outlook.com smtp.mailfrom=accountprotection.microsoft.com;
  dkim=pass header.d=accountprotection.microsoft.com;
  arc=pass;
  dmarc=pass (Used From Domain Record) header.from=accountprotection.microsoft.com policy.dmarc=reject
Authentication-Results: mx1.forwardemail.net; spf=pass reason="sender SPF authorized" smtp.helo=nam11-dm6-obe.outbound.protection.outlook.com smtp.mailfrom=accountprotection.microsoft.com; dkim=pass header.d=accountprotection.microsoft.com; arc=pass; dmarc=pass (Used From Domain Record) header.from=accountprotection.microsoft.com policy.dmarc=reject
X-ForwardEmail-Sender: rfc822; account-security-noreply@accountprotection.microsoft.com
X-ForwardEmail-Session-ID: t6aao5mii6ufklsu
X-ForwardEmail-Version: 7.3.0
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A4UGl6N+oiisGb/w57kFKf92L6jNDJ9GOYoRv6MiW6vx4dOaw6HD0WIkqWgbtmIDMPzePTrmKTcGF/JJxPLx2tm47LWo2UXRcvlRoxWiQb2oAVl4GtGuJkSXWPfvrNBodJVaR8v9s8KYLlc60GTj7yZT/rgZsZKghFBBlPcbVwEeSETFH90tDmtTQArM+5ArclsePrOSk2FeYzdzxsGhDcARc+rO9g3/rDocfykXmzd9k8+oZ8Ing2j87M4lIS7DvMZOhXo9ADXV2cHXbYsYn8MT+Fh8cMQ/KoQasKMfCkUWp44zkWmFKRfwEtBCuRJOwE7mXCUnIid7JYxyOrY6kA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0/Q7DK4Au9XdWWPXYLHnG80EGtb2AyCuqC6Kqhu+Yc=; b=jBK8UnON1PJ2KxnSZ1X3a+pxCzYXFWLVa+qyCled/s99IglkM7ZyJlyS//7L8cPvD6tg1F4rhUBkAYnB+VC9XbwnPbViiXYWCSZd/NivRsJ0ta8GGXE4yPMUakTk0bKZGcZEMNzqQklQz5SLi6hFOVU/ixiOgz7kFPh0xd7JdZnrL+UJ7v8ZqrpUd5pBb+2y+UMQ9fqAoJQdENu+DZnNPtNSRq2phpsA/HZfrcaGyqbckbz19a+Wef43mTyJBZ2RiHqiI9Db0hMBH3oDe/BB80dege0La/4cPVNEg0lnbPl3v9sdEffs9ZYbVOyNvwB99U8D6FdlUyPmKU/EUVk/1A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none action=none header.from=accountprotection.microsoft.com; dkim=none (message not signed); arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=accountprotection.microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=z0/Q7DK4Au9XdWWPXYLHnG80EGtb2AyCuqC6Kqhu+Yc=; b=Y9C5leD88EKTNwiOuM5j/4DYp7p3Fb25oxzxVcEnjNkxupNMXe+hYVEpb0WMkb2BMDIxOIJZBjsg42HS96Aczlc0tAAiqdwyL3JmoRfssg2K8tBSUXCB4r+RJn0BQdGjIW/4WM9LmFZpw+xcpTGA+OWJ1O9UtkXx4svKN6eac9A=
Received: from MW3PR05CA0020.namprd05.prod.outlook.com (2603:10b6:303:2b::25) by SA0PR16MB3870.namprd16.prod.outlook.com (2603:10b6:806:87::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Mon, 26 Oct 2020 15:43:19 +0000
Received: from CO1NAM11FT051.eop-nam11.prod.protection.outlook.com (2603:10b6:303:2b:cafe::db) by MW3PR05CA0020.outlook.office365.com (2603:10b6:303:2b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.8 via Frontend Transport; Mon, 26 Oct 2020 15:43:19 +0000
X-MS-Exchange-Authentication-Results: spf=none (sender IP is 157.55.103.193) smtp.mailfrom=accountprotection.microsoft.com; dzen.ws; dkim=none (message not signed) header.d=none;dzen.ws; dmarc=none action=none header.from=accountprotection.microsoft.com;
Received: from accountprotection.microsoft.com (157.55.103.193) by CO1NAM11FT051.mail.protection.outlook.com (10.13.174.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Mon, 26 Oct 2020 15:43:19 +0000
From: "Служба технической поддержки учетных записей Майкрософт" <account-security-noreply@accountprotection.microsoft.com>
Date: Mon, 26 Oct 2020 08:43:19 -0700
Subject: Сведения для защиты учетной записи Майкрософт
To: *@dzen.ws
X-Priority: 3
X-MSAPipeline: MessageDispatcherEOP
Message-ID: <RZGSZEFY0CU4.I51TP330YXR92@CY1SCH030011859>
X-MSAMetaData: DXSOdq2hbDViSSwvRo49CosKEtrJdlL137W23IYa1vEkL8Rlnyk1GkH4UP6WUtM7FN9uwbDZ3LmXmt4SPVeex9vH3YNddymdItD5gx9nYjAwSy4M91Ay9ekIQbuZa3AuMQ$$
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=-yxHlNa12JAIAAQhCQloZtg=="
Return-Path: account-security-noreply@accountprotection.microsoft.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 6dd2adb5-fcf7-46fb-7e91-08d879c5dce6
X-MS-TrafficTypeDiagnostic: SA0PR16MB3870:FirstParty-MicrosoftAccount-System
X-Microsoft-Antispam-PRVS: <SA0PR16MB38700C98632C2D64D7E350FA89190@SA0PR16MB3870.namprd16.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:1728;
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: fhnETNM6PomnKF2n3NUAdEHJsBka5vZ+spE2mM8V4M7dA4CA0rSSTyDQFMRphkbd6oLhoiS8TZDSJTPKG7MHIxpUeL4DGylbODK3pU6z1noxZlwZ13PYll3zMl6zR2gaqFKJfZB7KF1qEz+cJjdbHVvX3K9xd3AGrY6OPteKxo4lcsDA3F8cIxAOdVH3qFK/jglVEJHBOdnqf7hsqPLRPkt+AJohvLNDWigFZFO/x5AUh2PxuwjvJ89QzzLbHI8oK5EGdficO6R3WGcCHU6q0RLPIZrJQokFYkOa+0Ke0csIEjUjZZN0ecCtl7J5aWAE6xcG0uboGbhxmiuX9x71G3dS8WKl/M94CKE/yiYtT/pbL0kaj73YJlU/SSy95BtxwwtC7RvYjU8iAdsgQZjZG1Z9ktcOtENsh2pp/W7jESCwza95QcAhFehI4oH2PdjupOrIctHP2zwiLbonkM0PtDyMIYhQm009tHAMW7WxgUc=
X-Forefront-Antispam-Report: CIP:157.55.103.193;CTRY:US;LANG:ru;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:accountprotection.microsoft.com;PTR:msnbot-157-55-103-193.search.msn.com;CAT:NONE;SFS:;DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData: 2UfgUW0h2Gvl3pkBBszO4Mige47NDzGPSb2ime56w1v1Mc2NxpoBbRuhI7q8gdfHDbqFMiSOCVxP1s3gJ92+oZflQWhWVnwEZegZNOJa34I08YorbHCS0zGxLhhJ5wY8CgHQtLDRfgQpl8ItdLGMrik6qaaa3HCoRSpGAZcLzTkkS/INR0rMuqUqe4/d3QqXNeXGCoWa000/gWLVkEHJ3CzOW0OxUZdGmNuxlPaB1WHFT3UhmbEv6Syzlv10gaN7
X-OriginatorOrg: accountprotection.microsoft.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2020 15:43:19.3487 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 6dd2adb5-fcf7-46fb-7e91-08d879c5dce6
X-MS-Exchange-CrossTenant-Id: 5ba90553-c2cd-460e-b5fd-ab93ad9155c7
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5ba90553-c2cd-460e-b5fd-ab93ad9155c7;Ip=[157.55.103.193];Helo=[accountprotection.microsoft.com]
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-CO1NAM11FT051.eop-nam11.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR16MB3870

--=-yxHlNa12JAIAAQhCQloZtg==
Content-Type: text/plain; charset=windows-1251
Content-Transfer-Encoding: 8bit

For comparison here is how it looks like if it sends directly to my gmail account:

image

niftylettuce commented 3 years ago

I discovered the issue and will follow up ASAP

niftylettuce commented 3 years ago

Deploying this later today https://github.com/forwardemail/free-email-forwarding/commit/534528f82e656a19afe9e5aad1ea590616bd8856

Should be resolved this evening! will follow up again and close once done

niftylettuce commented 3 years ago

This should be fixed now. Test and let me know.

AyumuKasuga commented 3 years ago

I've just tested, and it's fixed, thank you very much @niftylettuce !

niftylettuce commented 3 years ago

Thank you for testing and confirming! So delighted to here. If you need anything else ping me.