all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Gnus splitting question
@ 2020-12-07  8:01 Pankaj Jangid
  2020-12-07 12:15 ` Leo Butler
  0 siblings, 1 reply; 3+ messages in thread
From: Pankaj Jangid @ 2020-12-07  8:01 UTC (permalink / raw)
  To: Emacs Help

If I split using a variable (`my-split-list' below), it creates a group
mail.misc on the IMAP server and rest of the emails end up in this.

--8<---------------cut here---------------start------------->8---
(defvar my-split-list
  '(("cron" "^From:.*Cron Daemon")
    ("cron" "^from: OSSEC HIDS <ossecm@app1>")
    ("cron" "^from: OSSEC HIDS <ossecm@app2>")
    ("cron" "^from: OSSEC HIDS <ossecm@app3>")
    ("cron" "^from: OSSEC HIDS <ossecm@db1>")))

(add-to-list 'gnus-secondary-select-methods
	     '(nnimap "otp"
		      (nnimap-address "imap.gmail.com")
		      (nnimap-inbox "INBOX")
		      (nnimap-expunge immediately)
		      (nnimap-split-methods my-split-list)))
--8<---------------cut here---------------end--------------->8---

But if I put the split rules inline, like the one below, rest of the
emails remain in INBOX.

--8<---------------cut here---------------start------------->8---
(add-to-list 'gnus-secondary-select-methods
	     '(nnimap "otp"
		      (nnimap-address "imap.gmail.com")
		      (nnimap-inbox "INBOX")
		      (nnimap-expunge immediately)
		      (nnimap-split-methods
                        (("cron" "^From:.*Cron Daemon")
                         ("cron" "^from: OSSEC HIDS <ossecm@app1>") 
                         ("cron" "^from: OSSEC HIDS <ossecm@app2>")
                         ("cron" "^from: OSSEC HIDS <ossecm@app3>")
                         ("cron" "^from: OSSEC HIDS <ossecm@db1>")))))
--8<---------------cut here---------------end--------------->8---

Why this difference in behaviour?



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

end of thread, other threads:[~2020-12-07 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-07  8:01 Gnus splitting question Pankaj Jangid
2020-12-07 12:15 ` Leo Butler
2020-12-07 14:10   ` Pankaj Jangid

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.