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

Hello,


I'm with the Odoo version 9 community and I'm having problems sending emails, I get the following error:

Fallo de entrega de correo
La entrega de correo falló vía el servidor SMTP 'mail.domain.com'.
SMTPRecipientsRefused: {'nnnnn@domain.com': (550, 'Verification failed for <nnnnn-5-crm.claim-5@domain.com>\nNo Such User Here"\nSender verify failed')}

The SMTP server is configured correctly and the test connection button gives me OK.


The email address indicated in the error message obviously does not exist, the correct one is nnnnn@domain.com.


I imagine that something is missing at the SMTP server level, I have looked everywhere and I cannot find the solution.


Thank you very much

Greetings

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

I found the solution:


1) Create bounce@mydomain.com in my mail server.

2) In ‪addons\mail\models\mail_mail.py, function send:


                # headers
                headers = {}
                bounce_alias = self.env['ir.config_parameter'].get_param("mail.bounce.alias")
                catchall_domain = self.env['ir.config_parameter'].get_param("mail.catchall.domain")
                if bounce_alias and catchall_domain:
                    if mail.model and mail.res_id:
                        headers['Return-Path'] = '%s-%d-%s-%d@%s' % (bounce_alias, mail.id, mail.model, mail.res_id, catchall_domain)
                       
                    else:
                        headers['Return-Path'] = '%s-%d@%s' % (bounce_alias, mail.id, catchall_domain)
                       
                if mail.headers:
                    try:
                        headers.update(eval(mail.headers))
                    except Exception:
                        pass
Replace headers['Return-Path'] with:

headers['Return-Path'] = '%s@%s' % (bounce_alias, catchall_domain)

With this change the address bounce-5-claim-1@domain.com is no longer defined and bounce@domain.com is used causing the correct validation on the smtp server.

I tried sending an email, replying to it and everything worked fine.

I would like to know if this change affects any functionality of odoo.

Thank you




Ảnh đại diện
Huỷ bỏ

This is not the recommended way and may break the successful fetching of messages to objects. Instead set the correct system parameters, use a catchall email account and an SMTP provider, which allows relaying.

Câu trả lời hay nhất

Where is your email hosted? And can you share the config you are using?

I think these should help the community with providing an answer to you.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 25
1459
1
thg 5 25
1206
2
thg 5 25
1314
0
thg 4 25
1083
1
thg 3 25
1539