diff --git a/addons/mail/tests/test_mail_gateway.py b/addons/mail/tests/test_mail_gateway.py index 0b145c36..ee35a277 100644 --- a/addons/mail/tests/test_mail_gateway.py +++ b/addons/mail/tests/test_mail_gateway.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. +# Part of Odoo. See LICENSE file for full copyright and licensing details. import socket @@ -10,7 +10,7 @@ from flectra.tools import mute_logger MAIL_TEMPLATE = """Return-Path: To: {to} cc: {cc} -Received: by mail1.flectra.com (Postfix, from userid 10002) +Received: by mail1.openerp.com (Postfix, from userid 10002) id 5DF9ABFB2A; Fri, 10 Aug 2012 16:16:39 +0200 (CEST) From: {email_from} Subject: {subject} @@ -51,7 +51,7 @@ Content-Transfer-Encoding: quoted-printable MAIL_TEMPLATE_PLAINTEXT = """Return-Path: To: {to} -Received: by mail1.flectra.com (Postfix, from userid 10002) +Received: by mail1.openerp.com (Postfix, from userid 10002) id 5DF9ABFB2A; Fri, 10 Aug 2012 16:16:39 +0200 (CEST) From: Sylvie Lelitre Subject: {subject} @@ -78,7 +78,7 @@ X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) by mail1.grosbedon.com (Postfix) with ESMTPS id 9BBD7BFAAA - for ; Fri, 23 Aug 2013 13:17:55 +0200 (CEST) + for ; Fri, 23 Aug 2013 13:17:55 +0200 (CEST) Received: by mail-ie0-f173.google.com with SMTP id qd12so575130ieb.4 for ; Fri, 23 Aug 2013 04:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; @@ -298,6 +298,630 @@ AAAAACwAAAAAAgACAAAEA3DJFQA7 --001a11416b9e9b229a05272b7052-- """ +MAIL_EML_ATTACHMENT = """Subject: Re: test attac +From: Anon +To: anon@gmail.com +References: +Message-ID: +Date: Wed, 14 Mar 2018 14:26:58 +0100 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 + Thunderbird/52.6.0 +MIME-Version: 1.0 +In-Reply-To: +Content-Type: multipart/mixed; + boundary="------------A6B5FD5F68F4D73ECD739009" +Content-Language: en-US + +This is a multi-part message in MIME format. +--------------A6B5FD5F68F4D73ECD739009 +Content-Type: text/plain; charset=utf-8; format=flowed +Content-Transfer-Encoding: 7bit + + + +On 14/03/18 14:20, Anon wrote: +> Some nice content +> + + +--------------A6B5FD5F68F4D73ECD739009 +Content-Type: message/rfc822; + name="original_msg.eml" +Content-Transfer-Encoding: 8bit +Content-Disposition: attachment; + filename="original_msg.eml" + +Delivered-To: anon2@gmail1.openerp.com +Received: by 10.46.1.170 with SMTP id f42csp2379722lji; + Mon, 5 Mar 2018 01:19:23 -0800 (PST) +X-Google-Smtp-Source: AG47ELsYTlAcblMxfnaEENQuF+MFoac5Q07wieyw0cybq/qOX4+DmayqoQILkiWT+NiTOcnr/ACO +X-Received: by 10.28.154.213 with SMTP id c204mr7237750wme.64.1520241563503; + Mon, 05 Mar 2018 01:19:23 -0800 (PST) +ARC-Seal: i=1; a=rsa-sha256; t=1520241563; cv=none; + d=google.com; s=arc-20160816; + b=BqgMSbqmbpYW1ZtfGTVjj/654MBmabw4XadNZEaI96hDaub6N6cP8Guu3PoxscI9os + 0OLYVP1s/B+Vv9rIzulCwHyHsgnX+aTxGYepTDN6x8SA9Qeb9aQoNSVvQLryTAoGpaFr + vXhw8aPWyr28edE03TDFA/s7X65Bf6dV5zJdMiUPVqGkfYfcTHMf3nDER5vk8vQj7tve + Cfyy0h9vLU9RSEtdFwmlEkLmgT9NQ3GDf0jQ97eMXPgR2q6duCPoMcz15KlWOno53xgH + EiV7aIZ5ZMN/m+/2xt3br/ubJ5euFojWhDnHUZoaqd08TCSQPd4fFCCx75MjDeCnwYMn + iKSg== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=content-language:mime-version:user-agent:date:message-id:subject + :from:to:dkim-signature:arc-authentication-results; + bh=/UIFqhjCCbwBLsI4w7YY98QH6G/wxe+2W4bbMDCskjM=; + b=Wv5jt+usnSgWI96GaZWUN8/VKl1drueDpU/4gkyX/iK4d6S4CuSDjwYAc3guz/TjeW + GoKCqT30IGZoStpXQbuLry7ezXNK+Fp8MJKN2n/x5ClJWHxIsxIGlP2QC3TO8RI0P5o0 + GXG9izW93q1ubkdPJFt3unSjjwSYf5XVQAZQtRm9xKjqA+lbtFbsnbjJ4wgYBURnD8ma + Qxb2xsxXDelaZvtdlzHRDn5SEkbqhcCclEYw6oRLpVQFZeYtPxcCleVybtj2owJxdaLp + 7wXuo/gpYe6E2cPuS2opei8AzjEhYTNzlYXTPvaoxCCTTjfGTaPv22TeRDehuIXngSEl + Nmmw== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@flectrahq.com header.s=mail header.b=MCzhjB9b; + spf=pass (google.com: domain of soup@flectrahq.com designates 149.202.180.44 as permitted sender) smtp.mailfrom=soup@flectrahq.com; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flectrahq.com +Return-Path: +Received: from mail2.flectrahq.com (mail2.flectrahq.com. [149.202.180.44]) + by mx.google.com with ESMTPS id y4si4279200wmy.148.2018.03.05.01.19.22 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 05 Mar 2018 01:19:23 -0800 (PST) +Received-SPF: pass (google.com: domain of soup@flectrahq.com designates 149.202.180.44 as permitted sender) client-ip=149.202.180.44; +Authentication-Results: mx.google.com; + dkim=pass header.i=@flectrahq.com header.s=mail header.b=MCzhjB9b; + spf=pass (google.com: domain of soup@flectrahq.com designates 149.202.180.44 as permitted sender) smtp.mailfrom=soup@flectrahq.com; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flectrahq.com +Received: from [10.10.31.24] (unknown [91.183.114.50]) + (Authenticated sender: soup) + by mail2.flectrahq.com (Postfix) with ESMTPSA id 7B571A4085 + for ; Mon, 5 Mar 2018 10:19:21 +0100 (CET) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flectrahq.com; s=mail; + t=1520241562; bh=L2r7Sp/vjogIdM1k8H9zDGDjnhKolsTTLLjndnFC4Jc=; + h=To:From:Subject:Date:From; + b=MCzhjB9bnsrJ3uKjq+GjujFxmtrq3fc7Vv7Vg2C72EPKnkxgqy6yPjWKtXbBlaiT3 + YjKI24aiSQlOeOPQiqFgiDzeqqemNDp+CRuhoYz1Vbz+ESRaHtkWRLb7ZjvohS2k7e + RTq7tUxY2nUL2YrNHV7DFYtJVBwiTuyLP6eAiJdE= +To: what@flectrahq.com +From: Soup +Subject: =?UTF-8?Q?Soupe_du_jour_:_Pois_cass=c3=a9s?= +Message-ID: +Date: Mon, 5 Mar 2018 10:19:21 +0100 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 + Thunderbird/52.6.0 +MIME-Version: 1.0 +Content-Type: multipart/alternative; + boundary="------------1F2D18B1129FC2F0B9EECF50" +Content-Language: en-US +X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,BAYES_00, + HTML_IMAGE_ONLY_08,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=no + autolearn_force=no version=3.4.0 +X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail2.flectrahq.com + +This is a multi-part message in MIME format. +--------------1F2D18B1129FC2F0B9EECF50 +Content-Type: text/plain; charset=utf-8; format=flowed +Content-Transfer-Encoding: 8bit + +Résultat de recherche d'images pour "dessin la princesse au petit pois" + +-- +Soup + +Odoo S.A. +Chaussée de Namur, 40 +B-1367 Grand Rosière +Web: http://www.flectrahq.com + + +--------------1F2D18B1129FC2F0B9EECF50 +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: 8bit + + + + + + + +

Résultat de recherche d'images pour "dessin la
+        princesse au petit pois"

+
--
+Soup
+
+Odoo S.A.
+Chaussée de Namur, 40
+B-1367 Grand Rosière
+Web: http://www.flectrahq.com 
+ + + +--------------1F2D18B1129FC2F0B9EECF50-- + +--------------A6B5FD5F68F4D73ECD739009--""" + + +MAIL_XHTML = """Return-Path: +Received: from xxxx.internal (xxxx.xxxx.internal [1.1.1.1]) + by xxxx (xxxx 1.1.1-111-g972eecc-slipenbois) with LMTPA; + Fri, 13 Apr 2018 22:11:52 -0400 +X-Cyrus-Session-Id: sloti35d1t38-1111111-11111111111-5-11111111111111111111 +X-Sieve: CMU Sieve 1.0 +X-Spam-known-sender: no ("Email failed DMARC policy for domain"); in-addressbook +X-Spam-score: 0.0 +X-Spam-hits: ALL_TRUSTED -1, BAYES_00 -1.9, FREEMAIL_FROM 0.001, + HTML_FONT_LOW_CONTRAST 0.001, HTML_MESSAGE 0.001, SPF_SOFTFAIL 0.665, + LANGUAGES en, BAYES_USED global, SA_VERSION 1.1.0 +X-Spam-source: IP='1.1.1.1', Host='unk', Country='unk', FromHeader='com', + MailFrom='com' +X-Spam-charsets: plain='utf-8', html='utf-8' +X-IgnoreVacation: yes ("Email failed DMARC policy for domain") +X-Resolved-to: catchall@xxxx.xxxx +X-Delivered-to: catchall@xxxx.xxxx +X-Mail-from: xxxx@xxxx.com +Received: from mx4 ([1.1.1.1]) + by xxxx.internal (LMTPProxy); Fri, 13 Apr 2018 22:11:52 -0400 +Received: from xxxx.xxxx.com (localhost [127.0.0.1]) + by xxxx.xxxx.internal (Postfix) with ESMTP id E1111C1111; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from xxxx.xxxx.internal (localhost [127.0.0.1]) + by xxxx.xxxx.com (Authentication Milter) with ESMTP + id BBDD1111D1A; + Fri, 13 Apr 2018 22:11:51 -0400 +ARC-Authentication-Results: i=1; xxxx.xxxx.com; arc=none (no signatures found); + dkim=pass (2048-bit rsa key sha256) header.d=xxxx.com header.i=@xxxx.com header.b=P1aaAAaa x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=fm2; + dmarc=fail (p=none,d=none) header.from=xxxx.com; + iprev=pass policy.iprev=1.1.1.1 (out1-smtp.xxxx.com); + spf=softfail smtp.mailfrom=xxxx@xxxx.com smtp.helo=out1-smtp.xxxx.com; + x-aligned-from=pass (Address match); + x-cm=none score=0; + x-ptr=pass x-ptr-helo=out1-smtp.xxxx.com x-ptr-lookup=out1-smtp.xxxx.com; + x-return-mx=pass smtp.domain=xxxx.com smtp.result=pass smtp_is_org_domain=yes header.domain=xxxx.com header.result=pass header_is_org_domain=yes; + x-tls=pass version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128; + x-vs=clean score=0 state=0 +Authentication-Results: xxxx.xxxx.com; + arc=none (no signatures found); + dkim=pass (2048-bit rsa key sha256) header.d=xxxx.com header.i=@xxxx.com header.b=P1awJPiy x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=fm2; + dmarc=fail (p=none,d=none) header.from=xxxx.com; + iprev=pass policy.iprev=66.111.4.25 (out1-smtp.xxxx.com); + spf=softfail smtp.mailfrom=xxxx@xxxx.com smtp.helo=out1-smtp.xxxx.com; + x-aligned-from=pass (Address match); + x-cm=none score=0; + x-ptr=pass x-ptr-helo=out1-smtp.xxxx.com x-ptr-lookup=out1-smtp.xxxx.com; + x-return-mx=pass smtp.domain=xxxx.com smtp.result=pass smtp_is_org_domain=yes header.domain=xxxx.com header.result=pass header_is_org_domain=yes; + x-tls=pass version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128; + x-vs=clean score=0 state=0 +X-ME-VSCategory: clean +X-ME-CMScore: 0 +X-ME-CMCategory: none +Received-SPF: softfail + (gmail.com ... _spf.xxxx.com: Sender is not authorized by default to use 'xxxx@xxxx.com' in 'mfrom' identity, however domain is not currently prepared for false failures (mechanism '~all' matched)) + receiver=xxxx.xxxx.com; + identity=mailfrom; + envelope-from="xxxx@xxxx.com"; + helo=out1-smtp.xxxx.com; + client-ip=1.1.1.1 +Received: from xxxx.xxxx.internal (gateway1.xxxx.internal [1.1.1.1]) + (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) + (No client certificate requested) + by xxxx.xxxx.internal (Postfix) with ESMTPS; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from compute3.internal (xxxx.xxxx.internal [10.202.2.43]) + by xxxx.xxxx.internal (Postfix) with ESMTP id 8BD5B21BBD; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from xxxx ([10.202.2.163]) + by xxxx.internal (MEProxy); Fri, 13 Apr 2018 22:11:51 -0400 +X-ME-Sender: +Received: from [1.1.1.1] (unknown [1.1.1.1]) + by mail.xxxx.com (Postfix) with ESMTPA id BF5E1111D + for ; Fri, 13 Apr 2018 22:11:50 -0400 (EDT) +From: "xxxx xxxx" +To: "xxxx" +Subject: Re: xxxx (Ref PO1) +Date: Sat, 14 Apr 2018 02:11:42 +0000 +Message-Id: +In-Reply-To: <829228111124527.1111111602.256611118262939-openerp-129-xxxx.xxxx@ip-1-1-1-1> +References: <867911111953277.1523671337.187951111160400-openerp-129-xxxx.xxxx@ip-1-1-1-1> + <867911111953277.1523671337.256611118262939-openerp-129-xxxx.xxxx@ip-1-1-1-1> +Reply-To: "xxxx xxxx" +User-Agent: eM_Client/7.0.26687.0 +Mime-Version: 1.0 +Content-Type: multipart/alternative; + boundary="------=_MB48E455BD-1111-42EC-1111-886CDF48905E" + +--------=_MB48E455BD-1111-42EC-1111-886CDF48905E +Content-Type: text/plain; format=flowed; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +xxxx + + +------ Original Message ------ +From: "xxxx" +To: "xxxx" +Sent: 4/13/2018 7:06:43 PM +Subject: xxxx + +>xxxx + +--------=_MB48E455BD-1111-42EC-1111-886CDF48905E +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +
this is a reply to PO200109 from emClient
--
xxxx
xxxx
xxxx



+
------ Original Message ------
+
From: "xxxx" <xxxx= +@xxxx.com>
+
To: "xxxx" <a= +xxxx@xxxx.com>
+
Sent: 4/13/2018 7:06:43 PM
+
Subject: xxxx

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + mangez des saucisses + + + 3D= +
+
+ + + + +
+

xxxx.=20 +,

+

+xxxx. +

+ +

You can reply = +to this email if you have any questions.

+

Thank you,

+
+
+ + + + + +
+ xxxx
+ +1-801-980-4240 +
+ info@aust-mfg.com= +
+ + http://www.xxxx.com + +
+
+ Powered by Odo= +o. +
+ =20 +
xxxx.
+
+
+ +--------=_MB48E455BD-2850-42EC-B1CA-886CDF48905E--""" + + + +MAIL_XHTML = """Return-Path: +Received: from xxxx.internal (xxxx.xxxx.internal [1.1.1.1]) + by xxxx (xxxx 1.1.1-111-g972eecc-slipenbois) with LMTPA; + Fri, 13 Apr 2018 22:11:52 -0400 +X-Cyrus-Session-Id: sloti35d1t38-1111111-11111111111-5-11111111111111111111 +X-Sieve: CMU Sieve 1.0 +X-Spam-known-sender: no ("Email failed DMARC policy for domain"); in-addressbook +X-Spam-score: 0.0 +X-Spam-hits: ALL_TRUSTED -1, BAYES_00 -1.9, FREEMAIL_FROM 0.001, + HTML_FONT_LOW_CONTRAST 0.001, HTML_MESSAGE 0.001, SPF_SOFTFAIL 0.665, + LANGUAGES en, BAYES_USED global, SA_VERSION 1.1.0 +X-Spam-source: IP='1.1.1.1', Host='unk', Country='unk', FromHeader='com', + MailFrom='com' +X-Spam-charsets: plain='utf-8', html='utf-8' +X-IgnoreVacation: yes ("Email failed DMARC policy for domain") +X-Resolved-to: catchall@xxxx.xxxx +X-Delivered-to: catchall@xxxx.xxxx +X-Mail-from: xxxx@xxxx.com +Received: from mx4 ([1.1.1.1]) + by xxxx.internal (LMTPProxy); Fri, 13 Apr 2018 22:11:52 -0400 +Received: from xxxx.xxxx.com (localhost [127.0.0.1]) + by xxxx.xxxx.internal (Postfix) with ESMTP id E1111C1111; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from xxxx.xxxx.internal (localhost [127.0.0.1]) + by xxxx.xxxx.com (Authentication Milter) with ESMTP + id BBDD1111D1A; + Fri, 13 Apr 2018 22:11:51 -0400 +ARC-Authentication-Results: i=1; xxxx.xxxx.com; arc=none (no signatures found); + dkim=pass (2048-bit rsa key sha256) header.d=xxxx.com header.i=@xxxx.com header.b=P1aaAAaa x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=fm2; + dmarc=fail (p=none,d=none) header.from=xxxx.com; + iprev=pass policy.iprev=1.1.1.1 (out1-smtp.xxxx.com); + spf=softfail smtp.mailfrom=xxxx@xxxx.com smtp.helo=out1-smtp.xxxx.com; + x-aligned-from=pass (Address match); + x-cm=none score=0; + x-ptr=pass x-ptr-helo=out1-smtp.xxxx.com x-ptr-lookup=out1-smtp.xxxx.com; + x-return-mx=pass smtp.domain=xxxx.com smtp.result=pass smtp_is_org_domain=yes header.domain=xxxx.com header.result=pass header_is_org_domain=yes; + x-tls=pass version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128; + x-vs=clean score=0 state=0 +Authentication-Results: xxxx.xxxx.com; + arc=none (no signatures found); + dkim=pass (2048-bit rsa key sha256) header.d=xxxx.com header.i=@xxxx.com header.b=P1awJPiy x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=fm2; + dmarc=fail (p=none,d=none) header.from=xxxx.com; + iprev=pass policy.iprev=66.111.4.25 (out1-smtp.xxxx.com); + spf=softfail smtp.mailfrom=xxxx@xxxx.com smtp.helo=out1-smtp.xxxx.com; + x-aligned-from=pass (Address match); + x-cm=none score=0; + x-ptr=pass x-ptr-helo=out1-smtp.xxxx.com x-ptr-lookup=out1-smtp.xxxx.com; + x-return-mx=pass smtp.domain=xxxx.com smtp.result=pass smtp_is_org_domain=yes header.domain=xxxx.com header.result=pass header_is_org_domain=yes; + x-tls=pass version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128; + x-vs=clean score=0 state=0 +X-ME-VSCategory: clean +X-ME-CMScore: 0 +X-ME-CMCategory: none +Received-SPF: softfail + (gmail.com ... _spf.xxxx.com: Sender is not authorized by default to use 'xxxx@xxxx.com' in 'mfrom' identity, however domain is not currently prepared for false failures (mechanism '~all' matched)) + receiver=xxxx.xxxx.com; + identity=mailfrom; + envelope-from="xxxx@xxxx.com"; + helo=out1-smtp.xxxx.com; + client-ip=1.1.1.1 +Received: from xxxx.xxxx.internal (gateway1.xxxx.internal [1.1.1.1]) + (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) + (No client certificate requested) + by xxxx.xxxx.internal (Postfix) with ESMTPS; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from compute3.internal (xxxx.xxxx.internal [10.202.2.43]) + by xxxx.xxxx.internal (Postfix) with ESMTP id 8BD5B21BBD; + Fri, 13 Apr 2018 22:11:51 -0400 (EDT) +Received: from xxxx ([10.202.2.163]) + by xxxx.internal (MEProxy); Fri, 13 Apr 2018 22:11:51 -0400 +X-ME-Sender: +Received: from [1.1.1.1] (unknown [1.1.1.1]) + by mail.xxxx.com (Postfix) with ESMTPA id BF5E1111D + for ; Fri, 13 Apr 2018 22:11:50 -0400 (EDT) +From: "xxxx xxxx" +To: "xxxx" +Subject: Re: xxxx (Ref PO1) +Date: Sat, 14 Apr 2018 02:11:42 +0000 +Message-Id: +In-Reply-To: <829228111124527.1111111602.256611118262939-openerp-129-xxxx.xxxx@ip-1-1-1-1> +References: <867911111953277.1523671337.187951111160400-openerp-129-xxxx.xxxx@ip-1-1-1-1> + <867911111953277.1523671337.256611118262939-openerp-129-xxxx.xxxx@ip-1-1-1-1> +Reply-To: "xxxx xxxx" +User-Agent: eM_Client/7.0.26687.0 +Mime-Version: 1.0 +Content-Type: multipart/alternative; + boundary="------=_MB48E455BD-1111-42EC-1111-886CDF48905E" + +--------=_MB48E455BD-1111-42EC-1111-886CDF48905E +Content-Type: text/plain; format=flowed; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +xxxx + + +------ Original Message ------ +From: "xxxx" +To: "xxxx" +Sent: 4/13/2018 7:06:43 PM +Subject: xxxx + +>xxxx + +--------=_MB48E455BD-1111-42EC-1111-886CDF48905E +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +
this is a reply to PO200109 from emClient
--
xxxx
xxxx
xxxx



+
------ Original Message ------
+
From: "xxxx" <xxxx= +@xxxx.com>
+
To: "xxxx" <a= +xxxx@xxxx.com>
+
Sent: 4/13/2018 7:06:43 PM
+
Subject: xxxx

+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + mangez des saucisses + + + 3D= +
+
+ + + + +
+

xxxx.=20 +,

+

+xxxx. +

+ +

You can reply = +to this email if you have any questions.

+

Thank you,

+
+
+ + + + + +
+ xxxx
+ +1-801-980-4240 +
+ info@aust-mfg.com= +
+ + http://www.xxxx.com + +
+
+ Powered by Odo= +o. +
+ =20 +
xxxx.
+
+
+ +--------=_MB48E455BD-2850-42EC-B1CA-886CDF48905E--""" + class TestMailgateway(TestMail): @@ -327,7 +951,7 @@ class TestMailgateway(TestMail): 'subject': 'Public Discussion', 'message_type': 'email', 'author_id': self.partner_1.id, - 'message_id': '<123456-flectra-%s-mail.test@%s>' % (self.test_public.id, socket.gethostname()), + 'message_id': '<123456-openerp-%s-mail.test@%s>' % (self.test_public.id, socket.gethostname()), }) @mute_logger('flectra.addons.mail.models.mail_thread') @@ -366,12 +990,6 @@ class TestMailgateway(TestMail): self.assertEqual(res['body'], '') self.assertEqual(res['attachments'][0][0], 'thetruth.pdf') - @mute_logger('flectra.addons.mail.models.mail_thread') - def test_message_parse_eml(self): - """ Test that the parsing of mail with embedded emails as eml(msg) which generates empty attachments, can be processed. - """ - self.env['mail.thread'].message_process('mail.channel', MAIL_EML_ATTACHMENT) - @mute_logger('flectra.addons.mail.models.mail_thread') def test_message_parse_xhtml(self): """ Test that the parsing of mail with embedded emails as eml(msg) which generates empty attachments, can be processed. @@ -540,13 +1158,7 @@ class TestMailgateway(TestMail): 'message_process: email should be sent to Sylvie') # TODO : the author of a message post on mail.test should not be added as follower - # FAIL ON 'message_process: after reply, group should have 2 followers') ` AssertionError: res.partner(104,) != res.partner(104, 105) : message_process: after reply, group should have 2 followers - # Test: author (and not recipient) added as follower - # self.assertEqual(self.test_public.message_partner_ids, self.partner_1 | self.partner_2, - # 'message_process: after reply, group should have 2 followers') - # self.assertEqual(self.test_public.message_channel_ids, self.env['mail.test'], - # 'message_process: after reply, group should have 2 followers (0 channels)') @mute_logger('flectra.addons.mail.models.mail_thread', 'flectra.models') def test_message_process_in_reply_to(self): @@ -581,6 +1193,7 @@ class TestMailgateway(TestMail): MAIL_TEMPLATE, to='erroneous@example.com', extra='References: <2233@a.com>\r\n\t<3edss_dsa@b.com> %s' % self.fake_email.message_id, msg_id='<1198923581.41972151344608186800.JavaMail.4@agrolait.com>') + self.assertEqual(len(self.test_public.message_ids), 2, 'message_process: group should contain one new message') self.assertEqual(len(self.fake_email.child_ids), 1, 'message_process: new message should be children of the existing one') @@ -593,10 +1206,10 @@ class TestMailgateway(TestMail): extra='References: <2233@a.com>\r\n\t<3edss_dsa@b.com> %s' % self.fake_email.message_id, msg_id='<1198923581.41972151344608186800.JavaMail.4@agrolait.com>', target_model='mail.channel') - self.assertEqual(len(self.test_public.message_ids), 1, 'message_process: group should not contain new message') - self.assertEqual(len(self.fake_email.child_ids), 0, 'message_process: original email should not contain childs') - self.assertEqual(res_test.name, 'My Dear Forward') - self.assertEqual(len(res_test.message_ids), 1) + + self.assertEqual(len(self.test_public.message_ids), 2, 'message_process: group should not contain new message') + self.assertEqual(len(self.fake_email.child_ids), 1, 'message_process: original email should not contain childs') + self.assertEqual(len(res_test.message_ids), 0) @mute_logger('flectra.addons.mail.models.mail_thread', 'flectra.models') def test_message_process_references_forward_cc(self): @@ -618,11 +1231,11 @@ class TestMailgateway(TestMail): self.format_and_process, MAIL_TEMPLATE, email_from='valid.lelitre@agrolait.com', to='noone@example.com', subject='spam', - extra='In-Reply-To: <12321321-flectra-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()), + extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()), msg_id='<1198923581.41972151344608186802.JavaMail.diff1@agrolait.com>') # when 6.1 messages are present, compat mode is available - # Flectra 10 update: compat mode has been removed and should not work anymore + # Odoo 10 update: compat mode has been removed and should not work anymore self.fake_email.write({'message_id': False}) # Do: compat mode accepts partial-matching emails self.assertRaises( @@ -631,16 +1244,16 @@ class TestMailgateway(TestMail): MAIL_TEMPLATE, email_from='other5@gmail.com', msg_id='<1.2.JavaMail.new@agrolait.com>', to='noone@example.com>', subject='spam', - extra='In-Reply-To: <12321321-flectra-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname())) + extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname())) # 3''. 6.1 compat mode should not work if hostname does not match! - # Flectra 10 update: compat mode has been removed and should not work anymore and does not depend from hostname + # Odoo 10 update: compat mode has been removed and should not work anymore and does not depend from hostname self.assertRaises(ValueError, self.format_and_process, MAIL_TEMPLATE, email_from='other5@gmail.com', msg_id='<1.3.JavaMail.new@agrolait.com>', to='noone@example.com>', subject='spam', - extra='In-Reply-To: <12321321-flectra-%d-mail.test@neighbor.com>' % self.test_public.id) + extra='In-Reply-To: <12321321-openerp-%d-mail.test@neighbor.com>' % self.test_public.id) # Test created messages self.assertEqual(len(self.test_public.message_ids), 1)