cancel
Showing results for 
Search instead for 
Did you mean: 

Running a mailserver at home.

Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Running a mailserver at home.

I am playing with the idea of using my Linux web server to handle all my mail also.
I have got it all set up using a spare domain name I have. It is all running perfectly doing its own dns and sending and receiving mail perfectly.
I decided to test what happens if I purposly take the server down and then send mail to it.
I asume that the sending mail server will queue the mail and attempt to resend it on a regular basis until it can reach the receiving server.
The problem is that I sent the mail several hours ago and it has not yet arrived. I have sent mail from the same address since starting the server again and received it straight away.
I have not yet received any errors saying that the mail could not be delivered.
My question is this:
How long will the average mail server queue mail for and how often will it attempt to deliver the mail in that time?
12 REPLIES
Lurker
Grafter
Posts: 1,867
Registered: ‎23-10-2008

Re: Running a mailserver at home.

Depends on the config, but with each retry, the wait period extends.
So if you send one now, it will try immediately and succeed, but the one that failed could be waiting a couple of hours before the connection attempt is retried.
Another option is to use autoturn to queue mail at PN until your box comes back on line, then you can make a single connection to collect all your outstanding mail.
Community Veteran
Posts: 6,773
Thanks: 258
Fixes: 21
Registered: ‎16-02-2009

Re: Running a mailserver at home.

I used to run my own mail server, for bout 7 years, and found that if mail failed to deliver either due to routing failure or why, dependant on the sending server, it would stack it for re-try or just return to sender as delivery failed (BT was esp. bad at this) so I used to have backup mx's setup, in my case I was using daily.co.uk for my domain and they offered a mailbox I could use as a backup. I (just a month ago) switched to using an external service to do my mail.
Main reason I switched was cost, the new service costs £10/year for 500Mb of email store. I was running the router/pc etc 24/7 and the cost was about 60W *cost of electric etc. Not much in it, but  they do all the backup etc.
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

I have only just heard of autoturn. Is there any tutorials etc about it?
I would need to do someting the make the mail server feasible as I am still waiting for those emails sent yesterday while the server was down.
This server is always on but like any other adsl connection mine does drop for a few seconds every few days even with a Cisco 837.
I really like the idea of running the server at home as I regurarly send and receive photos from family. Having a local mail server stops the waiting at the desktop as large emails transfer to the mailserver almost instantly and then I can forget about them.
Community Veteran
Posts: 3,789
Registered: ‎08-06-2007

Re: Running a mailserver at home.

Sean - you may find that your mails are currently queued on Autoturn waiting to be delivered.
From a Linux shell prompt, type: 
finger autoturn.plus.net
and see if they dequeue.
For a script you can plonk into Cron,  see here
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

I tried finger autoturn.plus.net and got "No such user".
I then tried finger postmaster@autoturn.plus.net and it did do something but still no emails.
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

I found the emails. They were hidden away in a spam mail folder on my mailserver so never arrived in my Outlook Express inbox. Exactly the reason I don't use spam mail filters. I will switch the option off in Virtualmin and try the test again.
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

Seams to be all working now. Got all outstanding emails within an hour or so of starting the server. As I am a little paranoid about this I have stopped the postfix service and sent 3 large emails from seperate servers. I will restart postfix in the morning to make sure I receive them. Then I will be happy to start hosting my own mail server.
Thank you for the help and sorry for thinking there was a problem when it was just the spam folder eating the email!
matt_2k34
Grafter
Posts: 1,300
Registered: ‎09-07-2007

Re: Running a mailserver at home.

Quote
Thank you for the help and sorry for thinking there was a problem when it was just the spam folder eating the email!

Everyone overlooks sometimes the obvious answer, dont worry about it Smiley
Backup MX records are a good idea, also is bouncing the email through a backup channel.. you can then get your mailserver to download and deliver to the correct mailbox - when your server is available again Smiley
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

Thanks again.
The project is going to wait as I am changing the server and currently waiting for an 80Gb HDD from eBay to add to the existing (RAID 1).
matt_2k34
Grafter
Posts: 1,300
Registered: ‎09-07-2007

Re: Running a mailserver at home.

Im assuming your going to use a hardware raid solution ? (id avoid software solutions)
Main reason for opting for raid 1 ?
Community Veteran
Posts: 1,236
Registered: ‎02-08-2007

Re: Running a mailserver at home.

Yes, I have a RAID card.
I use Raid 1 so if a disk fails I can replace it and rebuild without loosing everything. I currently use it on my other (Windows) server for the drive (120Gb hardware RAID 1) that stores digital photos among other things.
matt_2k34
Grafter
Posts: 1,300
Registered: ‎09-07-2007

Re: Running a mailserver at home.

Oky Doky Smiley Was just checking.
i personally prefer RAID 5 but i guess 1 would suffice ;-)
Id suggest getting some software to monitor SMART status' if you are concerned about the length of time the HDD is expected to last Smiley