desh ([personal profile] desh) wrote2006-04-27 01:02 pm

lazyweb: mail sorting and filtering

This is one of those things that I can't believe I don't already know how to do:

I want to sort and filter my email into folders based on rules that I define based on "from", "to", the email account that received the message, maybe bayesian spam rules, and so on. Kind of like what Outlook Express does for you when you use POP3. Except that I don't use POP3. So I need something that will work for me anyway, either an IMAP Windows client that will move messages around for me, or something that lives on the server.

It's a plus if it can actually let me make rules by which account of mine actually got the email, which is a rule that seems to be lacking in Outlook Express. (I have several forwarding email addresses forwarding to the same one actual address, and I'd like to be able to tell them apart in my filtering, even if I got an email via BCC.)

Thunderbird may be able to do this, but I'm also interested in non-Thunderbird products that can do this.

Ease of use is another plus, but I'm not willing to sacrifice much filtering power for it.

For server-side programs, it's also a plus if the program is rather well-known, in case I decide to install it somewhere where I don't have root access, and I end up having to try to convince a sysadmin to do it for me.

Help! Thanks!

[identity profile] dredpiraterober.livejournal.com 2006-04-27 05:22 pm (UTC)(link)
Pine can do it

[identity profile] dredpiraterober.livejournal.com 2006-04-27 05:42 pm (UTC)(link)
Thats a good question. I don't know. All I know is, thats what I used in college for mail, and it did what you are asking.

[identity profile] ulicqel.livejournal.com 2006-04-27 07:12 pm (UTC)(link)
whats your server run? i know you can do it in smartermail, probabaly in the exchange admin as well

[identity profile] benjifus.livejournal.com 2006-04-27 07:36 pm (UTC)(link)
can you create a .procmailrc file? google for more about those; i think most *nix MTIs etc. use them.

Basically it's a file in which you write regexen to define rules, and then indicate what folder to put the message in if the regex matches you can match against any header, words, etc). Before the MTI puts any messages in your mail spool (usually /var/mail/desh), it checks your .procmailrc and puts them elsewhere as appropriate. Unmatched messages are left in the spool and automatically transferred to your inbox whenever you check mail.

Benj

[identity profile] conana.livejournal.com 2006-04-28 12:05 am (UTC)(link)
Yeah, procmail is what you want. It's syntax is rather awful, and I find it fragile whenever I try to do something that I'm not entirely sure about, but it's standard, well integrated, and if you know the right incantation, I hear it can do just about anything.

incantations

[identity profile] ulicqel.livejournal.com 2006-04-28 12:08 am (UTC)(link)
"elements from earth and sea, combine to set the heavens free. When i stir this magic brew, Great God thor i call on you! Brew of storms, churn it up!" If anyone can tell me what thats from, you deserve a cookie!

[identity profile] lord-emo.livejournal.com 2006-04-27 08:46 pm (UTC)(link)
The .procmail thing sounds really cool and I'm going to have to try that. I've been using Thunderbird, which will match any header (I assume you can use the To: header to match an account), but not within the message. It also only has its own spam filtering, for better or for worse.

[identity profile] lord-emo.livejournal.com 2006-04-27 11:50 pm (UTC)(link)
I use IMAP exclusively, so I'm pretty sure.

[identity profile] superducky1.livejournal.com 2006-05-02 02:28 am (UTC)(link)
I'm less tech-y. Gmail has custom filters.