I am having an issue, that I require a stable public SMTP endpoint (mySmtpPublicNode). This endpoint should relay/route the emails to the corresponding mailservers, which regularly change (myInternalSmtpServerXY)
SMTP-client <--> mySmtpPublicNode <--> myInternalSmtpServer01
^
+------> myInternalSmtpServer02
|
+------> myInternalSmtpServer03
|
+------> ....
|
+------> myInternalSmtpServer99
The myInternalSmtpServer[01-99]
are all having their own TLD mail-domains. I require that my mySmtpPublicNode
can accept all mail from all myInternalSmtpServer[01-99]
and also has a "sticky" handling of the underlying domains to the corresponding myInternalSmtpServer[01-99]
server.
My restrictions:
- I can only define stable DNS records for the
myInternalSmtpServer[01-99]
hosts - I cannot define stable IP addresses
myInternalSmtpServer[01-99]
are mostly postfix or sendmail- mail-domains may change from
myInternalSmtpServer[01]
to e.g.myInternalSmtpServer[22]
during the day - all the above nodes, except the client, are in a controlled environment and I have full (root) access to the servers.
How to solve this with Linux (or docker)?
How to create a mapping these mail domain examples on the mySmtpPublicNode
?
mail-domain | internal SMTP Server |
---|---|
example.com | myInternalSmtpServer01 |
mysuperduper.com | myInternalSmtpServer03 |
... | myInternalSmtpServer[01-99] |
How to automatically update the mapping?
- the mail-domains may change from
myInternalSmtpServerXY
tomyInternalSmtpServerAB
depending on IO, CPU or Disk requirements - so the mapping can change during a day, if the mail domain gets migrated