I wondered if any of you run their own mail server ?
Yes, I run one for a few domains (not my own personal email though).
So you have your mailserver running on your own pc, like a RaspberryPI, what happens to you mail if that server goes down? How long does other mail server try to deliver, will they just bounce back right away, where does your new email go when it is down and for how long? What happens to your email between the sender and you getting it, will it be stored safely. Amusing that your server is nice and secure etc.
It's on a rented VPS (Virtual Private Server). ~£8 a month (before VAT) through racksrv.com
Configuring postfix isn't a simple job, it's hard to get a secure configuration, but then I've done mailserver admin in previous jobs.
If mail can't be delivered then it just gets requeued and it'll be attempted again later. It'll do this a finite amount of times so email doesn't permanently sit somewhere never being delivered.
Emails generally go:-
User sends an email from their MUA (Mail User Agent; gmail, outlook, Thunderbird, etc) to their outgoing SMTP server.
This SMTP server follows its rules of what to do with it, sometimes it bounces around a few internal mail servers before going out into the big bad world.
SMTP server does a DNS lookup for the MX records (Mail-eXchange) for the domain of the destination email address. This gives them a list of machines to attempt delivery to along with a set of priorities. It tries them in order of priority and if it successfully passes it on then that's that SMTP server's job done. If it can't get to any of them, or they all reject it temporarily, then it requeues it and tries again later.
The receiving SMTP server for your domain may even route the email through a few more internal SMTP servers until it gets to wherever it needs to go to appear in your email (which you get via web interface, POP3 or IMAP).
It's dependent on config of the individual mail servers, but delivery will be attempted for about 48 hours before it gets bounced back to you as undeliverable.
http://en.wikipedia.org/wiki/Simple_Mail_Transfer_ProtocolCould you set up two mail servers at two different places and to cover each other other if one is down ?
Yes, you have multiple MX records. However you then have to deal with your incoming email being on two different machines.
Most of the time it's just easier to use a well known email provider as they've got more redundancy and expertise than you could possibly even consider yourself.