[Top][All Lists]

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

Re: Splitting mail between offlineimap folders

From: Jens Bäckman
Subject: Re: Splitting mail between offlineimap folders
Date: Thu, 09 Jan 2014 09:55:03 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (darwin)

Emanuel Berg <> writes:

> (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:.*") ("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

reply via email to

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