Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

when i query for the mailservers of domainx with "dig MX" the result is:

;; ANSWER SECTION: 55188 IN MX 120 55188 IN MX 100

When the webserver (postfix) sends a mail to it uses as relay.

Now, i want to test if he really switches to if 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 on the webserver - will this work?

Is there another and better way?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You could temporarily add a blackhole route to the primary MX and then observe Postfix's behaviour.


ip route add blackhole


route add -host -blackhole
share|improve this answer
THX - This is a nice solution. Sadly my webserver says "command not found" for route or ip. i think i have to go with the /etc/hosts - version. –  Benjamin Dec 15 '11 at 16:03

Usualy, I test this problematic with the firewall : I put a filter from my server to the IP of, on the SMTP port (25/tcp).

Then, Postfix can't join the first server and should try the second.

But I think you can do the same thing with your /etc/hosts proposition, by choosing an IP which doesn't exists.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.