diff --git a/content/applications/productivity/discuss/advanced/email_servers.rst b/content/applications/productivity/discuss/advanced/email_servers.rst index 06f7dfcfd..8579d3e39 100644 --- a/content/applications/productivity/discuss/advanced/email_servers.rst +++ b/content/applications/productivity/discuss/advanced/email_servers.rst @@ -136,20 +136,38 @@ Instead, you can also configure Odoo to do something similar by itself: .. image:: media/alias_domain.png :align: center +#. Click on *Outgoing Mail Servers* + +#. Create a new one. + +#. Fill its *From Filter*. + + .. image:: media/outgoing_server_from_filter.png + :align: center + + * Use a domain (such as ``mycompany.example.com``) to keep the original "From" + address for mails that come from that domain. + + * Use an address (such as ``outgoing@mycompany.example.com``) to allow only + that outgoing address. + + * Keep it empty to use this server for any email address. + + With this configuration in place, if Odoo sends an email that doesn't match any + of the *from filters*, it will alter the email's "From" before sending it to + the MTA. + + It will use the default outgoing email address, composed like this: + ``{mail.default.from}@{mail.catchall.domain}``. + #. In developer mode, go to :menuselection:`Settings --> Technical --> Parameters --> System Parameters`. -#. Add one system parameter from these: +#. Add these system parameters: - * If you want *all* your outgoing messages to use the same "From" address, - use the key ``mail.force.smtp.from`` and set that address as value - (such as ``outgoing@mycompany.example.com``). + * ``mail.default.from``: local part of default outgoing email address. - * If you want to keep the original "From" address for emails that use your - same domain, but change it for emails that use a different domain, use - the key ``mail.dynamic.smtp.from`` and set as value the email address - that should be used in those cases (such as - ``outgoing@mycompany.example.com``). + * ``mail.catchall.domain``: domain part of default outgoing email address. .. _discuss/email_servers/inbound_messages: diff --git a/content/applications/productivity/discuss/advanced/media/outgoing_server_from_filter.png b/content/applications/productivity/discuss/advanced/media/outgoing_server_from_filter.png new file mode 100644 index 000000000..246d22dbe Binary files /dev/null and b/content/applications/productivity/discuss/advanced/media/outgoing_server_from_filter.png differ diff --git a/content/developer/misc/other/cmdline.rst b/content/developer/misc/other/cmdline.rst index 0c9f43b98..1eed22616 100644 --- a/content/developer/misc/other/cmdline.rst +++ b/content/developer/misc/other/cmdline.rst @@ -259,6 +259,12 @@ Emails Email address used as when Odoo needs to send mails +.. option:: --from-filter
+ + Email address or domain that the mail server is configured for. If the + email of the sender does not match this value, it might be encapsulated + into ``mail.default.from``. + .. option:: --smtp Address of the SMTP server to connect to in order to send mails @@ -277,6 +283,14 @@ Emails Password to connect to the SMTP server +.. option:: --smtp-ssl-certificate-filename + + SSL certificate used for SMTP authentication + +.. option:: --smtp-ssl-private-key-filename + + SSL private key used for SMTP authentication + .. _reference/cmdline/server/internationalisation: Internationalisation