all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to split (IMAP client side split) incoming mails into groups for multiple emails addresses with Gnus
@ 2018-01-07  8:07 gnuforever
  2018-01-09  8:42 ` Alberto Luaces
  0 siblings, 1 reply; 16+ messages in thread
From: gnuforever @ 2018-01-07  8:07 UTC (permalink / raw)
  To: help-gnu-emacs


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



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-01-17  9:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
     [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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.