-
Notifications
You must be signed in to change notification settings - Fork 96
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
Help with pool & zones #320
Comments
If it fails against the public IP you're not able to receive emails from anyone right? Or is this a test setup where only local mail should be possible? |
Nope, I'm receiving emails just fine and this is production If I send a mail to some domain, my zone-mta contacts that domain smtp and everything's fine If someone from some domain sends me an email, their mta contacts my haraka & everything's fine If I send an email to one of the domain I manage (for example, mail to myself), my zone-mta pulls out my host IP from the MX record and uses it to reach my haraka instead of simply going for localhost. How could I miss this? So far my options to solve this use case are
The last option looks like the easiest & maybe cleanest. |
Sounds like your router doesn't support NAT loopback/hairpin NAT? That's very inconvenient indeed, not just for this setup but also for a bunch of other usecases. People usually resolve this by either getting a router that actually supports NAT loopback, or by running an internal DNS server that points the domain to a local ip. Those are general solutions though. To only "fix" zone-mta I think you'd create a zone like this:
|
Thanks a lot it works!! I will investigate the NAT loopback/hairpin NAt thing though |
I don't think that's a warning of zonemta itself. Probably a warning of nodejs when zonemta tries starttls on 127.0.0.1. But if that ever fails it should also just send without starttls. I think you should be fine. |
well the warning goes away if you just set 'host="localhost' instead of 'host="127.0.01"' 😃 |
so I've managed to set up NAT hairpin without hairpin, no CT can connect to an other one via the public IP All in all, for this use case using the new zone is just simpler so I'll stick to that |
The idea behind hairpin NAT is that you'd access the public ip internally exactly the same way as you would externally. So that is a big suprise to me. It doesn't sounds like it's working correctly to me. But sticking with a special loopback zone should work fine as well. |
nailed it |
I feel kind of stupid but I can't figure this out.
I have a wildduck+zone-mta+haraka setup (got it from the wildduck install script)
The whole setup is in a proxmox container behind a firewall with NAT (iptables), so no direct access to the host public IP
Currently, submitting mails to zone-mta for my domain fails because zone-mta tries to connect to the public IP address and fails
I could try to solve this though firewall rules but in fact these NAT iptables rules are finicky and so far I'm ending up with looping connections.
Otherwise I could set up a SMTP relay on the host to forward request sents there by zone-mta into haraka. But this really feels hackish
What I need is a way to tell zone-mta that for my domain there is no need to get the IP from the MX record as the MX address is localhost actually
Is that even possible?
Tried to add a pool like this
[[local]]
address="127.0.0.1"
name="localhost"
and a local.toml zone like this
[local]
preferIPv6=false
ignoreIPv6=true
processes=1
connections=5
pool="local"
recipientDomains=["mydomain.com"]
Logs shows that the zone is correctly detected and used when sending mails to my domain but zone-mta still tries to use the public IP from thr MX record. I did not succeed in making it search for haraka on localhost.
Can someone help?
The text was updated successfully, but these errors were encountered: