info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: General advice - incorporating gmail IMAP


From: Tassilo Horn
Subject: Re: General advice - incorporating gmail IMAP
Date: Sun, 06 Mar 2011 22:58:22 +0100
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux)

Harry Putnam <reader@newsguy.com> writes:

Hi Harry,

> Tassilo H wrote:
>> Well, since you already have some servers, you probably want to add
>> that to your `gnus-secondary-select-methods'.
>
> I'm kind of confused about the difference getting to imap that way as
> apposed to the Foreign-group method starting with `B'.
>
> Is there any thing better about either, or are they basically the same?

Well, IMO configuring `gnus-secondary-select-methods' in your .gnus.el
is better, because adding your imap server as foreign server puts your
configs into .newsrc.el, which is not really intended for human editing.
But functionality-wise, there shouldn't be differences.

> Tassilo responds:
>> I do exactly that using my fastmail account.  Therefore, I do
>> server-side SIEVE message splitting using the List-Id header, so that
>> all messages of a mailing list go into one special group.  That works
>> totally great! :-)
>
> Do you know any handy urls that show examples of SIEVE scripting?

Here's my script.  Maybe it helps a bit.

--8<---------------cut here---------------start------------->8---
require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation",
         "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];

# SPAM
if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] {
  fileinto "INBOX.Junk Mail";
  stop;
}

# Emacs-devel mailinglist
if header :contains ["List-Id"] "<emacs-devel.gnu.org>" {
  fileinto "INBOX.mailinglists.emacs-devel";
  stop;
}

# Clojure mailinglist
if header :contains ["List-Id"] "<clojure.googlegroups.com>" {
  fileinto "INBOX.mailinglists.clojure";
  stop;
}

# Clojure-DE mailinglist
if header :contains ["List-Id"] "<clojure-de.googlegroups.com>" {
  fileinto "INBOX.mailinglists.clojure-de";
  stop;
}

# Go Nuts mailinglist
if header :contains ["List-Id"] "<golang-nuts.googlegroups.com>" {
  fileinto "INBOX.mailinglists.golang-nuts";
  stop;
}

# Info-FSF mailinglist
if header :contains ["List-Id"] "<info-fsf.gnu.org>" {
  fileinto "INBOX.mailinglists.info-fsf";
  stop;
}

# KDE mailinglist
if header :contains ["List-Id"] "<kde.mail.kde.org>" {
  fileinto "INBOX.mailinglists.kde";
  stop;
}

# Ding Mailinglist (gnus-devel)
if header :contains ["List-Id"] "<ding.gnus.org>" {
  fileinto "INBOX.mailinglists.ding";
  stop;
}

# BBDB-INFO Mailinglist
if header :contains ["List-Id"] "<bbdb-info.lists.sourceforge.net>" {
  fileinto "INBOX.mailinglists.bbdb-info";
  stop;
}

# D-BARF-Mailinglist
if anyof (
          header :contains ["List-Id"] "<D-BARF.yahoogroups.de>",
          header :contains ["X-Mailing-List"] "D-BARF@yahoogroups.de"
          ) {
  fileinto "INBOX.mailinglists.d-barf";
  stop;
}

# Misc Mailinglists (Catch all not already handled)
if anyof (
          exists ["List-Id"]
          ) {
  fileinto "INBOX.mailinglists.misc";
  stop;
}

# Bugs from various bug trackers
if anyof (
          exists ["X-Bugzilla-Reason"],
          exists ["X-Bugzilla-Product"],
          exists ["X-Bugzilla-Component"],
          exists ["X-Bugzilla-Type"],
          exists ["X-Bugzilla-URL"],
          header :contains ["X-Mailer"] "Redmine",
          address :contains ["From"] "@emacsbugs.donarmstrong.com"
          ) {
  fileinto "INBOX.bugs";
  stop;
}

# My FSF address
if anyof (
          address :is ["To", "CC"] "tassilo@member.fsf.org",
          address :is ["To", "CC"] "thorn+fsf@fastmail.fm"
          ) {
  fileinto "INBOX.FSF";
  stop;
}

# My old University address
if anyof (
          address :is ["To", "CC"] "thorn+uni@fastmail.fm",
          address :is ["To", "CC"] "heimdall@uni-koblenz.de"
          ) {
  fileinto "INBOX.uni-old";
  stop;
}

# Chat Logs
if header :contains ["x-resolved-to"] "+chatlogs@" {
  setflag "$ChatLog";
  setflag "\\Seen";
  fileinto "INBOX.Chats";
  removeflag "$ChatLog";
  removeflag "\\Seen";
  stop;
} 
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]