From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: gnuforever Newsgroups: gmane.emacs.help Subject: How to split (IMAP client side split) incoming mails into groups for multiple emails addresses with Gnus Date: Sun, 07 Jan 2018 08:07:19 +0000 Message-ID: <87d12mgki0.fsf@tuyizere.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515312398 14965 195.159.176.226 (7 Jan 2018 08:06:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2018 08:06:38 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 07 09:06:34 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eY5yS-0003Up-Me for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jan 2018 09:06:32 +0100 Original-Received: from localhost ([::1]:43136 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eY60Q-0003p6-Br for geh-help-gnu-emacs@m.gmane.org; Sun, 07 Jan 2018 03:08:34 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eY5zw-0003ol-D4 for help-gnu-emacs@gnu.org; Sun, 07 Jan 2018 03:08:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eY5zr-0001cv-EF for help-gnu-emacs@gnu.org; Sun, 07 Jan 2018 03:08:04 -0500 Original-Received: from erza.lautre.net ([80.67.160.89]:52608) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eY5zq-0001aD-S2 for help-gnu-emacs@gnu.org; Sun, 07 Jan 2018 03:07:59 -0500 Original-Received: from 37bee92b831f (d54C403E7.access.telenet.be [84.196.3.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by erza.lautre.net (Postfix) with ESMTPSA id 853067D61 for ; Sun, 7 Jan 2018 08:51:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=tuyizere.org; s=alternc; t=1515311500; bh=oZ4ioow8QXsYP/s7Q6vfroyNf9+NvHXEKl+X3LwLkB0=; h=From:To:Subject:Date; b=W8d7QCp2RzdUL0JwMRb243rV4UMXXqqZQu4EBDUgRIRtu3BVWcG++/eR5HRlMDQfy Sg0b7IGG+/PJpk080OGG+bw2IF0+mqvX30zcMvJtxvzdoQObo+DgFG0PB/acDc6u4o kDnNw+ExUaqaLOKBypT9hShCJj5SqBqmXoZ6RVOQ= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 80.67.160.89 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115611 Archived-At: 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