File: prefile-example.rc

package info (click to toggle)
procmail-lib 1:1997.07.22-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 280 kB
  • ctags: 22
  • sloc: perl: 213; makefile: 126; sh: 6
file content (85 lines) | stat: -rw-r--r-- 2,529 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# prefile.rc
#
# Example prefile.rc file
#
# $Id: prefile-example.rc,v 1.1.1.1 1996/08/16 18:27:12 aks Exp $
#
# Tailor this to suit your taste
#
# Use the syntax "FOLDER/." for MH folders.
# Use the syntax "FOLDER" for BSD Mail folders.
# Do not mix mingle the styles.  If, for some strange
# reason, you want to do both kinds of filing, do all
# the filing of one style first, then do all the other
# style next.  Eg:
#
#  PF_DEST              # do MH style first
#   ADDR=foo    DEST=foo/.      INCLUDERC=pf-chkto.rc
#   ADDR=bar    DEST=bar/.      INCLUDERC=pf-check.rc
#   ...
#  INCLUDERC=pf-save.rc
#
#  PF_DEST              # now do folder-file style
#   ADDR=foo    DEST=foo        INCLUDERC=pf-chkto.rc
#   ADDR=bar    DEST=bar        INCLUDERC=pf-check.rc
#   ...
#  INCLUDERC=pf-save.rc
#
#  ...

PF_DEST                 # clear these vars
PF_FROM

:0
* ? test pf-chkto.rc
{ 

  # Make a series of checks for various mailing lists and
  # associated folders in which to file them.  If a message
  # is addressed to multiple lists, it will be filed into
  # multiple folders (with hardlinks by procmail).

  # These are MH style prefiling recipes
   
  ADDR=info-gnu-emacs          DEST=gnu/emacs/.        INCLUDERC=pf-chkto.rc
  ADDR=perl-users              DEST=info/perl/.        INCLUDERC=pf-chkto.rc
  ADDR=procmail                        DEST=info/procmail/.    INCLUDERC=pf-chkto.rc
  ADDR=bladerunners            DEST=rec/blading/.      INCLUDERC=pf-chkto.rc

  # These are the same recipes for non-MH folders
  ADDR=info-gnu-emacs          DEST=gnu-emacs          INCLUDERC=pf-chkto.rc
  ADDR=perl-users              DEST=info-perl          INCLUDERC=pf-chkto.rc
  ADDR=procmail                        DEST=info-procmail      INCLUDERC=pf-chkto.rc
  ADDR=bladerunners            DEST=rec-blading        INCLUDERC=pf-chkto.rc

}

# Personal mail prefiling -- if the mail is either from an address,
# or to an address, from me, then it gets prefiled.
# IN other words, it tracks mail threads to and from an address and 
# yourself.

:0
* ? test pf-check.rc
{
  ADDR="(aks(@.*sgi\.com)?|Alan.*Stebbens)"
  DEST=priv/Alan.Stebbens/.            # MH style
  INCLUDERC=pf-check.rc

  ADDR="((vice-)?president@whitehouse.gov|Mr. (Vice-)?President)"
  DEST=junk/politics/.
  INCLUDERC=pf-check.rc

  ADDR="(newt@congress.gov|Newt.Gingrich)"
  DEST=junk/politics/.
  INCLUDERC=pf-check.rc

  #...

}

# Now save the mail if any there are any destinations
:0
* PF_DEST ?? .
* ? test pf-save.rc
{ INCLUDERC=pf-save.rc }