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

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

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


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

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



reply via email to

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