Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2559 Lượt xem

brand new db in Odoo 17, CE from git (17.0)

after doing initial config, setup of incoming and outgoing email servers, email domains, set mail.default.from (notifications@...com), setup of user email config's (and partner) all email 'setup' tests OK.

The Error:  

I create a new user. click send invitation... this gives me an error.

Invalid Operation
There was an error when trying to deliver your Email, please check your configuration

Looking at the error messages i get the following:

File "/opt/odoo17/addons/mail/models/mail_mail.py", line 648, in _send

    res = SendIrMailServer.send_email(

  File "/opt/odoo17/odoo/addons/base/models/ir_mail_server.py", line 706, in send_email

    raise MailDeliveryException(_("Mail Delivery Failed"), msg)

odoo.addons.base.models.ir_mail_server.MailDeliveryException: ('Mail Delivery Failed', "Mail delivery failed via SMTP server 'None'.\nSMTPSenderRefused: 550\nAuthenticated user notifications@domain.com cannot send mail as bounce@domain.com\nbounce@domain.com")

2024-02-14 06:46:13,909 60069 WARNING domain.com odoo.http: There was an error when trying to deliver your Email, please check your configuration 


My understanding is that 'Authenticated user' here (notifications@...) is the correct user, correct password etc. 

However, why is it trying to send as bounce@? Where is this set because I can not find this anywhere... the two mailboxes use the same password config etc.

The DNS setup is correct, accounts all setup correctly on the server, SPF set properly - working on 'identical' system.

changing the default.from either in system parameters or company or user records etc does not fix the issue. 

adding various parameters to system parameters doesn't seem to help (per the odoo email config docs).  

As mentioned, I have two systems using identical configs, same/relevant email server and DNS records - it seems to come down to the order in which things are done, luck or some ghostbuster chant required!?? 

Please help... if you have the secret sauce please share... it would be greatly appreciated.


Ảnh đại diện
Huỷ bỏ
Tác giả

Perhaps this is a clue. odoo/addons/base/models/ir_mail_server from line 567:
# Use the default bounce address **only if** no Return-Path was
# provided by caller. Caller may be using Variable Envelope Return
# Path (VERP) to detect no-longer valid email addresses.
# context may force a value, e.g. mail.alias.domain usage
bounce_address = self.env.context.get('domain_bounce_address') or message['Return-Path'] or self._get_default_bounce_address() or message['From']

smtp_from = message['From'] or bounce_address
assert smtp_from, self.NO_FOUND_SMTP_FROM

so the reason it is trying to use bounce is no reply is set...?
# Use the default bounce address **only if** no Return-Path was
# provided by caller.
So presumably there should be a way to 'set' the return-path for such system email notification calls and that should fix the problem... I'll see if i can find it.

Tác giả Câu trả lời hay nhất

For whatever reason (ie bug or a feature???) the way i solved it is the following.

in outgoing email servers I set 2 servers:

From_filter to notifications@domain.com as 1st (with a priority of 5) and login etc using the notification@ domain.com

From_Filter bounce@domain.com as the second outgoing server with priority 10 and login using bounce@domain.com..

various other combinations didn't work. 

this leaves me with some more work to do and still no clarify on why which worries me but on we march.

Cheers.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 4 24
1246
2
thg 2 24
5043
0
thg 1 25
1235
1
thg 10 24
1779
1
thg 2 25
1944