Purpose
=======
Improve mailing subscription to be more compliant with the European GDPR law.
Keep a list of people who does not want to receive promotional emails
(or mass mailing in general) anymore.
Specifications
===========
This commit is regrouping some main changes on mass mailing.
- Added blacklist : Avoid sending mass mailing to blacklisted recipient
(blacklisted = email address that doens't want to receive mass mailing anymore)
Detailed implementation
===================
Mail :
- Add Blacklist mechanism in mail module (NOT in mass-mailing) :
as we can send mass-mail without the mass-mailing module
- Unicity in email -> To avoid error in import, override the create and return
the existing record if any, else, create the record normally.
- Blacklisting is done by email address and is cross model.
Will apply to model that inherit the blacklist.mixin.
- field 'is_blacklisted' -> computed : check if email is in blacklist
+ search method to be able to filter on is_blacklisted
- When a email address is blacklisted, it will never get mass mailings anymore.
Even if the email address is added to another mailing lists
- Avoid sending notification to blacklisted recipients when sending email
in mass mail mode. If the recipient is blacklisted, we should not even send a
notification in the recipient's chatter for an email that he won't even
receive.
- When a email address is blacklisted, it can still get 'normal' mailings.
- The blacklist shoud be accessible in
Mass Mailing / Configuration / Blacklist
and Settings / Technical / Email / Blacklist
-> Renaming Settings / Technical / White / Black List config menu item
into Channel Moderation to avoid confusion with Mass Mail Blacklist
- Add indexes to the blacklist table (on email) to make it fast for access for
the different use cases
- _primary_email : attribute that must be overriden to specify which field must
be used as email in the blacklist mechanism.
- Filtering the blacklisted recipient in mail composer :
done in mail._get mail value()
In case of real mass mailing, we need the statistics to be computed in order
to know how many recipients were ignored in the mail.
So we cannot avoid sending mail but instead flag the mail as canceled.
Task ID 33224
3.8 KiB
3.8 KiB
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | access_mail_message_all | mail.message.all | model_mail_message | 1 | 0 | 0 | 0 | |
| 3 | access_mail_message_portal | mail.message.portal | model_mail_message | base.group_portal | 1 | 1 | 1 | 1 |
| 4 | access_mail_message_user | mail.message.user | model_mail_message | base.group_user | 1 | 1 | 1 | 1 |
| 5 | access_mail_mail_all | mail.mail.all | model_mail_mail | 1 | 0 | 0 | 0 | |
| 6 | access_mail_mail_portal | mail.mail.portal | model_mail_mail | base.group_portal | 1 | 1 | 1 | 0 |
| 7 | access_mail_mail_user | mail.mail.user | model_mail_mail | base.group_user | 1 | 1 | 1 | 0 |
| 8 | access_mail_mail_system | mail.mail.system | model_mail_mail | base.group_system | 1 | 1 | 1 | 1 |
| 9 | access_mail_followers_all | mail.followers.all | model_mail_followers | 1 | 0 | 0 | 0 | |
| 10 | access_mail_followers_portal | mail.followers.portal | model_mail_followers | base.group_portal | 1 | 1 | 1 | 0 |
| 11 | access_mail_followers_user | mail.followers.user | model_mail_followers | base.group_user | 1 | 1 | 1 | 0 |
| 12 | access_mail_followers_system | mail.followers.system | model_mail_followers | base.group_system | 1 | 1 | 1 | 1 |
| 13 | access_mail_notification_portal | mail.notification.portal | model_mail_notification | base.group_portal | 1 | 0 | 0 | 0 |
| 14 | access_mail_notification_user | mail.notification.user | model_mail_notification | base.group_user | 1 | 1 | 1 | 0 |
| 15 | access_mail_notification_system | mail.notification.system | model_mail_notification | base.group_system | 1 | 1 | 1 | 1 |
| 16 | access_mail_channel_all | mail.group.all | model_mail_channel | 1 | 0 | 0 | 0 | |
| 17 | access_mail_channel_user | mail.group.user | model_mail_channel | base.group_user | 1 | 1 | 1 | 1 |
| 18 | access_mail_channel_partner_public | mail.channel.partner.public | model_mail_channel_partner | base.group_public | 1 | 0 | 0 | 0 |
| 19 | access_mail_channel_partner_portal | mail.channel.partner.portal | model_mail_channel_partner | base.group_portal | 1 | 1 | 1 | 1 |
| 20 | access mail_channel_partner_user | mail.channel.partner.user | model_mail_channel_partner | base.group_user | 1 | 1 | 1 | 1 |
| 21 | access_mail_moderation_user | mail.moderation.user | model_mail_moderation | base.group_user | 1 | 1 | 1 | 1 |
| 22 | access_mail_alias_all | mail.alias.all | model_mail_alias | 1 | 0 | 0 | 0 | |
| 23 | access_mail_alias_user | mail.alias.user | model_mail_alias | base.group_user | 1 | 1 | 1 | 1 |
| 24 | access_mail_alias_system | mail.alias.system | model_mail_alias | base.group_system | 1 | 1 | 1 | 1 |
| 25 | access_mail_message_subtype_all | mail.message.subtype.all | model_mail_message_subtype | 1 | 0 | 0 | 0 | |
| 26 | access_mail_message_subtype_user | mail.message.subtype.user | model_mail_message_subtype | base.group_user | 1 | 1 | 1 | 1 |
| 27 | access_mail_tracking_value_all | mail.tracking.value.all | model_mail_tracking_value | 0 | 0 | 0 | 0 | |
| 28 | access_mail_tracking_value_portal | mail.tracking.value.portal | model_mail_tracking_value | base.group_portal | 0 | 0 | 0 | 0 |
| 29 | access_mail_tracking_value_user | mail.tracking.value.user | model_mail_tracking_value | base.group_user | 0 | 0 | 0 | 0 |
| 30 | access_mail_tracking_value_system | mail.tracking.value.system | model_mail_tracking_value | base.group_system | 1 | 1 | 1 | 1 |
| 31 | access_mail_thread_all | mail.thread.all | model_mail_thread | 1 | 1 | 1 | 1 | |
| 32 | access_publisher_warranty_contract_all | publisher.warranty.contract.all | model_publisher_warranty_contract | 1 | 1 | 1 | 1 | |
| 33 | access_mail_template | mail.template | model_mail_template | base.group_user | 1 | 1 | 1 | 0 |
| 34 | access_mail_template_system | mail.template_system | model_mail_template | base.group_system | 1 | 1 | 1 | 1 |
| 35 | access_mail_shortcode | mail.shortcode | model_mail_shortcode | base.group_user | 1 | 1 | 1 | 1 |
| 36 | access_mail_shortcode_portal | mail.shortcode.portal | model_mail_shortcode | base.group_portal | 1 | 0 | 0 | 0 |
| 37 | access_mail_activity_all | mail.activity.all | model_mail_activity | 0 | 0 | 0 | 0 | |
| 38 | access_mail_activity_user | mail.activity.user | model_mail_activity | base.group_user | 1 | 1 | 1 | 1 |
| 39 | access_mail_activity_type_all | mail.activity.type.all | model_mail_activity_type | 0 | 0 | 0 | 0 | |
| 40 | access_mail_activity_type_user | mail.activity.type.user | model_mail_activity_type | base.group_user | 1 | 0 | 0 | 0 |
| 41 | access_mail_activity_type_system | mail.activity.type.system | model_mail_activity_type | base.group_system | 1 | 1 | 1 | 1 |
| 42 | access_mail_blacklist_system | access_mail_blacklist_system | model_mail_blacklist | base.group_system | 1 | 1 | 1 | 1 |