ToDo: setup my own central mail server

Getting sidetracked again.
Found an interesting article on linux.com on how to build a local IMAP mail server,
or in english how to use fetchmail to pull mail from multiple pop3 servers down to a local imap server so you can get all your mail in one place.

Actually the article was more around having one email account and being able to access the email from multiple PC’s, ie: if you have a desktop PC with an email client on it and you download the email to that PC, then thats where it is, you can’t see it from another PC once you have dowwnloaded/deleted from the pop3 server to the first PC.
So it covers downloading from a POP3 server to a personal IMAP server to store it there where all your PCs can see it.

Thats not quite what I need but the building blocks are there for what I want, which is to consolidate multiple email accounts to one place automatically and point my email client there.
I believe thunderbird sort of allows that with the ability to setup multiple accounts for the ISP POP servers, although it has to send via one SMPT accound which upsets some spam filters when a reply to an email from account B is replied to via the default SMPT account A; but this solution will have the same problem anyway.

So why bother then ?. Well my linux servers at the moment just sendmail to themselves, and I havn’t really worried about that. I mean I should set them up to mail to a central server (except I never bothered to set one up) where I can read them in one place, but that would still involve reading them with something like ELM on that local machine rather than a remote client.
The article mentioned using Dovecot and seems to imply that with Dovecot I could read that email if I sent it to a central place with a remote client like thunderbird.
So Ok, I could just add another thunderbird account for that one central server (along with accounts for all the other ISP mail accounts I have), but what fun is there in that.

So I’m planning a playtime. I think what I want to do is

  1. get all the emails from all my home linux servers sent to the same place with sendmail; should have done that anyway, although it does rely on that one server always being powered on which is seldom the case at home
  2. figure out how to get those emails from mbox into maildir format (will work fine in mbox format it seems, so not interested, want it to be harder or it’s no fun; another intermediate step needed somewhere here)
  3. get dovecot running on that server and my thunderbird client reading mail from there as well as the other accounts
  4. when that is working ok, suck down all the emails from my many email accounts to one server. The article discusses using fetchmail, I want to use getmail so another interesting diversion

Should all be working fine at that point. So I need to complicate it futher of course.

The article mentions using postfix, spamassassin and procmail. No actual examples of each and the sample file mentioned for procmail to hook into spamassassin in the article isn’t shipped with FC8 or FC10 so I can’t use tat as a base.
So I need to figure out how to use getmail to trigger procmail to trigger spamassassin to hopefully give me some email.

So thats my next playtime project, but as I’m working seven days a week for the next four weeks in my paid job it will be a while before I start on it. If I eve get it working I’ll write a HOWTO for each step.

But if you are interested in the same sort of thing the article at linux.com gives a good building block overview of the components. For me the building will start in about four weeks, lets see how it goes.

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Unix. Bookmark the permalink.