The Joyent Community

A place where the Joyent community can gather, help each other out, and stay informed.

You are not logged in.

#1 2005-03-16 23:13:55

Tom
Member
From: London
Registered: 2004-06-08
Posts: 766
Expertise

How do I filter email?

When using IMAP, is it possible to setup rules so that certain types of mail are automatically filtered into folders?

Can you recommend a good beginners reference guide?

Thank you.


early adopter, late developer ★ VC 200 & Impressionist + Joyous Premium Entrepreneur

Offline

 

#2 2005-03-16 23:42:51

Niloc
Member
From: Vermont
Registered: 2004-06-01
Posts: 875
Expertise

Re: How do I filter email?

Doesn't it depend on what mail client your using?

Offline

 

#3 2005-03-17 00:09:59

dhdesign
Member
From: off the beaten path
Registered: 2004-06-01
Posts: 422
Expertise

Re: How do I filter email?

If you are using Outlook Express, it will not apply message rules (filters) to IMAP or HTTP accounts, only POP accounts.

I'm not sure whether you could apply message filters to IMAP accounts with Thunderbird.


VC141 | Twitter

Offline

 

#4 2005-03-17 00:17:04

Aaron
Member
Registered: 2005-02-27
Posts: 86
Website  Expertise

Re: How do I filter email?

I believe he's asking about setting up rules on the server side. I think procmail can do this though I'm not familiar with it.
I know it's useful because I read mail on several different machines along with webmail and having to setup rules on each one can be a pain.

Offline

 

#5 2005-03-17 00:21:22

Tom
Member
From: London
Registered: 2004-06-08
Posts: 766
Expertise

Re: How do I filter email?

Procmail sounds like a good approach. I am using Panther's Mail.app. But yes, it would be great to filter server side into folders.

Thank you for all your prompt responses, guys.


early adopter, late developer ★ VC 200 & Impressionist + Joyous Premium Entrepreneur

Offline

 

#6 2005-03-17 00:33:03

Moon
A 1950's Model
From: Tsinigan, Togo
Registered: 2004-07-15
Posts: 2654
Website  Expertise

Re: How do I filter email?

I use Thunderbird on a Mac, and I have it set up to filter from my IMAP account. It takes it from my Inbox, and drops it into folders on my Mac.
I used to do server side filtering, but I ran into storage issues, so I decided to do it locally.
With Thunderbird, all you do is select the message you want filtered, Chose Message -> Create Filter From Message. Then in the popup tell it where you want it filtered to, etc.


"We are here on earth to fart around - Don't let anybody tell you any different" - Kurt Vonnegut

Ed • $5 -> VCII -> MG -> It's Miller Time!

Offline

 

#7 2005-03-17 07:58:59

Tom
Member
From: London
Registered: 2004-06-08
Posts: 766
Expertise

Re: How do I filter email?

Thank you, Moon.

I have managed to set up filters with OSX Mail which work fine but want to look it filtering server side, so it can work when with webmail.


early adopter, late developer ★ VC 200 & Impressionist + Joyous Premium Entrepreneur

Offline

 

#8 2005-03-17 08:41:25

pteron
Member
From: Wootton Bassett
Registered: 2004-06-01
Posts: 235
Website  Expertise

Re: How do I filter email?

Server side filtering is currently done with procmail but I suspect that will change when TD moves to the new mega mail machine. I am hoping for 'sieve' which is designed to be a server side filtering tool and as it becomes more widely accepted will begin to be supported in mail clients (it is already supported by some), so you can define your filters in your client and have it upload them to the server (just like Outlook does when it is talking to Exchange).

Offline

 

#9 2005-03-17 14:43:58

stewartj
Member
From: -32.06016,115.892136
Registered: 2004-10-16
Posts: 1759
Website  Expertise

Re: How do I filter email?

If you're using IMAP (like me) and you want your mail to be filtered regardless of what client you use to check your mail (like me) then you'll have to use procmail. It's easy to set up, and basic filtering is pretty easy, but it's very powerful, and can get complicated.

Here's the easy 1-2-3 to set it up:

1. Create a .procmailrc like this:

Code:

## basic procmail setup
VERBOSE=off
MAILDIR=$HOME/Maildir
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/logs

  1. include specific rule files
    INCLUDERC=$PMDIR/general.rc # miscellaneous rules
    INCLUDERC=$PMDIR/lists.rc # mailing lists
    1. anything not matched: throw it in the INBOX
      :0
      $MAILDIR/


That sets up the basic config for procmail, and sets up a default rule to put everything in your INBOX. The two INCLUDERC lines include other files that contain your actual filtering rules, although you don't have to use INCLUDERC, you can put the filtering rules right in your .procmailrc. Your choice.

2. Anyway, I've got a separate set of "rules files", in my .procmail directory.

Here's a sample from my lists.rc

Code:

# Six Apart Professional Network
:0

  • ^List-Id:.*Six Apart Professional Network

$MAILDIR/.Saved.Lists.6A\ Professional\ Network/
  1. .NET mailing list hosted by Stanski

:0
  • ^Sender:.*dotnet-owner@stanski\.com
    $MAILDIR/.Saved.Lists.AU\ DotNet\ \(Stanski\)/


That's how I filter two of my lists, the 6A ProNeT list is filtered on the List-Id header, and the Stanski .NET list is filtered on the Sender header. This is where you'll need to find a good tutorial on how procmail rules work. They're not that hard. They procmailex manpage has a bunch of examples, but I'm sure there are better resources out there. If you know basic regular expression syntax you'll have no problems.

Note that it is very important that the last line of each rule (the place where you want the mail to go) ends with a slash (/). This tells procmail to put the message in Maildir format. If you leave the slash off procmail will deposit the mail in mbox format.

3. Okay, now you need to turn it on. That's easy. Just put this line in your .forward:

Code:

/usr/local/bin/procmail


Note that line starts with a pipe symbol:

Right, now you should be filtering your mail. Good luck!

Last edited by stewartj (2005-03-17 14:45:50)


★ Stewart Johnson ★ VCII MGX ★ cloudview ★

Offline

 

#10 2005-03-17 20:40:05

Tom
Member
From: London
Registered: 2004-06-08
Posts: 766
Expertise

Re: How do I filter email?

Thank you Stew. I will go and get stuck in!

Also thanks pteron, looks like it's all coming together soon, new TXD mail and with Tiger on the horizon it might all be auto pilot from there on.


early adopter, late developer ★ VC 200 & Impressionist + Joyous Premium Entrepreneur

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson