I’ve been trying to get mailcow to work consistently off-and-on for a few years now, but I haven’t been able to get to the point where I’m comfortable using it for anything important. As it stands now, I’m able to send emails just fine, and I haven’t been going to the junk folder (at least not very frequently), but receiving emails is a bit different. Here’s my current setup:
Traefik and a TCP Proxy service running on my public-facing VPS with proper rDNS settings and such, forwarding HTTP and HTTPS traffic through Traefik, then all the other ports (25, 587, etc.) are all forwarded through the TCP Proxy (Rathole) via a VPN to my local machine.
Local VM running Ubuntu server with mailcow-dockerized, very little has been changed here. Of the things that have been, it includes skipping LE and IP checking since it’s a different public IP from my VPS. Here’s where the issues come in.
Whenever I go to check the DNS settings on my mailcow instance, the A record says that it’s incorrect, and that the value should be the public IP of my home WAN (despite accessing it through mail.example.com, it says the A record is false). Subsequently it says that the PTR record is incorrect and the name of the record should be ${HOME_PUBLIC_IP}.in-addr.arpa, and the value should be mail.example.com, and instead shows the rDNS lookup data for my home server’s PTR record (set by my ISP and I cannot change it).
My questions are these:
A. How do I get the mailcow instance to use the correct public IP address, and the one for the proper rDNS setup? I’ve also tried mail-tester.com, which shows that the SPF record doesn’t like my ${HOME_PUBLIC_IP} to send mail via user@example.com
B. How do I get to the point where I can consistently receive emails? I’ve been able to receive ones via gmail just fine (although they are sent to the junk box in sogo for whatever reason), but even when I tried to register for an account here, I could not receive the verification email sent to that same inbox.
Any and all help is greatly appreciated.