Skip to Content
Menú
This question has been flagged
2 Respostes
5437 Vistes

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 Best Answer

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.

Best Answer

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
Related Posts Respostes Vistes Activitat
2
d’ag. 25
1413
1
de maig 25
1206
2
de maig 25
1311
0
d’abr. 25
1082
1
de març 25
1535