help-gnu-emacs
[Top][All Lists]
Advanced

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

How to split (IMAP client side split) incoming mails into groups for mul


From: gnuforever
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

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 "address@hidden"
               (nnimap-address "imapserver")
               (nnimap-inbox "INBOX")
               (nnimap-split-methods default)
               (nnimap-expunge t)
               (nnimap-stream ssl)
               (nnimap-user "address@hidden")))

(setq nnmail-split-methods
      '(("INBOX.folder1" "from:address@hidden")
        ("INBOX.folder2" "from:address@hidden")
        ("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)
                                 (("address@hidden" visible nil nil))))

     (setq gnus-topic-alist '(("address@hidden"
                               "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 (address@hidden)?

I have tried this code below, but it doesn't work.

(setq gnus-secondary-select-methods
      '((nnimap "address@hidden"
                (nnimap-address "imapserver")
                (nnimap-inbox "address@hidden:INBOX")
                (nnimap-split-methods default)
                (nnimap-expunge t)
                (nnimap-stream ssl)
                (nnimap-user "address@hidden"))))

(setq nnmail-split-methods
      '(("address@hidden:INBOX.work" "from:address@hidden")
        ("address@hidden:INBOX" "")))


Cheers,

Steve



reply via email to

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