[svlug] can i use procmail to filte IMAP email?

J C Lawrence claw at kanga.nu
Thu Oct 12 16:35:02 PDT 2000


On Tue, 10 Oct 2000 22:55:16 -0700 
hvrietsc  <hvrietsc at yahoo.com> wrote:

> i want to use procmail to delete certain mails (junk etc) but the
> rest of the incoming email should still be avalable to my netscape
> email reader using IMAP (while procmail runs).

There are two solutions:

  1) Use IMAP everywhere
  2) USe IMAP for remote access and mbox for local

For simplicities sake I'd tend to the former.  Note that my own
solution to a rather similar problem is to use MH folders than then
either run exmh remote under SSH or MH-E or Mew under XEmacs in a
term.  

If you use one of the IMAP variants (eg UWash) that uses mbox for
its folder storage, you merely need to pick a mail client that reads 
mbox for local use.  Procmail then just delivers as per normal to
mbox folders.  Simple, effective, done it, workable.

If you use something like Cyrus IMAP (fast as blazes and extremely
scalable, but some complain about the licensing) there are HOWTOs on
how to use procmail filtering (as versus its the Cyrus default
Sieve).  That done you could then read all your mail under IMAP from
where-ever you are (local or remote).

> 1. can this be done (IMAP)?  

Yes.  

> 2. what is the best .procmailrc for this?  

That is entirely dependent on what you want.

> 3. what should my .forward look like?  

I wouldn't use a .forward.  Instead, depending on which of the above
choices you use, configure your MTA to either use procmail as an LDA
if a ~/.procmailrc file exists (this is what I do), or (similarly)
configure Cyrus' LDA to use procmail (I think that's how they do it,
I'm about to be doing this mysel so I'll be finding out).

> 4. how can i keep a list of junk mailers reqexpr in for example
> $HOME/.fromjunk?  
> 5. how can i log what gets thrown away in for example
> $HOME/.procmail.log?  

See the procmail FAQs and here: 

  http://www.ii.com/internet/robots/procmail/

> 6. can i use netscape for reading and writing email using IMAP
> while all of the above is going on (ie lockfiles between procmail
> and netscape)?

Touchy.  This is one of the reasons for using IMAP everywhere.

-- 
J C Lawrence                                 Home: claw at kanga.nu
---------(*)                               Other: coder at kanga.nu
http://www.kanga.nu/~claw/        Keys etc: finger claw at kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--




More information about the svlug mailing list