;; -*- scheme -*- ;; ;; Copy all mails to "inbox-all" folder for backup. ;; (add-filter-rule! (lambda (mail) (copy mail "inbox-all"))) (add-filter-rule! ;; ;; Forward a mail from "partner@example.net" to "mobile@example.com". ;; (a copy of mail remains) ;; '(from ("partner@example.net" (forward "mobile@example.com"))) ;; ;; Redirect a mail from "partner@example.net" to "mobile@example.com". ;; (a copy of mail doesn't remain) ;; '(from ("partner@example.net" (redirect "mobile@example.com"))) ;; ;; Drop a mail writtein in unreadable charcodes to "spam". ;; For people who cannot read a mail written in Chinese and Korean. ;; '(content-type (#/gb2312|euc-kr|big5|gbk|ks_c_5601/i "spam")) ;; ;; Drop a Japanese spam mail to "spam" folder. ;; '(subject ((#/[̤Ëö]¾µ[ǧÂú]¹­¹ð[*¡ö¢¨]/ #/[¡ª!]¹­¹ð[¡ª!]/) "spam"))) ;; ;; Drop a mail containing "viagra" in Subject: and "text/html" in the body ;; to "spam" folder. ;; (add-filter-rule! (lambda (mail) (and (mail 'subject "viagra") (mail 'body "text/html") (refile mail "spam")))) ;; Filter spam mails. ;; Please use scbayes to learn spam and nonspam mails beforehand. ;; (add-bayesian-filter-rule!) ;; Filter spam mails using a white list. ;; (use srfi-1) ;; (use scmail.bayesian-filter) ;; (define white-list ;; (list "friends@example.net" ;; "family@example.net")) ;; (add-filter-rule! ;; (lambda (mail) ;; (and (not (any (cut mail 'from <>) white-list)) ;; (mail-is-spam? mail) ;; (refile mail "spam"))))