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.

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  |  
'----------------------------------------------------'
                  |
           (authenticate)
                  |
       .---------------------.              .---------------------.
       |   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. –  I Am Not Procrastinating Aug 6 '13 at 20:39

1 Answer 1

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

magic:
    driver = manualroute
    domains = hotmail.com
    transport = remote_smtp
    route_data = vps.server.com
    no_more
usual:
    driver = dnslookup
    domains = !+local_domains
    transport = remote_smtp
    no_more 
. . . . .

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 "hotmail.com", 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

 
discard

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.