- Edited
We manage a large number of domains (>500). I want to set up Mailcow as a front-end spam filter and relay-all system. To prevent every domain from sending emails through it, I’ve configured forwarding with MX verification using the routes feature. However, Mailcow still requires me to add each domain individually, which I’d like to avoid due to the large number of domains. I would prefer to control this via the route MX records instead.
If I don’t add a domain manually in Mailcow, I get the error “Relay access denied” when trying to send emails.
Is there a way to achieve this?
To clarify my goal:
Mail sent to mx1.maildomain.de -> Mailcow filters spam -> relays to server1.domain.de
Mail sent to mx2.maildomain.de -> Mailcow filters spam -> relays to server2.domain.de
Mail sent to mx3.maildomain.de -> Mailcow filters spam -> relays to server3.domain.de
…
All of this should work without having to manually add each domain to Mailcow.
Mailcow should determine the recipient server based on the domain’s MX record and relay the mail accordingly.
If Mailcow does not find the recipient’s MX in the configured routes, it should reject the relay.