<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/test_mail/data/test_mail_data.py, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] mail: add support for Text/RFC822-Headers content-type</title>
<updated>2020-12-02T09:57:44+00:00</updated>
<author>
<name>Jairo Llopis</name>
<email>jairo.llopis@tecnativa.com</email>
</author>
<published>2019-12-24T11:56:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=375ba5b37053a599922dd61c9e787553d6171291'/>
<id>375ba5b37053a599922dd61c9e787553d6171291</id>
<content type='text'>
WHY:

Some mail servers may provide `Message-Id` header in a section typed
`text/rfc822-headers` instead of a `message/rfc822`

According to https://tools.ietf.org/html/rfc6522#section-4 that section's body
actually contains the headers from the bounced email.

STEPS: a way to reproduce it should be using postfix v2.5+ with setting
bounce_size_limit=1. See
https://github.com/odoo/odoo/pull/42340#issuecomment-617605521

BEFORE: `bounced_message_id` is empty and thus the little email envelope icon
doesn't turn red, nor do the email resend features trigger in the UI. You could
be sending an invoice and never knowing it was bounced.

AFTER: bounces from mail servers that return the `text/rfc822-headers` part will
be handled properly.

---

@Tecnativa TT21170
opw-2162067
opw-2344252
closes #42340
closes #62551

closes odoo/odoo#62706

X-original-commit: 3dc72b357c9bfa81867972c5c9b20dc028932d8b
Signed-off-by: Ivan Yelizariev // IEL &lt;yelizariev@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WHY:

Some mail servers may provide `Message-Id` header in a section typed
`text/rfc822-headers` instead of a `message/rfc822`

According to https://tools.ietf.org/html/rfc6522#section-4 that section's body
actually contains the headers from the bounced email.

STEPS: a way to reproduce it should be using postfix v2.5+ with setting
bounce_size_limit=1. See
https://github.com/odoo/odoo/pull/42340#issuecomment-617605521

BEFORE: `bounced_message_id` is empty and thus the little email envelope icon
doesn't turn red, nor do the email resend features trigger in the UI. You could
be sending an invoice and never knowing it was bounced.

AFTER: bounces from mail servers that return the `text/rfc822-headers` part will
be handled properly.

---

@Tecnativa TT21170
opw-2162067
opw-2344252
closes #42340
closes #62551

closes odoo/odoo#62706

X-original-commit: 3dc72b357c9bfa81867972c5c9b20dc028932d8b
Signed-off-by: Ivan Yelizariev // IEL &lt;yelizariev@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] base,mail,tools: use new python email API</title>
<updated>2019-09-19T14:24:31+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2019-08-21T14:43:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=18299d7e5051cdad29854bc7280db5002a209500'/>
<id>18299d7e5051cdad29854bc7280db5002a209500</id>
<content type='text'>
[PEP 594] is going to depreciate the legacy `email.message.Message` API
and its related modules: `email.(charset|header|mime|utils)`.

The new `email.message.EmailMessage` API exposes a much easier interface
to create multiparted emails [1], is capable of doing all the necessary
headers value conversion (RFCs [2045], [2047], [2049]) [2] and get/set
different flavor of payload (text/bytes) in a straightforward way [3].

All headers are structured in a way to support python native types, i.e.
the `Date` header supports `datetime.datetime` objects and automatically
performs the required formatting. The same goes for multi-valued headers
like the `To` header, one can directly set a python list of values, it
will be automatically be formatted according to the RFCs.

The dedicated encoding and decoding functions are no more needed thus
has been removed has part of the refactor. FTR, [RFC2231] is an update
of [RFC2047] and based on tests we've just conducted, both GMail and
Thunderbird now support RFC2231 encoding just fine in all headers:
attachments names, From, etc.

[1]: http://docs.python.org/3/library/email.message.html
[2]: http://docs.python.org/3/library/email.headerregistry.html
[3]: http://docs.python.org/3/library/email.contentmanager.html
[2045]: https://tools.ietf.org/html/rfc2045
[2047]: https://tools.ietf.org/html/rfc2047
[2049]: https://tools.ietf.org/html/rfc2049
[2231]: https://tools.ietf.org/html/rfc2231

closes odoo/odoo#35929

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[PEP 594] is going to depreciate the legacy `email.message.Message` API
and its related modules: `email.(charset|header|mime|utils)`.

The new `email.message.EmailMessage` API exposes a much easier interface
to create multiparted emails [1], is capable of doing all the necessary
headers value conversion (RFCs [2045], [2047], [2049]) [2] and get/set
different flavor of payload (text/bytes) in a straightforward way [3].

All headers are structured in a way to support python native types, i.e.
the `Date` header supports `datetime.datetime` objects and automatically
performs the required formatting. The same goes for multi-valued headers
like the `To` header, one can directly set a python list of values, it
will be automatically be formatted according to the RFCs.

The dedicated encoding and decoding functions are no more needed thus
has been removed has part of the refactor. FTR, [RFC2231] is an update
of [RFC2047] and based on tests we've just conducted, both GMail and
Thunderbird now support RFC2231 encoding just fine in all headers:
attachments names, From, etc.

[1]: http://docs.python.org/3/library/email.message.html
[2]: http://docs.python.org/3/library/email.headerregistry.html
[3]: http://docs.python.org/3/library/email.contentmanager.html
[2045]: https://tools.ietf.org/html/rfc2045
[2047]: https://tools.ietf.org/html/rfc2047
[2049]: https://tools.ietf.org/html/rfc2049
[2231]: https://tools.ietf.org/html/rfc2231

closes odoo/odoo#35929

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] mail: move and improve bounce management in mail gateway</title>
<updated>2019-08-09T14:30:55+00:00</updated>
<author>
<name>David Beguin</name>
<email>dbe@odoo.com</email>
</author>
<published>2019-01-04T10:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f4524f03c32a27b1899562a71cad6f491bfe44ce'/>
<id>f4524f03c32a27b1899562a71cad6f491bfe44ce</id>
<content type='text'>
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Purpose
  * move bounce information detection in message parsing. It allows to have
    this information available in various steps of routing instead of having
    to manually re-compute them;
  * handle bounce in specific methods allowing easy override;
  * improve bounce management, notably when detecting a bounce not linked
    to the bounce alias configuration;
  * better integration with blacklist mechanism;

Specifications
  * compute bounce information in ``_message_parse_extract_bounce``.It parses
    bounce information and returns a dictionary allowing to update parsed email
    values;
  * remove override in mass_mailign that basically does what mail already
    does;
  * manage bounce in ``_routing_handle_bounce``;
  * when detecting a bounce, correctly call the bounce management method on
    all models inheriting from blacklist;
  * correctly update bounce counter;
  * bounced mailing traces and automatic blacklist in mass mailing should
    be done in ``_routing_handle_bounce``;
  * add some tests;

LINKS

Related to task 1893155
Linked to PR #33340</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PURPOSE

Add some improvements in mail gateway: remove private discussion, improve
bounce management, allow resetting bounce counters, improve automatic set or
reset of blacklists and ease mass mailing inheritance.

SPECIFICATIONS

Purpose
  * move bounce information detection in message parsing. It allows to have
    this information available in various steps of routing instead of having
    to manually re-compute them;
  * handle bounce in specific methods allowing easy override;
  * improve bounce management, notably when detecting a bounce not linked
    to the bounce alias configuration;
  * better integration with blacklist mechanism;

Specifications
  * compute bounce information in ``_message_parse_extract_bounce``.It parses
    bounce information and returns a dictionary allowing to update parsed email
    values;
  * remove override in mass_mailign that basically does what mail already
    does;
  * manage bounce in ``_routing_handle_bounce``;
  * when detecting a bounce, correctly call the bounce management method on
    all models inheriting from blacklist;
  * correctly update bounce counter;
  * bounced mailing traces and automatic blacklist in mass mailing should
    be done in ``_routing_handle_bounce``;
  * add some tests;

LINKS

Related to task 1893155
Linked to PR #33340</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] test_mail: add tests for mail gateway and perform light cleaning</title>
<updated>2019-04-26T10:28:09+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2019-04-15T15:33:23+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e87189222dfcb1c2ca3285862c9d7a28d6ea1426'/>
<id>e87189222dfcb1c2ca3285862c9d7a28d6ea1426</id>
<content type='text'>
This commit add some tests related to the mail gateway: more bounce management
tests and some additional thread formation tests. Some test asserts about
bounce / blacklist management are commented as they are not completely working
currently. This will be improved in master soon.

Some cleaning in also done in all mail gateway tests. Notably some call to
tool methods are cleaned / simplified, duplicate tests are removed. Some
low-level checks are removed.

A new test model is added for mail gateway: mail.test.gateway. It is a
chatter model with blacklist enabled on it. It allows to tests the
various blacklist-related overrides and features as well as all basic
mail gateway features.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit add some tests related to the mail gateway: more bounce management
tests and some additional thread formation tests. Some test asserts about
bounce / blacklist management are commented as they are not completely working
currently. This will be improved in master soon.

Some cleaning in also done in all mail gateway tests. Notably some call to
tool methods are cleaned / simplified, duplicate tests are removed. Some
low-level checks are removed.

A new test model is added for mail gateway: mail.test.gateway. It is a
chatter model with blacklist enabled on it. It allows to tests the
various blacklist-related overrides and features as well as all basic
mail gateway features.

Sub-part of task 1853147 (pre-cleaning before implementing mail gateway
improvements)
Linked to PR #32974</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch 11.0 up to 59a8a1cd8ee</title>
<updated>2018-05-17T11:19:49+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2018-05-17T11:19:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=16552029241b3a7a3d9a40b8b7399da6ee415be4'/>
<id>16552029241b3a7a3d9a40b8b7399da6ee415be4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch 11.0 up to 2787de8c68f</title>
<updated>2018-05-14T14:46:11+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2018-05-14T14:46:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e70e5b6cf3379f803b08296e4413a527e79b6a4c'/>
<id>e70e5b6cf3379f803b08296e4413a527e79b6a4c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch 11.0 up to c201cf2b77c</title>
<updated>2017-12-01T11:55:02+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2017-12-01T11:55:02+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2f9947045896b8dfeb9b7bf4771c904665d22b47'/>
<id>2f9947045896b8dfeb9b7bf4771c904665d22b47</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MOV] (test_)mail: move tests into their dedicated module</title>
<updated>2017-11-29T09:11:15+00:00</updated>
<author>
<name>Thibault Delavallée</name>
<email>tde@odoo.com</email>
</author>
<published>2017-11-21T12:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d040bfde89fca1c702e6e95c3b808e0b48c2267a'/>
<id>d040bfde89fca1c702e6e95c3b808e0b48c2267a</id>
<content type='text'>
Purpose: avoid having useless tables for test models in a
production environment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Purpose: avoid having useless tables for test models in a
production environment.
</pre>
</div>
</content>
</entry>
</feed>
