View Full Version : Setting up a mail server
SwitchBlade 15-06-2006, 11:52 AM Hi I want to set up a small simple mail server so I can use my domain name and not worry about e-mail attachment size images etc. Plus when I check my mail I've the advantage of it being on the local lan so not taking long to download. Unfortunately I've never done anything like this before, I've done web servers and ftp servers, but not mail. I'm assuming that the mail is automatically forwarded to the address attached to the domain so it'd find it's way to me and that the server then uses the name before the @ to choose which account the mail goes to. If it's more complicated than this let me know.
Anywho I'm after some software that's reasonably simple to configure and use, and preferably free/OSS. What's recommended?
Stuie 15-06-2006, 12:23 PM you will still be restricted by the pop size of the provider even with an internal mail server (the mail has to sit somewhere before your server collects it)
Richyuk 15-06-2006, 12:25 PM you will still be restricted by the pop size of the provider even with an internal mail server (the mail has to sit somewhere before your server collects it)
No you won't :)
Switchblade, you will setup an MX record on Domain DNS which would point to your local server IP.
EDIT - Use Linux and Sendmail :)
Stuie 15-06-2006, 12:26 PM The only problem with that is that if your server goes down you loose all the emails
ChrisC 15-06-2006, 12:27 PM Hayden, if this is for what i think its for, wait till tonight, i'll sort out the domain and you can use webmail for it / pop3
SwitchBlade 15-06-2006, 12:29 PM I don't want to do that Chris, gonna do it this way as it's easier/better.
@ Richy was expecting Linux/Sendmail to be the first response. How would I go about setting up the MX record on the DNS? Bear in mind I'm using a Dynamic DNS as I'm on a non-static IP.
Madmax 15-06-2006, 12:31 PM Use linux and IMAP
2 types of IMAP, one is the txt file system (very old, sendmail still uses it iirc) and the folder system (new and much better, allows subdirectory)
It took me a few hours to setup sendmail and IMAP using Fedora Core 2.
It took me 2 weeks and no success setting up IMAP to work with folders so you can have sub directory.
If you use IMAP, back up regularly to another machine :)
Harry Bo 15-06-2006, 12:32 PM EDIT - Use Linux and Sendmail :)
Have to disagree. Sendmail has had it's day...
Look at qmail or Exim (MTA), Courier-IMAP ("server" in the sense you think of one) and something like Squirrelmail if you want web-based access. There are some good tutorials online but I wouldn't call any proper mail server "easy", lol. I like qmail though, it's fast, it's secure and it's designed to replace the ageing Sendmail :)
HB
Richyuk 15-06-2006, 12:33 PM The only problem with that is that if your server goes down you loose all the emails
Well only if it is off for 48 hours+ as most mail servers will retry for about 2 days to send an e-mail.
Who are you using for your DYN DNS? As NO-IP.com for example allow MX records to be created.
ChrisC 15-06-2006, 12:34 PM I don't want to do that Chris, gonna do it this way as it's easier/better.
@ Richy was expecting Linux/Sendmail to be the first response. How would I go about setting up the MX record on the DNS? Bear in mind I'm using a Dynamic DNS as I'm on a non-static IP.
I cant see it being easier / better but furry muff. :)
Richyuk 15-06-2006, 12:35 PM Have to disagree. Sendmail has had it's day...
Look at qmail or Exim (MTA), Courier-IMAP ("server" in the sense you think of one) and something like Squirrelmail if you want web-based access. There are some good tutorials online but I wouldn't call any proper mail server "easy", lol. I like qmail though, it's fast, it's secure and it's designed to replace the ageing Sendmail :)
HB
Tbh, I hate Sendmail... I used the wrong smiley.
I've used Courier and qmail, both seem pretty good really :)
I also missed a step on my MX records, you setup an MX which points to say mail.mydomain.com then you'd have a mail.mydomain.com which points to your IP.
SwitchBlade 15-06-2006, 12:38 PM I'm using Dyndns.org atm.
Harry Bo 15-06-2006, 12:38 PM This is an excellent guide but may be more involved than you want. If you do all of it, you can end up with SSL & TLS security, POP3 and IMAP4, a fast MTA (qmail), webmail (Squirrelmail), ClamAV (antivirus) and SpamAssassin, plus more.
Here: http://qmailrocks.com/
It's designed to be easy to follow even if you have sod all Linux experience but you'll find it a lot easier/more comprehensible if you have some familiarity with the Linux way.... :)
HB
SwitchBlade 15-06-2006, 12:40 PM Sounds good HB, which Distro would you recommend. I've not done a Linux install for a year or so.
Harry Bo 15-06-2006, 12:44 PM If this machine is purely for server duties, it's got to be Slackware baby ;) I run very similar setups on TA's server and my own (they sit in the same rack at UK2) - both Slackware 10.2 with most programs compiled to suit. My server has a mail setup very similar to that in the qmailrocks tutorial (wish I'd found it sooner, lol!), whereas TA runs a much more simple mail server, at present anyway.
Otherwise, any of those listed on the site I linked to should work well, I just quite like Slack :)
HB
Madmax 15-06-2006, 12:46 PM btw switch you don't need to setup an MX record.
You can get linux to download emails from pop3 accounts and distribute to different users.
SwitchBlade 15-06-2006, 12:51 PM Don't really want to be picking the mail up from else where, want it sending in direct tbh.
Madmax 15-06-2006, 12:52 PM i would say its safer as if you don't collect it it isn't bounced :)
Richyuk 15-06-2006, 12:53 PM btw switch you don't need to setup an MX record.
You can get linux to download emails from pop3 accounts and distribute to different users.
Tbh, I don't see the point in doing it that way :) just use Pop3 accounts then :)
Madmax 15-06-2006, 12:58 PM Tbh, I don't see the point in doing it that way :) just use Pop3 accounts then :)
You get the benefit of a failsafe if you can't access the net for a few days you don't lose your emails
You can distribute the mail to who you want and can also download email from multiple domains (at work we download mail from 7 domains) and its nice and simple.
Its all stored in a central place rather than on each machine and the attachments download whenever rather then when you open outlook, they just need to get transferred across the network
SwitchBlade 15-06-2006, 12:58 PM Cool a little looksy shows that DynDns will set up MX for me.
Richyuk 15-06-2006, 01:04 PM You get the benefit of a failsafe if you can't access the net for a few days you don't lose your emails
You can distribute the mail to who you want and can also download email from multiple domains (at work we download mail from 7 domains) and its nice and simple.
Its all stored in a central place rather than on each machine and the attachments download whenever rather then when you open outlook, they just need to get transferred across the network
So there is a chance that your Mail Server is offline for a few days? All decent Mail Servers can download from anything... erm most mail servers store all the mail on the mail server I fail to see how this is different except having a pop3 mailbox in the way? Also dling from POP3 is slower than being sent the packets direct to the mail server so another issue :)
But horses for courses, each to their own and all that ;)
bolide 15-06-2006, 07:09 PM If you use EasyDNS (and I recommend you do) they'll host your domains, provide Dynamic DNS and a mail secondary. So if your server's offline they'll queue it for you
The major drawback with having your own mail server is that if you're on a regular ADSL connection you'll be part of a dynamically-allocated IP block and many ISPs reject mail from dynamic IP blocks as a matter of course
A good way round this is to use your ISP's SMTP server. I am with NTL and route all outgoing email from my server via smtp.ntlworld.com. Individual accounts are set to use my POP / SMTP server but the server's set to route via NTL
I use EIMS on an old OS 9 Mac. You can set up the free or Lite (or full) version of EIMS and have it running in about 10 minutes. And of course, being a Mac, it's secure
Nick Froome
SwitchBlade 15-06-2006, 07:16 PM Currently playing with installing CommunigatePro on Zeta while I wait on Slackware to download.
GarethM 15-06-2006, 07:39 PM Ahhh it's like a breath of fresh air reading this thread, Harry Bo is giving great advice and seems like a man in the know.
Minimal Slackware install and a stripped down version of the guide at qmailrocks.org is how i have all my servers set up, often i just use Vpopmail as i don't need IMAP access though. Qmail is very powerful and reliable, but it may be too much to try and get your head round it fully unless you want to spend weeks with it :) A working install isn't too hard to achieve, however.
SwitchBlade 15-06-2006, 07:45 PM Heh that's why I'm investigating possibly swifter alternatives, the guide to installing qmail was enough to get me thinking it was a tad too much for my needs, especially as a not-too-hardcore linux user in the past.
GarethM 15-06-2006, 07:48 PM You'll probably be able to cut-and-paste your way through the guide on qmailrocks.org in a couple of hours and get up and running. MX records on a dynamic DNS system isn't something i've done before, interesting idea though, i like it!
I think the only time Qmail fell over on me was with this issue: http://forum.qmailrocks.org/showthread.php?t=2298 - i've never found the reason why it did...
SwitchBlade 15-06-2006, 07:55 PM How minimal an install will I get away with for Slackware?
GarethM 15-06-2006, 07:59 PM Been a while since i've done a slackware install so this may be a bit out..
Reckon you'll need A, L, N (remove daemons you dont want).
And then add bits from AP and D.
mark0x 16-06-2006, 07:01 AM Going somewhat against the grain here with respect to the setups already mentioned, I enjoy great success with my corporate setup:
OS: Debian Sarge
MTA: Postfix/Postfix-MySQL
Web Based Mail Admin Interface: PostfixAdmin
POP3/IMAP: Courier-IMAP
Webmail: Roundcube
Anti SPAM: SpamAssassin 3.1
Anti Virus: AMAVIS/ClamAV
There's lots of tutorials for this setup and it works very well indeed
A graph below shows the stats produced by AMAVIS, a lot of mail is blocked before it even gets chance to be scanned though due to custom filtering and real time blacklist checking of the source IP
http://www.hmgpaint.com/misc/passed-month.png
|