procmail
[Top] [All Lists]

Re: Other tools?

1997-03-02 16:07:50


This is only vaguely related to the procmail list, but I figured someone
here might be able to help.

Until yesterday, all my mail was stored on an IMAP4 server, and procmail
was setup up to filter mail into folders on the server.  This had
several advantages (didn't use local disk space, remote access to
multiple mail folders from a Mac-based IMAP client, or from any Unix
host via pine, etc.).  I wrote a command-line client that, among other
things, let me make use of the IMAP4 'SEARCH' command.  This let me do
things like:

* display the number of new (recent + unseen) messages in every mailbox,
or
  in a specific mailbox.

* show a summary line of ever message received since 27-Feb-1997 that
contains
  the text "zoot" in the subject line.

* move every message in sent before 1-March-1997 into a folder
  called "sent-mail-0297".

* delete any messages older than 7 days (this actually required an
  intervening program to generate the date, but was still relatively
  easy).

In the past few days, the host acting as my IMAP server has been up and
down like a kangaroo on caffeine, so I've rewritten all my procmail rc
files to filter mail to local mailboxes, instead.

Now I'm trying to find some sort of tool that will let me deal as
flexibly with mail in local folders as I was able to deal with remote
folders on the IMAP server.  Specifically, this tool needs to
"understand" dates, it needs to operate directly on mail files, and it
needs to be controlled from the command line, rather than from
configuration files.

        After years of using elm and about a year of flirting
        with mh I've finally switched over to using mh-e (emacs
        interface to the Rand MH system).

        I have procmail sorting incoming messages into folder.
        Under mh these folders are directories and each message
        is a separate file (which is a mixed blessing to be sure).

        One nice thing about using emacs for this is that I 
        can also use GNUS (an emacs threaded newsreader) to view
        selected folders as though they were newsgroups.  

        MH itself provides a rather complete shell/scripting
        interface.  In fact the main MH system is all shell
        commands with no UI.  Mostly you use the 'folder' command
        to choose what folder you want to work with (this sets
        MH's context -- but doesn't actually change your directory
        or environment) then you use various arguments to the 'pick' 
        command to generate lists of messages -- and pipe those
        into other commands -- like:


                pick -before "`date -d '2 weeks ago'` \
                        | xargs refile +old

        This command uses the MH pick command -- with the GNU date
        command -- to select all the messages in the current
        folder that are over two weeks old and refiles them.

        Another advantage of this system is that I use
        glimpse (the indexing/search package) to keep everything
        in all of my folders indexed.  When I do searches it 
        narrows down the search to a specific message --
        (when I used elm I was always stuck doing two searches --
        one to find the folder and the other to find the actual
        message).

        I use fetchmail to get mail from my remote mailboxes.
        It supports POP, APOP and IMAP.
        
Any thoughts?  If you know of a freely available IMAP4 server, that
would be just fine.  I've played with the imap2bis server distributed
with pine 3.95, and it's "close but not quite" -- it doesn't appear to
support the crucial date-related arguments to the SEARCH command.

        Cyrus looks interesting:

                Cyrus IMAP Server:  Overview and Concepts
                http://andrew2.andrew.cmu.edu/cyrus/cyrus-overview.html
        
--
Jim Dennis,                                
info(_at_)mail(_dot_)starshine(_dot_)org
Proprietor,                          
consulting(_at_)mail(_dot_)starshine(_dot_)org
Starshine Technical Services              http://www.starshine.org

<Prev in Thread] Current Thread [Next in Thread>
  • Other tools?, Lars Kellogg-Stedman
    • Re: Other tools?, Jim Dennis <=