Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i'm with some problems, i think it's not too hard to solve, but i'm a starter on this, it's really advanced to me, i'm a programmer, all i know about servers is easy stuffs like configure web servers, my company is facing IP block from Microsoft Hotmail, we are not able to send e-mails to hotmail users from our IP, so we decided to rent a VPS somewhere to serve as "relay mail server", so, when a user authenticate on our server instead e-mail be sent by itself it will be sent remotly using our VPS. It's like a forward but e-mail should have same headers, like from, reply-to, etc. It should be the copy of the e-mail that would be sent by the main server, but via our VPS. I'll try to draw it :P

| happy user sending e-mail using our e-mail server  |  
       .---------------------.              .---------------------.
       |   our exim server   | --(blocked)--| hotmail destination |
       '---------------------'              '---------------------'
           (magic goes here)
       .-----------------.        .---------------------.
       |   VPS with exim | ------ | hotmail destination |
       '-----------------'        '---------------------'

Hope you guys understand my problem, sorry if my english is bad, i'm Brazilian :P

Thank you for your attention

share|improve this question
Just out of curiosity, what distro are you using on your mail servers? I would do this one way on a Debian-based system, other distro's would need a different answer. – Zoredache Aug 6 '13 at 20:06
It is a CentOS. – Wesley Schleumer de Góes Aug 6 '13 at 20:39
up vote 1 down vote accepted

You have to configure two different routers in the exim config. First have to be so-called manualroute and second - standard dnslookup

    driver = manualroute
    domains =
    transport = remote_smtp
    route_data =
    driver = dnslookup
    domains = !+local_domains
    transport = remote_smtp
. . . . .

When messages passed through the routers from top to the bottom, they first fall into the magic router. Domains option is the condition that define when router should be triggered. If target domain matches "", router push that message to the predefined server and processing will stop. If domain doesn't match, message fall to the next usual router. If the message has been sent to the outer space, driver define appropriate target server via DNS and push message to it.

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.