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 have VPS with Plesk 11 and I'm using two domains on it.

I would like to set up the email service in order to work with two mail servers at the same time:

  • On Gmail I have an account info@mydomain.com.

  • On my server on qmail I've configure other mailboxes like fabrizio@mydomain.com, example@mydomain.com, etc.

Now, as long as I can understand, I can just keep one MX server that I guess should be the legacy one (qmail). Please correct me if I'm wrong.

In this case if I try to send an email, qmail will obviously bounce back replying:

550 sorry, no mailbox here by that name. (#5.7.17).

How can I tell qmail to redirect/reroute the message to an external mail server (in this case Gmail) just for that address (info@mydomain.com)?

share|improve this question

1 Answer 1

What you are suggesting is not quite possible with your configuration.

When ever you try to send an email to @mydomain.com the mail server sending the email will always try to send it to your primary MX server which from what I understand is the qmail plesk server. Since the email address info@mydomain.com does not exist there it will always receive a bounce msg.

You can do 2 things. Either route all emails of @mydomain.com to gmail (which I assume is your secondary MX server). You can do that following the instructions here (plesk does include the smtproutes patch, but you will need to also disable email service from that particular domain from within Plesk as well otherwise on next plesk restart plesk will overwrite your changes) Secondly you can obviously forward info@mydomain.com to a simple gmail box like info-mydomain@gmail.com or whatever.

If you are feeling really confident with your C coding skills there is a patch called moresmtproutes that does what you want but I have never used it so don't really know how well it functions.

share|improve this answer
    
Thanks for your message. Well, I guess I have to give up the idea to let two different server manage my incoming emails. I will chose either gmail or the local service. Thanks again. –  Fabrizio Tatti Apr 3 '13 at 10:09
    
Glad to help out. Just out of curiosity why would you want to do have a setup where some of the email addresses are handled by a different server? btw, if you found the answer correct or useful mark it as such so people searching the site in the future know that. –  thanosk Apr 3 '13 at 11:28
    
Just a short note: I wouldn't use this patch on a Plesk server as Plesk`s qmail is already heaviley patched and therefore it probably won't work. Configuring a forward from info@mydomain.com to some gmail-address is probably the easiest way to get this fixed. –  etagenklo Apr 3 '13 at 20:39

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.