imap + mailbox ?

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

imap + mailbox ?

Postby cpg » Tue Mar 03, 2009 12:27 am

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.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: imap + mailbox ?

Postby moredruid » Tue Mar 03, 2009 12:47 am

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)
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: imap + mailbox ?

Postby cpg » Tue Mar 03, 2009 12:57 am

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 :)
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: imap + mailbox ?

Postby cpg » Tue Mar 03, 2009 5:27 am

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

Code: Select all

partition-default: /var/mail
(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 :)
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: imap + mailbox ?

Postby moredruid » Tue Mar 03, 2009 5:46 am

here's a short tutorial: http://www.fredshack.com/docs/imap.html
the "UoW IMAP" part is probably most useful for you
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

nemolomen
Posts: 36
Joined: Sat Dec 13, 2008 5:46 pm
Location: Vermont

Re: imap + mailbox ?

Postby nemolomen » Tue Mar 03, 2009 4:36 pm

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.
nemolomen

My HDA (3rd): ECS A770M-A, Phenom X3 2.4 GHz, 2 GB DDR2 800MHz, / 40 GB, /home 80 GB, data 1TB, 500GB, 320GB

shu
Posts: 15
Joined: Mon Feb 09, 2009 11:18 am

Re: imap + mailbox ?

Postby shu » Wed Mar 04, 2009 7:41 am

CPG I will work on this project it what I do for a living e-mail

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: imap + mailbox ?

Postby cpg » Wed Mar 04, 2009 5:30 pm

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
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

nemolomen
Posts: 36
Joined: Sat Dec 13, 2008 5:46 pm
Location: Vermont

Re: imap + mailbox ?

Postby nemolomen » Thu Mar 05, 2009 4:06 am

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?
nemolomen

My HDA (3rd): ECS A770M-A, Phenom X3 2.4 GHz, 2 GB DDR2 800MHz, / 40 GB, /home 80 GB, data 1TB, 500GB, 320GB

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: imap + mailbox ?

Postby cpg » Thu Mar 05, 2009 4:17 am

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
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Who is online

Users browsing this forum: No registered users and 10 guests