Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: jens@titv.se (Jens Bäckman)
To: info-gnus-english@gnu.org
Subject: Re: Splitting mail between offlineimap folders
Date: Thu, 09 Jan 2014 09:55:03 +0100	[thread overview]
Message-ID: <m2eh4hcz6g.fsf@titv.se> (raw)
In-Reply-To: <87ha9e18dr.fsf@nl106-137-194.student.uu.se>

Emanuel Berg <embe8573@student.uu.se> writes:

> jens@titv.se (Jens Bäckman) writes:
>
>> I'm trying to move most of my life to Emacs, and have
>> just started dipping my toes in Gnus. The first real
>> obstacle is mail splitting. I have created a rule
>> that looks OK, `Query respool (B q)' tells me it
>> would go to the correct box but `Respool article (B
>> r)' does nothing useful.
>
> When you hit B r, does it ask what backend to use? What
> answer do you give, and what happens next?

The backend prompt has nnmaildir as default. I select that, and the mail
is marked with G (canceled article). I exit the summary buffer and
return to the group list, and can quickly see that the mail hasn't been
moved at all.

>> Relevant parts of my .emacs file:
>>
>>   (setq gnus-select-method '(nnmaildir "titv"
>> (directory "~/mail/titv/")))
>>
>>   (setq nnmail-split-methods '(("INBOX.Redmine"
>> "^From:.*redmine@titv.se") ("INBOX" "")))
>>
>> What I'm trying to accomplish: - move all Redmine mails
>> to INBOX.Redmine, an existing folder - leave everything
>> else in the INBOX So far, it's not doing much. I can
>> move them manually with `B m', but manual labor isn't
>> really my thing.
>
> Of course, this is possible to automatize. I have
> virtually what you ask for up and running, but I use
> nnml, which I have as a secondary select method,
> because I use Gnus not only for mail... - anyway, it
> looks like this:
>
> (setq gnus-secondary-select-methods
>       '((nnml ""))
>       mail-user-agent 'gnus-user-agent
>       read-mail-command 'gnus)
>
> (setq nnmail-split-methods
>  '(("mail.spam" "^X-Spam-Flag: YES")
>    ;; ...
>    ("mail.comp.w3m" "^Subject:.*emacs-w3m.*")
>    ("mail.misc" "") ))

I use Gnus for news as well - even if this is the only group I'm
currently subscribed to. :-) Just thought it was irrelevant for my mail
use situation. Running Gnus from git HEAD, if that's interesting.

In the end, I solved my problem by writing a little Python script called
after offlineimap has finished syncronizing my mail. Any new mail is
automagically moved to the correct IMAP maildir, and everything works
fine.
--
Jens


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

  reply	other threads:[~2014-01-09  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.11386.1389177918.10748.info-gnus-english@gnu.org>
2014-01-08 21:16 ` Emanuel Berg
2014-01-09  8:55   ` Jens Bäckman [this message]
2014-01-08 10:39 Jens Bäckman

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=m2eh4hcz6g.fsf@titv.se \
    --to=jens@titv.se \
    --cc=info-gnus-english@gnu.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;
as well as URLs for NNTP newsgroup(s).