跳至内容
菜单
此问题已终结
2 回复
5441 查看

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

形象
丢弃
编写者 最佳答案

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




形象
丢弃

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.

最佳答案

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.

形象
丢弃
相关帖文 回复 查看 活动
2
8月 25
1414
1
5月 25
1206
2
5月 25
1311
0
4月 25
1082
1
3月 25
1535