Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The title says it all. How can I achieve that? Thanks

share|improve this question
It doesn't really. I assume you are talking about mail. Fail-overs for mail sending is normally done with dns mx records.By the sounds of it you want to first attempt a connection to a remote smtp server and in the event it is not contactable opt to send either using some built-in smtp service or contact the first available mail server on the rcpt's domain. If I wanted to do this I would do it programmatically, in which case you may want to ask stackoverflow. That being said I don't use either exim4 or smarthost, so I opted to post this as a comment. –  Ablue Dec 31 '10 at 4:09
add comment

1 Answer

The way I'd do this would be to write a script that detected whether or not the smarthost was up or down, and returned 0 or 1 accordingly. Then you could configure your router with the following:

condition = ${run{/my/magic/script.sh}{1}{0}} 

If the smarthost is up If the smarthost is down, the router condition will fail, and Exim will jump down to the next router until it finds the direct SMTP router.

share|improve this answer
nice idea! Thanks for sharing. I also would have written a scrpit but toggle exims config instead and do a reload. –  ThorstenS Dec 30 '11 at 14:44
add comment

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.