Paste number 4589: nnmail-split-fancy example

Paste number 4589: nnmail-split-fancy example
Pasted by: bz_g
When:12 years, 11 months ago
Share:Tweet this! | http://paste.lisp.org/+3JH
Channel:#emacs
Paste contents:
Raw Source | XML | Display As
;; GNUS and BBDB
(setq gnus-use-bbdb t
      nnmail-split-methods 'bbdb/gnus-split-method
      bbdb/gnus-split-default-group nil
      bbdb/gnus-split-nomatch-function 'nnmail-split-fancy
      bbdb/gnus-split-myaddr-regexp gnus-ignored-from-addresses)

;;GNUS and SPAM-STAT
(setq spam-use-BBDB t
      spam-use-stat nil
      spam-split-group "mail.spam"
      spam-stat-split-fancy-spam-group "mail.spam"
      spam-install-hooks t)

;; MAIN nnmail-split-fancy function
(setq nnmail-split-fancy
      `(| (any "paypal" "mail.paypal")
	  (subject "bhl\\|BHL" "mail.bhl")
	  ("Gnus-Warning" "This is a duplicate" "mail.spam.duplicates")
	  ("X-Spam-Status" "Yes" "mail.spam.spamassassin")
	  (: gnus-group-split-fancy nil t nil)
	  (any ,bzg-gnus-trash-addresses ; for emails addresses i don't use anymore
	       (| (any "amazon" "mail.admin"))) ; ... but want to check somehow :)
	  (any ,gnus-ignored-from-addresses
	       (| (any "bzg" ; bzg@ is for lists
		       (| (any "[Bb][Hh][Ll]" "mail.bhl")
			  ("subject" "[Ss]avannah" "mail.free")
			  ("subject" "[Ss]lashdot" "mail.free")
			  (from "postmaster\\|Mailer-Daemon" "mail.spam.delivery")))
		  ;; everything that is NOT a list
		  (| (subject "[Bb][Hh][Ll]" "mail.bhl")
		     (to "webmaster" "mail.dec")
		     (from "postmaster\\|Mailer-Daemon" "mail.spam.delivery"))))
	  (: spam-split)
	  "mail.misc"))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.