Hello,
I am using Mikrotik and I need set a SMTP server:mail.foo.bar, but when I fill DNS name, it’s automatically translated into IP address which is useless in case of future changing IP for the domain.
However, you can write a script that looks up the IP address via DNS and sets the email server IP address. You can then schedule that to run as often as required via “/system scheduler”.
/tool e-mail set server=[:resolve mail.example.org]