Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
5434 Vistas

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

Avatar
Descartar
Autor Mejor respuesta

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




Avatar
Descartar

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.

Mejor respuesta

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.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
1206
2
may 25
1309
0
abr 25
1081
1
abr 25
1408
1
mar 25
1534