This talk will be most beneficial to beginner (to advanced) developers and system administrators. During this session we'll explain how to configure your own mail servers to work with Odoo, whether it's for incoming or outgoing mails, on-premise or on the cloud, or with your own domain or not.
You'll learn about smtp, SPF, DKIM, and all those acronyms that come up when you talk to someone about mail servers. You'll also learn about some specific mail providers, like Office365, and how to deal with them in regards to Odoo.
4. Domain name
On odoo.com and odoo.sh
xxx@yourinstance.odoo.com
Easy to use
xxx@your_own_domain.your_ext
Mandatory to enable the alias
fields
Already set up on the SaaS
5.
6. SPF
Sender Policy Framework
Which mail server can send an email from my domain
Configured through DNS
v=spf1 include:_spf.odoo.com include:_spf.google.com ~all
7. DKIM
Standard to protect against spam
Mail server add a signature
Public key published through DNS
odoo._domainkey CNAME odoo._domainkey.odoo.com
8. DMARC
Control spf and DKIM alignment
Configured through DNS
v=DMARC1;p=quarantine;pct=100;
rua=mailto:postmaster@example.org;
ruf=mailto:forensik@example.org;
adkim=s;aspf=r
Progressive implementation
On SaaS, 2 txt records, 1 CNAME and you're on.
12. The most basic one
From command line
Default localhost, 25,
On all DB of the server
--email-from <address>
--smtp <server>
--smtp-port <port>
--smtp-ssl
--smtp-user <name>
--smtp-password <password>
./odoo-bin --smtp mail.merciqui.com --smtp-port 25 --smtp-user jacquie@merciqui.com --smtp-password Michel
Also available in config file of course
13. In database
Override the command line
configuration
Manage priority of mail servers
Permit to select outgoing mail
server in mail template
14. Odoo server with my own domain
Odoo.com and odoo.sh
Odoo manage reputation and blacklisting of servers
Limits to email quantities
check SPF
v=spf1 include:_spf.odoo.com include:_spf.office365.com ~all
15. Office 365
Need to configure the connection on the Office 365 side
No accurate connector on the Office365 side!
Use the odoo servers with proper spf configuration
Official Microso Documentation
Auth via username/password
Auth via IP adress
Send only internal emails
Can only sent from authenticated email adress
No per client IP on odoo.com/odoo.sh
Need to notify customers
16. G suite
Need to configure the connection on the Gsuite side
Also possible to use the odoo servers with proper spf configuration
Official Google Documentation
Auth via username/password
Enable SMTP relay
Allow Any addresses in the Allowed senders section
18. Some basics
Odoo is not another webmail client
Based on cron (in database config)
Or not... (external process)
Based on headers
19. In database
Pop / Imap
Based on cron
Not possible through command
line configuration
Empty the mailbox
Create new objects, post
messages, ...
Once an hour on Odoo SaaS
20.
21. On odoo.com/.sh
For postfix
xxx@your_instance.odoo.com
Not based on cron
Also available on premise
addons/mail/static/scripts/openerp_mailgate.py --host=HOSTNAME --port=PORT -u 2 -p PASSWORD -d database
/etc/postfix/virtual_aliases
@youdomain openerp_mailgate@localhost
/etc/aliases
openerp_mailgate: "|/path/to/openerp-mailgate.py --host=localhost -u 2 -p PASSWORD -d yourdb"