Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>
To: sup-talk@rubyforge.org
Subject: [sup-talk] before-add-message.rb <-> Gmail Filters
Date: Fri, 10 Dec 2010 19:10:44 +0100	[thread overview]
Message-ID: <AANLkTimbEFpL35xdiwc6BVF921+H1Hgu_JRqNJN0O9hN@mail.gmail.com> (raw)

Hello,

First I would like to thank all and everyone who has contributed to
the PERFECT email client, the client I was looking for, for a very
long time... I love it...

My gmail account is, at the same time, my primary email address and
the storage for all my emails, all email aliases, work-related or not,
ends up one way or another in my gmail, even the sent mail, and to
keep track of everything, I use gmail filters to, well, hide, label,
mark as read, mark as Crap :)

So I have more than 100 filters already setup, fortunately gmail let's
you export those filters as an XML (c.f below for an example) through
one of the labs extensions, however I couldn't find any information on
before-add-message.rb hook using mailFilters.xml..

So my question is, did anyone write a hook to reads that XML file and
work on the message object ? Otherwise, did anyone make a dynamic
before-add-message.rb I could follow? I know ruby, but not that much
so I would appreciate an example to follow..

Thank you all,,

Regards,
Wael Nasreddine




-------------------------------------- mailFilters.xml
<?xml version='1.0' encoding='UTF-8'?><feed
xmlns='http://www.w3.org/2005/Atom'
xmlns:apps='http://schemas.google.com/apps/2006'>
	<title>Mail Filters</title>
	<id>tag:mail.google.com,2008:filters:1226589431861,1237145025938,1244162662829,1244162696287</id>
	<updated>2010-12-10T15:01:45Z</updated>
	<author>
		<name>Wael Nasreddine</name>
		<email>my.email@gmail.com</email>
	</author>
        <entry>
		<category term='filter'></category>
		<title>Mail Filter</title>
		<id>tag:mail.google.com,2008:filter:1226589431861</id>
		<updated>2010-12-10T15:01:45Z</updated>
		<content></content>
		<apps:property name='from' value='customersupport@somecompany.com OR
support@somecompany.com OR supporttestv3@somecompany.com'/>
		<apps:property name='label' value='SomeCompany'/>
		<apps:property name='shouldNeverSpam' value='true'/>
	</entry>
	<entry>
		<category term='filter'></category>
		<title>Mail Filter</title>
		<id>tag:mail.google.com,2008:filter:1237145025938</id>
		<updated>2010-12-10T15:01:45Z</updated>
		<content></content>
		<apps:property name='to' value='zsh-workers@sunsite.dk'/>
		<apps:property name='label' value='ML/Zsh-Workers'/>
		<apps:property name='shouldArchive' value='true'/>
	</entry>
	<entry>
		<category term='filter'></category>
		<title>Mail Filter</title>
		<id>tag:mail.google.com,2008:filter:1244162662829</id>
		<updated>2010-12-10T15:01:45Z</updated>
		<content></content>
		<apps:property name='subject' value='[Something Test][PASS]'/>
		<apps:property name='label' value='Something Test'/>
		<apps:property name='shouldMarkAsRead' value='true'/>
		<apps:property name='shouldArchive' value='true'/>
		<apps:property name='shouldNeverSpam' value='true'/>
	</entry>
	<entry>
		<category term='filter'></category>
		<title>Mail Filter</title>
		<id>tag:mail.google.com,2008:filter:1244162696287</id>
		<updated>2010-12-10T15:01:45Z</updated>
		<content></content>
		<apps:property name='subject' value='[Something Test][FAIL]'/>
		<apps:property name='label' value='Something Test'/>
		<apps:property name='shouldNeverSpam' value='true'/>
		<apps:property name='shouldAlwaysMarkAsImportant' value='true'/>
	</entry>
</feed>
-------------------------------------- mailFilters.xml

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Waêl Nasreddine
TechnoGate www.technogate.fr
mobile :  06.32.94.70.13
agence : 09.70.444.236
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

                 reply	other threads:[~2010-12-10 19:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimbEFpL35xdiwc6BVF921+H1Hgu_JRqNJN0O9hN@mail.gmail.com \
    --to=wael.nasreddine@gmail.com \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox