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: Wed, 10 Jan 2018 23:02:36 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Emanuel Berg <moasen@zoho.com> writes:

> Are you currently getting them into the same
> group - from your example, the one
> called INBOX?

No. Each imap account has his own INBOX.
(nnimap-inbox "INBOX") ;; The one you mentioned is for the first email
(nnimap-inbox "nnimap+secondEmail@domain.com:INBOX") ;; This is the INBOX for 
the second email

> Also, hit `B q' in article mode to test where
> it will go

Thanks. It's pretty helpful

> PS. Also consider finding more descriptive
>     names than folder1 and folder2.

Good point



Alberto Luaces <aluaces@udc.es> writes:

> In my case it did not work correctly until I declare the main method as
> nnnil and my two IMAP servers as secondary.
>

Are you using the empty backend as described in the gnus documentation?

I changed my first select methods to nnnil like below:

(setq gnus-select-method '(nnnil ""))

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

(setq nnmail-split-methods
      '(("nnimap+firstEmail@domain.com:INBOX.gpg-users" 
"\\(To\\|Cc\\):.*gnupg-users@gnupg.org")
        ("nnimap+firstEmail@domain.com:INBOX.help-gnu-emacs" 
"\\(To\\|Cc\\):.*help-gnu-emacs@gnu.org")
        ("nnimap+firstEmail@domain.com:INBOX" "")))

I would expect from the code above to do this:
- A email to gnupg-users@gnupg.org would go to "gpg-users" group
- A email to help-gnu-emacs@gnu.org would go to "help-gnu-emacs" group
- The rest will go in the "INBOX" group

I did test the code for one imap account. The split doesn't even happen.
All emails go to "INBOX" group. The expressions for split are correct.

Is the code correct?



reply via email to

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