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 <address@hidden> writes:

> gnuforever wrote:
>
>> (setq nnmail-split-methods '(("INBOX.folder1"
>> "from:address@hidden") ("INBOX.folder2"
>> "from:address@hidden") ("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\\):.*\\(address@hidden|\\(help-gnu-emacs\\|emacs-devel\\)@gnu.org\\|address@hidden|address@hidden|address@hidden)")
>         ;; etc etc
>         ("mail.misc"   "")
>       ))

Thanks for this example.


gnuforever <address@hidden> 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 "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]