Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][IMP] mail_environment: ssl certificate auth #196

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mail_environment/models/ir_mail_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@
"smtp_port": {},
"smtp_user": {},
"smtp_pass": {},
"smtp_ssl_certificate": {}, # the value must be base64 encoded
"smtp_ssl_private_key": {}, # the value must be base64 encoded
"smtp_encryption": {},
"smtp_authentication": {
"compute_default": "_compute_default_authentication"
},
}
mail_fields.update(base_fields)
return mail_fields

def _compute_default_authentication(self):
self.update({"smtp_authentication": "login"})

Check warning on line 30 in mail_environment/models/ir_mail_server.py

View check run for this annotation

Codecov / codecov/patch

mail_environment/models/ir_mail_server.py#L30

Added line #L30 was not covered by tests

@api.model
def _server_env_global_section_name(self):
"""Name of the global section in the configuration files
Expand Down
7 changes: 7 additions & 0 deletions mail_environment/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ Example of config file :
You will need to create 2 records in the database, one outgoing mail
server with the field name set to "odoo_smtp_server1" and one incoming
mail server with the field name set to "odoo_pop_mail1".

It is possible to use a SSL certificate for SMTP authentication. In this case,
you need to set the following entries in the configuration entry ::

smtp_authentication = certificate
smtp_ssl_certificate = <base64 encoded certificate>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this syntax generating the failure in the merge ?

smtp_ssl_private_key = <base64 encoded certificate>
Loading