I set up a mailcow server that is in my home on a dynamic ip.
It is set up to receive all my mails (dyndns).
However, due to the fact, that outgoing mails are mostly classified as spam if they come from a dynamic IP, I set up a simple mail relay with a fixed IP at a provider.
I want to setup a transport-map with the following goal:
All mail to external domains shall be sent throug my external relay.
All mails for my internal domains shall be treated locally.
I set up a transport-map like this:
Next Hop: [myexternalrelay.com]
This however forwards all the mail (including the ones for internal mailboxes) to the external relay.
I wanted to setup further rules for my internal domains.
Next Hop: This is the question. What to put here.
I tried nearly everything without success.
I ended up to include a further texthash map with “transport_maps” in the extra.cf (appended to main.cf)
My syntax there is:
This is working, however I would love to set it up completely over the GUI.
I also tried to put in in custom_transport.pcre
Howver, I was not able to figure out the pcre syntax for it.
Does anybody know, if it is possible in the GUI and how to do it?
If not, does anybody know the pcre syntax for my example?