Hi.
I have problems when try to send email from Odoo on premise.
When I testing the smtp connection settings with server, username and pass it works fine. When i check odoo log (smtp debug active) i see that smtp mail from address is ok (username field).
2020-12-15 23:33:45,872 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'ehlo localhost.vm\r\n'
2020-12-15 23:33:45,958 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-perfora.net Hello localhost.vm [xxx.xxx.xxx.xxx]\r\n'
2020-12-15 23:33:45,959 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-8BITMIME\r\n'
2020-12-15 23:33:45,959 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-AUTH LOGIN PLAIN\r\n'
2020-12-15 23:33:45,959 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250 SIZE 140000000\r\n'
2020-12-15 23:33:45,959 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: retcode (250); Msg: b'perfora.net Hello localhost.vm [xxx.xxx.xxx.xxx]\n8BITMIME\nAUTH LOGIN PLAIN\nSIZE
140000000'
2020-12-15 23:33:45,959 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'AUTH PLAIN AGFkbWluQGF0b21rcy5jb20ANHQwbUtTMjAxOSor\r\n'
2020-12-15 23:33:46,058 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'235 Authentication succeeded\r\n'
2020-12-15 23:33:46,058 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: retcode (235); Msg: b'Authentication succeeded'
2020-12-15 23:33:46,064 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'mail FROM:<admin@xxxxxxxx.com>\r\n'
2020-12-15 23:33:46,160 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250 Requested mail action okay, completed\r\n'
2020-12-15 23:33:46,160 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: retcode (250); Msg: b'Requested mail action okay, completed'
But, when I try to send some mail (Example: Reset password mail), this fails.
Checking the log I see that the smtp mail from address is wrong, and the smtp server returns an error
2020-12-15 23:34:59,522 3877 DEBUG odoo.modules.registry: Multiprocess signaling check: [Registry - 35 -> 35] [Cache - 1046 -> 1046]
2020-12-15 23:34:59,523 3877 DEBUG odoo.api: call res.users(11,).action_reset_password()
2020-12-15 23:34:59,861 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'ehlo localhost.vm\r\n'
2020-12-15 23:34:59,927 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-perfora.net Hello localhost.vm [xxx.xxx.xxx.xxx]\r\n'
2020-12-15 23:34:59,927 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-8BITMIME\r\n'
2020-12-15 23:34:59,927 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250-AUTH LOGIN PLAIN\r\n'
2020-12-15 23:34:59,927 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'250 SIZE 140000000\r\n'
2020-12-15 23:34:59,927 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: retcode (250); Msg: b'perfora.net Hello localhost.vm [xxx.xxx.xxx.xxx]\n8BITMIME\nAUTH LOGIN PLAIN\nSIZE
140000000'
2020-12-15 23:34:59,928 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'AUTH PLAIN AGFkbWluQGF0b21rcy5jb20ANHQwbUtTMjAxOSor\r\n'
2020-12-15 23:35:00,003 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'235 Authentication succeeded\r\n'
2020-12-15 23:35:00,003 3877 DEBUG telefonica odoo.addons.base.models.ir_mail_server: reply: retcode (235); Msg: b'Authentication succeeded'
020-12-15 23:35:00,018 3877 DEBUG odoo.addons.base.models.ir_mail_server: send: 'mail FROM:<bounce+45-res.users-11@Ionos> size=7798\r\n'
2020-12-15 23:35:00,089 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'550-Requested action not taken: mailbox unavailable\r\n'
2020-12-15 23:35:00,089 3877 DEBUG odoo.addons.base.models.ir_mail_server: reply: b'550 invalid DNS MX or A/AAAA resource record\r\n'
I check the sender user email and company email and both are correct(in the mail template the from fileds has this code: "${object.company_id.name | safe}" <${(object.company_id.email or user.email) | safe}>). I can't identify why is using this email from address, or how I can change this.
Someone can help me please