On Tue, Apr 21, 2009 at 07:19:14AM -0700, Gandalf Parker wrote: > On Mon, Apr 20, 2009 at 11:31:32PM -0700, Mike Simons wrote: > > > > > > Is there a way to use tags with email and mutt? > > > > First search, using mutt's limit "l" command you can filter a > > folder based on most anything ... header searches are fairly fast. > > Thanks for this. This is something I should try. I havent been using > tags because other than the spam tag I saw no use for it. But now I > think I do. > > > Searching on headers was the easy but adding/deleting tags from > > messages seems to requires a little elbow grease. > > > > Hunting through the manual, I didn't see an obvious way to update > > any specific mail headers. However there are ways to edit the whole > > message ... and ways to switch the editor ... so we'll combine those. > > I have to say Im really surprised at this from this group. Usually > everything is over my head. But on the subject of presort and > handling of mail I thought that the standard answer was always > procmail. It seems as though every ISP forum or gaming group Ive > been in where the question came up that was always the answer. > Something like "you can do your own but procmail is almost always > available so why" > > Procmail is even part of the instructions of many spam handlers and > game processors for turn files. As in "turn on procmail handling > then include these 4 lines in your procmailrc file. I think its even > part of default installation on many linux altho I dont have a way > of checking that.
I personally feel that Procmail is a tad verbose, requiring 4 lines
per email address to filter a message, and some kinds of conditional
logic are difficult. So I use Ruby's 'rfilter' package, and have a
filter that looks much more compact:
if from =~ /[email protected]/
saveto ".shidduchim" if subject =~ /sent you a message/i
saveread ".shidduchim"
end
if from =~ /[email protected]/i
saveto ".shidduchim" if subject =~ /You have received/i
saveread ".shidduchim"
end
discard if from =~ /[email protected]/i
discard if from =~ /adverti[sz][email protected]/i
saveto ".lists.admin" if from =~ /[email protected]/i
saveto ".lists.admin" if header["X-List-Administrivia"] == "yes"
if from =~ /[email protected]/
message.header.subject=subject.sub('[[email protected]] ','')
saveto ".lists.ACL"
end
saveto ".lists.ACL" if from =~ /[email protected]/
saveto ".lists.ACL" if from =~ /[email protected]/
saveto ".lists.ACL" if from =~ /[email protected]/
saveto ".lists.AppraisalAnalysis" if listid =~
/<AppraisalAnalysis.yahoogroups.com>/
saveto ".lists.AppraisalAnalysis" if listid =~
/SentimentAI.yahoogroups.com/
saveto ".lists.linux" if listid =~ /.*vox.*lugod/
saveto ".lists.linux" if listid =~ /bad.bad.debian.net/
saveto ".lists.linux" if listid =~ /luni.luni.org/
saveto ".lists.linux" if listid =~/vcs-home.lists.madduck.net/
saveto ".lists.linux" if listid =~ /chicagolug.org/
(I think I tried perl first, but in perl the @ does variable interpolation.
Mind you the . in my regular expressions matches any character, but I've never
really had a problem leaving it unescaped)
> It was such a common answer that I drug my feet for a long time
> before looking into it (I tend to hate the pat answers). Once I did
> it got kinda fun. Like many linux programs it goes more for power
> than ease of use. It allows you to do pretty much anything you want
> in pre-handling mail but that can be confusing. Lots of googling
> required.
>
> I see lots of examples for procmail snippets to do tags. Mostly as a
> way to presort spam. Checking for various subject lines or IP groups
> it comes from or words in the body, tagging it by changing one of
> the headers to add a tag like SPAM to the subject or an x-header,
> then letting it continue into your mailbox for your mail program to
> handle.
>
> Gandalf Parker
> _______________________________________________
> vox-tech mailing list
> [email protected]
> http://lists.lugod.org/mailman/listinfo/vox-tech
--
Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/
signature.asc
Description: Digital signature
_______________________________________________ vox-tech mailing list [email protected] http://lists.lugod.org/mailman/listinfo/vox-tech
