hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.4k stars 680 forks source link

[Bug] exim4: Unrouteable address (with local domain, but using third mail service) #2901

Closed franciscopaniskaseker closed 2 years ago

franciscopaniskaseker commented 2 years ago

Describe the bug

The hestia server has two domains in different accounts: a.com b.com

Both were using external mail services (gmail) and they can talk with each other.

Then I migrated the b.com mail services to hestiacp and now b.com can talk with any external service (gmail, outlook, hotmail etc), but it can not talk with a.com anymore, and vice-versa.

root@mail:/var/log/exim4# exim -bt test@a.com
test@a.com is undeliverable: Unrouteable address

I do not apply any rate limit, but maybe is related with https://github.com/hestiacp/hestiacp/issues/2666#issuecomment-1160241281

Tell us how to replicate the bug

  1. setup domain a.com and b.com (examples)
  2. setup a.com dns to use third service email and b.com to use local mail service
  3. a.com and b.com will not talk with each other and exim will "return is undeliverable: Unrouteable address"

Which components are affected by this bug?

Mail (Exim, Dovecot)

Hestia Control Panel Version

1.6.7

Operating system

Ubuntu 20.04.5

Log capture

root@mail:/var/log/exim4# exim -bt test@a.com
test@a.com is undeliverable: Unrouteable address
root@mail:/var/log/exim4# exim -bt a.com
a.com@xyz.com
    <-- a.com@mail.a.com
  router = dnslookup, transport = remote_smtp
  host xyz.com [a.b.c.d]
2022-09-01 08:39:29 H=mail-oa1-f46.google.com [a.b.c.d] sender verify fail for <test@a.com>: Unrouteable address
ScIT-Raphael commented 2 years ago

Probaly you've created a.com aswell as mail domain on the hestia host? if yes, remove that one.

jaapmarcus commented 2 years ago

Probably the other way around a.com ... Exim will use local delivery about remote delivery

ScIT-Raphael commented 2 years ago

noticed my mistake and corrected it already ;). Going to close, not a bug.

franciscopaniskaseker commented 2 years ago

Probaly you've created a.com aswell as mail domain on the hestia host? if yes, remove that one.

I removed and now is working. Maybe this can be a new feature to the future: select remote or local mail service, like cpanel does. But at least now we have this documented here. thank you!

ScIT-Raphael commented 2 years ago

It doesnt make much sense as emails can only delivered at one host, you need to decide if you want to use hestia or the external host. Don't know if it is worth the work, but if you would like to see the function, you could still sponsor it :).

franciscopaniskaseker commented 2 years ago

I am saying because is common to have external mail services today to reduce spam problems and costs (amazon ses, gmail suite etc), but own web server to also reduce costs. And this people are interested in hestiacp and other free panels.

I am always ask for people that are interested in the feature to sponsor it or to donate to the project to help to maintain the project. I just troubleshoot problems and fix them at the moment.

I do not think this feature is really needed if we can just remove the mail domain from there. i just said because cpanel and plesk offer this option, but this is an easy move to fix.

ScIT-Raphael commented 2 years ago

Its indeed common, but its not common to have the mail domain aswell on the webhost - there is no need to create it, just skip that part and all will work well :).

jaapmarcus commented 2 years ago

https://github.com/hestiacp/hestiacp/blob/242df31a98f2ef2bed20157189b9b61592625f0e/install/deb/exim/exim4.conf.4.94.template#L266-L291

Replace: domains = !+local_domains

with

domains = *

And restart

belkisparada30 commented 1 year ago

Si me pueden ayudar, tengo varias cuentas DNS con una IP en el Hosting Hestia, pero no está aceptando enviar correos a la cuenta de Hotmail.com:

Mail delivery failed: returning message to sender 

Foto del contacto
De Mail Delivery System el 2023-01-31 23:52
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  belkisparada30@hotmail.com
    host hotmail-com.olc.protection.outlook.com [104.47.59.161]
    SMTP error from remote mail server after pipelined end of data:
    550 5.7.1 Unfortunately, messages from [185.234.69.116] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DM6NAM12FT008.eop-nam12.prod.protection.outlook.com 2023-02-01T02:52:56.703Z 08DB03E3F757F606]
Reporting-MTA: dns; panel1.pacal.cl

Action: failed
Final-Recipient: rfc822;belkisparada30@hotmail.com
Status: 5.0.0
Remote-MTA: dns; hotmail-com.olc.protection.outlook.com
Diagnostic-Code: smtp; 550 5.7.1 Unfortunately, messages from [185.234.69.116] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DM6NAM12FT008.eop-nam12.prod.protection.outlook.com 2023-02-01T02:52:56.703Z 08DB03E3F757F606]
Asunto | prueba 23:52pm -- | -- De | belkis.parada@ventas.pacal.cl Destinatario | Belkis Parada Fecha | mar 23:52
ambas pruebas de correo
Mail delivery failed: returning message to sender Foto del contacto De [Mail Delivery System](mailto:Mailer-Daemon@panel1.pacal.cl) el 2023-01-31 23:52 [Detalles](https://mail.ventas.pacal.cl/?_task=mail&_caps=pdf%3D1%2Cflash%3D0%2Ctiff%3D0%2Cwebp%3D1%2Cpgpmime%3D0&_uid=12&_mbox=INBOX&_framed=1&_action=preview#headers) [Cabeceras](https://mail.ventas.pacal.cl/?_task=mail&_caps=pdf%3D1%2Cflash%3D0%2Ctiff%3D0%2Cwebp%3D1%2Cpgpmime%3D0&_uid=12&_mbox=INBOX&_framed=1&_action=preview#all-headers) Parte 3.eml (~689 B) This message was created automatically by mail delivery software. A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [belkisparada30@hotmail.com](mailto:belkisparada30@hotmail.com) host hotmail-com.olc.protection.outlook.com [104.47.59.161] SMTP error from remote mail server after pipelined end of data: 550 5.7.1 Unfortunately, messages from [185.234.69.116] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DM6NAM12FT008.eop-nam12.prod.protection.outlook.com 2023-02-01T02:52:56.703Z 08DB03E3F757F606] Reporting-MTA: dns; panel1.pacal.cl Action: failed Final-Recipient: rfc822;[belkisparada30@hotmail.com](mailto:belkisparada30@hotmail.com) Status: 5.0.0 Remote-MTA: dns; hotmail-com.olc.protection.outlook.com Diagnostic-Code: smtp; 550 5.7.1 Unfortunately, messages from [185.234.69.116] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [DM6NAM12FT008.eop-nam12.prod.protection.outlook.com 2023-02-01T02:52:56.703Z 08DB03E3F757F606] Asunto prueba 23:52pm De [belkis.parada@ventas.pacal.cl](mailto:belkis.parada@ventas.pacal.cl) Destinatario [Belkis Parada](mailto:belkisparada30@hotmail.com) Fecha mar 23:52 ambas pruebas de correo
jaapmarcus commented 1 year ago

You ip is blocked. Don't keep spamming Github, Forum, Discord and email...