Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5445 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit

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.

Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
1458
1
kvě 25
1206
2
kvě 25
1312
0
dub 25
1082
1
bře 25
1538