From: gnuforever <help@tuyizere.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to split (IMAP client side split) incoming mails into groups for multiple emails addresses with Gnus
Date: Mon, 08 Jan 2018 22:08:20 +0000 [thread overview]
Message-ID: <87wp0sypez.fsf@tuyizere.org> (raw)
In-Reply-To: <86d12ltmc7.fsf@zoho.com> (Emanuel Berg's message of "Sun, 07 Jan 2018 22:01:28 +0100")
How should I do the split for my 2 imap accounts?
I don't understand why "nnmail-split-methods" in
"gnus-secondary-select-methods" doesn't work.
Emanuel Berg <moasen@zoho.com> writes:
> gnuforever wrote:
>
>> (setq nnmail-split-methods '(("INBOX.folder1"
>> "from:.*friends@domain.com") ("INBOX.folder2"
>> "from:.*family@domain.com") ("INBOX" "")))
>
> Case 1-2 looks backwards?
>
> Here is how it should look.
>
> For example to filter away ML messages which
> you get thru NGs anyway:
>
> (setq nnmail-split-methods
> '(
> ("mail.ml-ooa" "\\(To\\|Cc\\):.*\\(emacs-w3m@namazu.org\\|\\(help-gnu-emacs\\|emacs-devel\\)@gnu.org\\|gmane-discuss@quimby.gnus.org\\|tex-live@tug.org\\|gnuplot-info@lists.sourceforge.net\\)")
> ;; etc etc
> ("mail.misc" "")
> ))
Thanks for this example.
gnuforever <help@tuyizere.org> writes:
> Hi all,
>
> Happy GNU year 2018.
>
> I have different email addresses. For each address, I want to split incoming mails into groups.
> So far I have managed to split incoming mails for one address with the code below:
>
> ;; IMAP
> (setq gnus-select-method
> '(nnimap "firstEmail@domain.com"
> (nnimap-address "imapserver")
> (nnimap-inbox "INBOX")
> (nnimap-split-methods default)
> (nnimap-expunge t)
> (nnimap-stream ssl)
> (nnimap-user "firstEmail@domain.com")))
>
> (setq nnmail-split-methods
> '(("INBOX.folder1" "from:.*friends@domain.com")
> ("INBOX.folder2" "from:.*family@domain.com")
> ("INBOX" "")))
>
> ;; Tree view for groups
> (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
> ;; Manage groups
> (eval-after-load 'gnus-topic
> '(progn
> (setq gnus-topic-topology '(("Gnus" visible)
> (("firstEmail@domain.com" visible nil nil))))
>
> (setq gnus-topic-alist '(("firstEmail@domain.com"
> "INBOX"
> "INBOX.folder1"
> "INBOX.folder2"
> "Sent"
> "Drafts"
> "Junk"
> "Trash"
> "Sent Messages")
> ("Gnus")))))
>
> My question is, how do I extend the code above to split incoming mails for my second email address (secondEmail@domain.com)?
>
> I have tried this code below, but it doesn't work.
>
> (setq gnus-secondary-select-methods
> '((nnimap "secondEmail@domain.com"
> (nnimap-address "imapserver")
> (nnimap-inbox "nnimap+secondEmail@domain.com:INBOX")
> (nnimap-split-methods default)
> (nnimap-expunge t)
> (nnimap-stream ssl)
> (nnimap-user "secondEmail@domain.com"))))
>
> (setq nnmail-split-methods
> '(("nnimap+secondEmail@domain.com:INBOX.work" "from:.*colleague@domain.com")
> ("nnimap+secondEmail@domain.com:INBOX" "")))
>
>
> Cheers,
>
> Steve
next prev parent reply other threads:[~2018-01-08 22:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.6956.1515312486.27995.help-gnu-emacs@gnu.org>
2018-01-07 21:01 ` How to split (IMAP client side split) incoming mails into groups for multiple emails addresses with Gnus Emanuel Berg
2018-01-08 22:08 ` gnuforever [this message]
[not found] ` <mailman.7044.1515449313.27995.help-gnu-emacs@gnu.org>
2018-01-08 23:20 ` Emanuel Berg
2018-01-10 23:02 ` gnuforever
2018-01-11 12:36 ` Alberto Luaces
[not found] ` <mailman.7197.1515674209.27995.help-gnu-emacs@gnu.org>
2018-01-11 18:32 ` Emanuel Berg
[not found] ` <mailman.7178.1515625372.27995.help-gnu-emacs@gnu.org>
2018-01-10 23:42 ` Emanuel Berg
2018-01-14 21:05 ` gnuforever
[not found] ` <mailman.7391.1515963940.27995.help-gnu-emacs@gnu.org>
2018-01-15 0:18 ` Emanuel Berg
2018-01-15 5:35 ` gnuforever
[not found] ` <mailman.7409.1515994562.27995.help-gnu-emacs@gnu.org>
2018-01-15 7:38 ` Emanuel Berg
2018-01-16 19:44 ` gnuforever
[not found] ` <mailman.7478.1516131886.27995.help-gnu-emacs@gnu.org>
2018-01-17 2:13 ` Emanuel Berg
2018-01-17 9:45 ` gnuforever
2018-01-07 8:07 gnuforever
2018-01-09 8:42 ` Alberto Luaces
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wp0sypez.fsf@tuyizere.org \
--to=help@tuyizere.org \
--cc=help-gnu-emacs@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 read-only IMAP folder(s) and NNTP newsgroup(s).