[IMP] crm|mail: Use flanker to check email correctness
Context
-------
Lead assignement is now based on PLS probability.
We want to avoid giving the same score to real email addresses
and email addresses that are just well formed
Flanker try to acheive that be checking specific
criteria according to the domain, check the dns and mx record
Improvement
-----------
Define a mail_validate function seach as phone_validate.
If flanker is installed, use flanker for validation of
email addresses else use email_normalize.
It should help the PLS to give a bad score to well formed addresses
that flanker suspect to be wrong.
Setup
-----
NB: flanker is not available as debian package, we make it optional
To install flanker
```
pip install flanker
pip install redis
pip install dnsq
```
If you have installed it as root you may need to run
```py
from flanker.addresslib import address
```
as root for the first initialisation
closes odoo/odoo#66429
X-original-commit: f540976c8751e2bf402fed8db830ec0fbf98f654
Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Showing
- addons/crm/models/crm_lead.py 4 additions, 1 deletionaddons/crm/models/crm_lead.py
- addons/mail/__init__.py 1 addition, 1 deletionaddons/mail/__init__.py
- addons/mail/tools/__init__.py 4 additions, 0 deletionsaddons/mail/tools/__init__.py
- addons/mail/tools/mail_validation.py 27 additions, 0 deletionsaddons/mail/tools/mail_validation.py
Loading
Please register or sign in to comment