l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
January 6: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2009 Apr 21 11:11

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] tags with mutt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] tags with mutt



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 =~ /messages@frumster.com/
        saveto ".shidduchim" if subject =~ /sent you a message/i
        saveread ".shidduchim"
      end
      if from =~ /support@sawyouatsinai.com/i
        saveto ".shidduchim" if subject =~ /You have received/i
        saveread ".shidduchim"
      end
      discard if from =~ /Offers.syas@sawyouatsinai.com/i
      discard if from =~ /adverti[sz]ements@sawyouatsinai.com/i

      saveto ".lists.admin" if from =~ /listserv@shamash.org/i
      saveto ".lists.admin" if header["X-List-Administrivia"] == "yes"

      if from =~ /acl@aclweb.org/
        message.header.subject=subject.sub('[na_members@aclweb.org] ','')
        saveto ".lists.ACL"
      end
      saveto ".lists.ACL" if from =~ /rasmusse@cs.rutgers.edu/
      saveto ".lists.ACL" if from =~ /carla.sa@mccsis.org/
      saveto ".lists.ACL" if from =~ /ahakim@mac.com/
      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
> vox-tech@lists.lugod.org
> 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/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!