My e-mail is currently with a shared hosting provider who had downtime yesterday causing my e-mail message to be inaccessible for the night. I'm looking to avoid this in the future. I didn't lose any messages as they arrived when the server came backup, but I needed access to my e-mail at all time. When an e-mail message is sent to , I want it go to mailserver1 and mailserver 2 (doesn't have to be instant). If mailserver1 goes down, I still have access to ALL my messages on mailserver2, BUT when mailserver1 comes back online, I want to see those messages there (mailserver1) as well. Thanks in advance.
I forgot to mention that I have a couple of VPS accounts with DigitalOcean, INIZ and BUYVM. I am familiar with setting up servers, including full email server (POP/IMAP, SMTP), but the server is independent (no replication/redundancy).
Assuming you aren't in a position to set-up a redundant email system and still want to use the hosts emails servers, then what you're wanting to achieve isn't possible. You could simulate some parts of it such as having emails located on both servers but that isn't going to give you "full" email services if the shared hosting account is down. For instance, you could set-up mail2 to collect emails from mail1 every X minutes. That way, a copy of all your messages would be available on mail2 at all times. BUT, if mail1 went down you still wouldn't be receiving any incoming emails, PLUS you would need to change the email settings on your client to use the settings for mail2 during this time (or use WebMail on mail2 if it was available). You could get round the "not receiving incoming emails when mail1 is down" by adding the new email server to your domains MX records and giving mail2 a lower priority. That way, when mail1 was down, emails would get delivered to mail2 instead - assuming mail2 is set-up to accept incoming emails. That would work, but what would happen when mail1 came back up? How would you get the emails delivered to mail2 to be sent/copied to mail1 (which is your primary email server) so that mail1 was fully up-to-date with ALL your emails. Some email servers will work in different roles, with a secondary email server operating in a backup-email server role. This set-up will collect incoming emails for a domain then forward then to the primary email server when it is available. This would take care of keeping mail1 fully up-to-date with all delivered emails, but an email server operating in this role will usually not function as a "general" email server for a domain at the same time that would allow you to connect and send/receive emails. As I've said, you can simulate parts of this functionality, but unless you are operating your own redundant mailserver set-up then what you're asking is not possible if you want to continue to use your hosts email servers. A genuinely redundant email system is not easy - or cheap - to set up. We have a number of redundant email systems operating using Exchange, but it takes a minimum of 6 servers for the set-up to be truly high-availability, and it you want it to be truly redundant over different DC's then you're talking a min of 9 servers. Exchange is excellent and simple to use in a genuine high-availability/redundant set-up, but it isn't cheap and it takes a lot of looking after. I'd say that if your emails are so important to you then either find a different host who offers redundant email services (we'd NEVER run an email server on the same server as web sites), or get a cheap "Hosted Exchange" account that is truly HA and redundant with someone like Microsoft or another provider - you may not like them, but their hosted exchange product is excellent and it works - and you shouldn't need to worry about your emails again. Yes, it will cost you per account per month - sometimes costing more than some hosting plans just for each email account - but that's what it really costs for the functionality and true reliability. Then again, maybe your emails aren't that important to you. Only you can decide.