[Gllug] Mail sorting

Chanka Perera cperera at virtusa.com
Fri Apr 16 15:28:45 UTC 2004





> On Friday 16 Apr 2004 12:52, Ben Fitzgerald wrote:
> > On Fri, Apr 16, 2004 at 12:49:05PM +0100, Richard wrote:
> > > Hi all,
> > >
> > > The situation: fetchmail retrieves my email from an ISP's POP3 
> > > server and drops it into my machine where I read it using IMAP 
> > > (netscape if anyone cares). I'm then sorting email into different 
> > > server-side folders using the client.
> > >
> > > This is quite ugly. I'd much prefer to do the sorting of 
> messages on 
> > > the
> > > (IMAP) server, without troubling the client software. The 
> goal here is
> > > that every machine I use to look at my mail should see 
> the same view,
> > > and I shouldn't have to duplicate my sorting rules on every client
> > > machine. I'm sure there's some clever thing I can do 
> here, but I'm just
> > > not familiar with what the various tools do. I didn't set 
> up the server
> > > either, but I can make changes to it.
> > >
> > > Should I be looking at fiddling the IMAP server, or some "other" 
> > > tool for this job?
> >
> > Sounds like procmail is what you want:
> >
> > http://www.procmail.org/
> >
> > Use fetchmail to call it (see man fetchmail and search for 
> procmail).
> 
> If your fetchmail is delivering to the localhost SMTP server 
> (ie postfix, 
> sendmail etc.) then, often, mail is delivered via procmail 
> anyway. In that case, all you need is to set up a .procmailrc 
> file in your home 
> directory with the rules you want for your filtering.
> 
> see the procmail, procmailrc, procmailex man pages.

Just for information 
My procmail rules ...
$ cat .procmailrc
:0 H:
* 1^0 ^Content-Type:.*attachment* 
* 1^0 ^Content-Type:.*multipart*
/udd/c/chanka/mail/attachments
:0 B:
* 1^0 .*<html>*
* 1^0 .*<font>*
* 1^0 .*<body>*
* 1^0 .*<table>*
* 1^0 .*<a href*
* 1^0 .*to unsubscribe*
* 1^0 .*unsolicited*
* 1^0 .*removal link*
* 1^0 .*removal instructions*
* 1^0 .*click here*
/udd/c/chanka/mail/bulk
$

Above I have put attachments to different folder and all the above
contents go to bulk :) .. Text mails rocks ..

Chanka Perera
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list