Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When sending an email to both external and local domains, only the external email is delivered, and the email to the local domain disappears #582

Open
johannes73 opened this issue Aug 6, 2024 · 2 comments

Comments

@johannes73
Copy link

Describe the bug
When a user sends an email only to a local domain, or only to an external domain, the email is delivered fine. But when sending an email to both a local and an external domain, only the copy to the external domain is delivered. The copy to the internal domain disappears without error message to the client.

To Reproduce

From: Test User <[email protected]>
Subject: To local AND external domain - this will be delivered ONLY to the external domain
To: Test User <[email protected]>,
 Test User Gmail <[email protected]>
(...)

Expected behavior
Delivery to both the local and external domain recipients of a sent email.

Server (please complete the following information):

uname -a
FreeBSD mail.smartnet.se 13.2-RELEASE-p4 FreeBSD 13.2-RELEASE-p4 GENERIC amd64

MT6 version: 20231004

Additional context
This server uses split horizon DNS.

I have tried but not managed to solve this. Very thankful for your opinions.

@msimerson
Copy link
Owner

Check the local Haraka queue, is the copy to the internal domain sitting there? (I've seen this, and I did something to fix it when it happened, but exactly what hasn't popped into my brain.)

@johannes73
Copy link
Author

Great thanks, Matt. Your tip led me to get it working. I am not sure I did it the correct way. But it works fine, and both local and external copies are delivered. I think my split horizon DNS was to blame.

Maybe it helps someone else. Here is what I did. Thanks again.

The split horizon DNS is at 192.168.0.1, and the mail server is at 192.168.0.24. The DNS answers with 192.168.0.x addresses to requests from the LAN, and with external addresses when asked externally.

Commented out two lines in /data/dns/mt6-local.conf:

#          local-data: "mail.smartnet.se A 172.16.15.8"
#          local-data: "mail.smartnet.se AAAA fd7a:e5cd:1fc1:8c34:dead:beef:cafe:0008"

Added an include in /jails/dns/usr/local/etc/unbound/unbound.conf:

include: "/data/forward_dns.conf"

A new file /data/dns/forward_dns.conf:

forward-zone:
    name: "."
    forward-addr: 192.168.0.1
    forward-first: yes
    forward-no-cache: no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants