File: test-rules.in

package info (click to toggle)
scmail 1.3-4.1
  • links: PTS
  • area: main
  • in suites: bullseye, forky, sid, trixie
  • size: 592 kB
  • sloc: lisp: 1,535; sh: 178; makefile: 145
file content (27 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
;;; -*- scheme -*-
(add-filter-rule! 
   (lambda (mail)
     (copy mail "backup"))
   '(from
     ("foo@example.jp" (redirect "mobile@example.org"))
     (("foo@example.org"
       "foo@example.jp") "from.foo")
     ("nenchaku@example.jp" (remove))
     )
   '(delivered-to
     ("former-address@example.jp" "to.former"))
   '(to/cc
     ("test-mailing-list@example.org" (forward "ml@example.org")))
   '(list-id
     (#/<([^>]+)>/  "ml.\\1"))
   '(subject
     (#/̤/ "spam"))
   '(for-test
     ("This is an intentionally invalid rule"))
   (lambda (mail)
     (and (mail 'subject "Viagra")
          (mail 'body "Nigeria")
          (refile mail "spam")))
   )
(set-match-data-replace-rule! '(#/[^a-zA-Z0-9_-]/ "-"))