when i query for the mailservers of domainx with "dig domainx.com MX" the result is:
...
;; ANSWER SECTION:
domainx.com. 55188 IN MX 120 mail2.domainx.com.
domainx.com. 55188 IN MX 100 mail.domainx.com.
...
When the webserver (postfix) sends a mail to someone@domainx.com it uses mail.domainx.com as relay.
Now, i want to test if he really switches to mail2.domainx.com if mail.domainx.com is not available. I have no access to the mailservers, just the webserver which is running postfix.
I thought of temporarily making a false entry in /etc/hosts for mail.domainx.com on the webserver - will this work?
Is there another and better way?