A couple of people have expressed some interest in this in the last
few months, so I thought I'd share my experience:


Introduction:
-------------

For various reasons, I recently decided to switch over to using IMAP
to obtain my email.

IMAP folders seem nice, but being lazy, I wanted my email sorted for
me automatically.  I wanted Procmail to do the sorting for me.

Sorting email on a remote IMAP server is probably possible with some
email programs (MUAs), but I wanted the power of Procmail to be
available for my work.

So, I decided to run my own IMAP server locally.  My scheme was to
pull my email off of a remote server with Fetchmail and use
Procmail to sort my mail into IMAP mailboxes.

And this is exactly what I did.


Details:
--------

I'm not going to hold your hand here.  I'm going to provide the
essential details and let you put the pieces together as you see fit.

Get the University of Washington IMAP server (UW IMAPD) and the
associated "utility source distribution".  One place to look is here:

   http://www.washington.edu/imap/ .

I would say that it is pretty probable that you'll want to install
this from source code.

(I have heard of people accomplishing this same task with Cyrus IMAPD,
but UW IMAPD was the first one I tried)

Make imapd.  Before you do this, read docs/CONFIG and modify
src/osdep/unix/env_unix.c accordingly.  This is important because by
doing this you can specify where your mailboxes/folders are stored.

(I decided to store my mailboxes in ~/Mail/imap)

Make imapd.

In the associated utility directory, make "dmail" and
"mbxcreat".  I had to modify the Makefiles slightly -- they *should*
point over to the main UW IMAPD area.

Install all three of these...

(Installing imapd will involve playing with /etc/inetd.conf and maybe
/etc/services too)

kill -HUP inetd

Modify your .procmailrc to have rules like this:

  :0:
  * ^TO.*IETF-Announce
  | dmail +ietf-announce


As a last rule in your .procmailrc file I would suggest:

  # IT IS CRITICAL THAT THIS IS THE LAST RULE
  # move the mail out of /var/spool so emacs doesn't report that
  # I have email 24x7
  :0:
  | dmail +local-inbox

Using "mbxcreat", for every mailbox that you reference in your
.procmailrc, create an empty mailbox corresponding to this mailbox in
the place where imapd will be looking for your mailboxes.  For
example, I might type:  mbxcreat ~/Mail/imap/ietf-announce

Make sure your fetchmail setup is working correctly.


Let 'er rip.  You might want to use the "fetchmail -k" option the
first time this runs to test things out.


Two last steps:

Ask yourself this question:  "Is your email on that remote server
backed up for you?"  Now that you're ripping your mail off of this
server and placing it onto your local server, you probably want to
think about backups...

You're installing a server on your machine.  Is it secure?  How would
you know?  Now is probably a good time to do a little research and
maybe even subscribe to the UW IMAP mailing list so you can keep
abreast of any security problems with this software.


Epilogue
--------

Now my email is accessible via IMAP, and it automatically gets sorted
with Procmail.  This is very convenient.



I hope that somebody finds this to be useful,

--kevin
-- 
Kevin D. Clark (CetaceanNetworks.com!kclark)  |
Cetacean Networks, Inc.                       |   Give me a decent UNIX
Portsmouth, N.H. (USA)                        |  and I can move the world
alumni.unh.edu!kdc (PGP Key Available)        |






**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to