Files
hpr-knowledge-base/hpr_transcripts/hpr3060.txt

69 lines
5.9 KiB
Plaintext
Raw Normal View History

Episode: 3060
Title: HPR3060: Running a local imap server
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3060/hpr3060.mp3
Transcribed: 2025-10-24 16:02:17
---
This is Hacker Public Radio episode 3060 for Friday, 24 April 2020.
Today's show is entitled Running a Local iMap Server. It is hosted by Ken Farlund
and is about six minutes long
and carries a clean flag. The summary is
Ken installs Korea iMap localita have a local backup of his mail. Dash!
This episode of HPR is brought to you by an honesthost.com.
Get 15% discount on all shared hosting with the offer code
HPR15. That's HPR15.
Better web hosting that's honest and fair at an honesthost.com.
.
.
.
.
.
.
.
.
Hi everybody, my name is Ken Farlund and you're listening to another episode of Hacker Public Radio today.
I want to tell you the easiest and probably the earliest way of installing a local iMap mail server.
The entire purpose of this is to act as a local storage so that I can connect multiple mail clients to it.
If you're looking for how to run a business on iMap, this is not the show for you.
This one particularly started when I wanted to get all my messages off Gmail
and I had them connected in Outlook or sorry not Outlook.
Thunderbird. Although this works with Outlook as well because it's an iMap server.
In Thunderbird one connection going to Gmail and another one going to this local server.
So this runs on my home runs repy and I port forward SSH to that
and then I port forward using the command myhomedirect.ssh for such config file.
Local forward space 127.0 does 0.1 colon 2143 space 127.0 to 0.1 colon 143.
So what that does is on my laptop it connects to the local port which then goes over to SSH
and goes back out and port 143. So this assumes that you've got a mail directory in your home directory.
So for example slash home slash pi slash mail.
And that is with capital letters m and d m capital m a l capital d i r.
Now you connect to your pi go to root and you go install aptitude or apt dash get space install.
And then the two packages that you need are courier dash iMap and space courier dash of Damon.
So those two the first one is the server itself and the second one is the thing that allows you to log in.
By default that is set up to use pam which by default uses the log in on your pi.
So for example if you've got pi user with password one password one two three four then you can log in on your mail account with the user pi.
No ask the main or anything just the user pi and the password password one two.
Okay so you've installed that package then you need to go to the slash ETC slash courier directory.
And you need to edit the file iMap d i m a p d and make the following changes.
So by default the address to listen on is set to zero which is everything and you want to restrict that to one to seven dot zero dot zero dot one which is the local host.
Meaning nobody can connect to it unless they're on that machine itself.
Then over the years I've had to change the following two commands so that I can have multiple copies and backups gone at the same time.
One is max damans I changed that from 40 to 80 and the maximum number of connections to accept on the same IP address which is max per IP I double left from 20 to 40.
Then an important one to get rid of if you want this as a backup solution is i'm up underscore empty trash.
And you need to comment that line out it's by default set to trash delete after seven days and sent after 30 days that is not what I want to be the backup of my maelder so.
Kind of makes sense not to have that and then the final one is the brute force method to point it to your maelder file and that is.
At the very end put maelder path equals slash home slash pie slash capital ma l and bang you got yourself.
A install and everything is configured so what you need to do then is system control space restart space courier dash i'm up dot service space courier dash all the Damon dot service that will restart and then you should be able to go into outlook for example or.
Quite a keeps it out like thunderbird going to thunderbird going to edit account settings go down to add a new account blah blah blah blah and the server settings will be local host 2143 and the username will be in this case pie and that's pretty much it and then you can.
Browse your directories copy files over and stuff and you've got yourself a i'm up directory where you can store files in maelder format which is an excellent format there are two formats maelder and mael format a mael format has one big long file which it adds to and chops up and stuff with the maelder format it creates a separate sub directory.
It creates sub directories for your inbox so your director to your inbox looks like our actual directories on in the maelder folder and each message is its own file so you can use tools like grab out and said and kind of brute force if you don't have a meal connection simply go drop to the command line and look you know use a find command on your maelder to find all messages from this person to that person on this particular day.
It's a and you can have gigabytes of mael store there because it's limited to the size of your it's limited to the size of your disk so there you go.
Let's just tune in tomorrow for another exciting episode of hacker public.
You've been listening to hacker public radio at hacker public radio dot org.
We are a community podcast network that releases shows every weekday Monday through Friday.
Today's show like all our shows was contributed by an HBR listener like yourself.
If you ever thought of recording a podcast then click on our contributing to find out how easy it really is.
Hacker public radio was founded by the digital dog pound and the infonomicon computer club and it's part of the binary revolution at binrev.com.
If you have comments on today's show please email the host directly leave a comment on the website or record a follow-up episode yourself.
Unless otherwise stated today's show is released on the creative comments, attribution, share a live 3.0 license.