Page 1 of 2
imap + mailbox ?
Posted: Tue Mar 03, 2009 12:27 am
by cpg
i was wondering if anyone has experience with setting up email with imap and also sharing a mailbox locally.
meaning: i would like to enjoy access to my mailbox directly as a file (in mailbox format), yet be able to safely access it with other clients via imap.
Re: imap + mailbox ?
Posted: Tue Mar 03, 2009 12:47 am
by moredruid
Cyrus is a great package that incorporates an IMAP & (S)POP3 server and is fairly easy to setup. Just follow the wizard or accept the defaults.
It works great with both local mbox format (yay mutt!) and normal IMAP access. tried and tested on Debian Woody, Sarge and Lenny (from 2.2 to 2.6 kernel)
Re: imap + mailbox ?
Posted: Tue Mar 03, 2009 12:57 am
by cpg
niiice. i have been using mutt (and it's predecessors) for over 15 years, so i am not sure i can wean myself out of it easily.
will try it.
hehe ... will make it into an app

Re: imap + mailbox ?
Posted: Tue Mar 03, 2009 5:27 am
by cpg
i failed miserably
this is roughly what i did:
Code: Select all
yum -y install cyrus-imapd
service saslauthd start
service cyrus-imapd start
i was able to log in to the imap daemon via ssh. all good, etc.
however, i was not sure how to:
- deliver emails to the imap daemon
- how to share that with some mailbox format file (mutt luuuve)
at the moment i have a fetchmail + procmail delivering emails to $HOME/mailbox and also to folders in $HOME/Mail/*.
i tried to copy the mailbox to /var/spool/imap/cpg, then deliver subsequent emails there. however the client did not see them.
then i re-configured cyrus-imapd in /etc/imapd.conf to expect things in var mail by changing this
(the default is /var/spool/mail), hoping that maybe it would know about the existing folders there.
multiple restarts etc. did not seem to make it work ... BZZT. time's up

Re: imap + mailbox ?
Posted: Tue Mar 03, 2009 5:46 am
by moredruid
here's a short tutorial:
http://www.fredshack.com/docs/imap.html
the "UoW IMAP" part is probably most useful for you
Re: imap + mailbox ?
Posted: Tue Mar 03, 2009 4:36 pm
by nemolomen
This will download the mail from a POP server and store it into one users mail folder on the HDA. The mail folder is then shared via an IMAP server.
I am now using getmail to download the messages form the ISP's POP server to my mailbox (in my home folder) on the hda server. I installed the dovecot IMAP server and now my wife and I can share our email account from any machine in the house or via VPN.
http://ubuntuforums.org/showthread.php?t=715689 (the pertinent info is in Part 3)
The only part I ran into trouble with was the crontab stuff. To get it working properly, I discarded the authors method and added my account to the cron.allow (/etc/cron.allow ???) file and set up the crontab in my own account. The discrapancy is probably due to an Ubuntu vs Fedora thing.
Re: imap + mailbox ?
Posted: Wed Mar 04, 2009 7:41 am
by shu
CPG I will work on this project it what I do for a living e-mail
Re: imap + mailbox ?
Posted: Wed Mar 04, 2009 5:30 pm
by cpg
cool!
you know, i did not realized how complex my email is until i try to explain it!
i would like, if possible, to continue to use my $HOME/mailbox and $HOME/Mail/* in mailbox format. i have this:
email --> IMAP server on the net[1] ---- poll ---> fetchmail polling on my HDA
from fetchmail, i have:
fetchmail then automatically runs through spamd and then
pipes to procmail ----> which then distributes mail from mailing lists in folders in $HOME/Mail/*
and then finally drops the rest of the email that makes it into $HOME/mailbox (again, in mailbox format).
what i would really like is run an imap(s) server in my HDA that then let me see and safely share the folders
$HOME/mailbox (the inbox) and the mail folders in $HOME/Mail/*.
the key idea is to preserve the ability to check my email with a simple terminal or ssh.
i know, i'm a caveman ... still using terminal after all these years ...
[1]: and i am not even describing how i am forking my email here to selectively send to my blackberry
Re: imap + mailbox ?
Posted: Thu Mar 05, 2009 4:06 am
by nemolomen
Why do you keep insisting on "mailbox" format?
Isn't that the same as mbox format? (I think it may be)
Is there a reason you can't use the Maildir format?
When you say "preserve the ability to check my email with a simple terminal or ssh", do you mean via a terminal based MUA (mutt) or do you mean using 'cat', 'more', 'less' or some other direct method?
Re: imap + mailbox ?
Posted: Thu Mar 05, 2009 4:17 am
by cpg
yes, mbox format. i think they maybe the same.
well, here are my reasons:
- because i am reinstalling my HDA every so often and some times, less and grep and scripting can come in handy over the mailbox, rather than having to look for tools to check mailbox databases i know nothing about
- i back up just one directory ($HOME - /home/cpg). this is a pretty hard requirement developed over the years. i don't want to have to track stuff outside my home dir.
- i like to be able to access my mailbox and mail folders with mutt without having to user services (IMAP, POP), just plain files