]> git.pld-linux.org Git - packages/cyrus-imapd.git/blob - cyrus-procmailrc
- rel 1
[packages/cyrus-imapd.git] / cyrus-procmailrc
1 #################################################
2 # procmailrc
3 # This is the main procmail file with common SPAM recipes
4 # Based on the article at
5 # http://www.ncworldmag.com/ncw-05-1998/ncw-05-imap.html
6
7 #
8 # First we define some basics
9
10 PATH=/usr/bin:/bin
11 SHELL=/bin/sh
12
13 # We define DELIVERTO just to prevent a lot of extra
14 # typing later on.  We define SPAMIT to prevent even more
15 # repetitive typing, as it's the same action for every user.
16 # This assumes we set up a SPAM folder right off the INBOX
17 # for every user on the system.  If we neglect to do that, we'll
18 # get in a bit of trouble.
19
20 DELIVERTO=/usr/cyrus/bin/deliver-wrapper
21 SPAMIT="$DELIVERTO user.$LOGNAME.SPAM"
22
23 # This file includes the appropriate procmail.$LOGNAME
24 # file so that each user has his or her own recipe techniques
25 # for subscribed lists, e-mail alerts, etc.
26
27 # Before we begin any recipes, let's make a backup
28 # copy of any incoming mail.
29 #
30 # Remember to comment out the next recipe once
31 # you know everything is working fine, otherwise
32 # you'll fill up the backup directory very quickly.
33 # Some procmail tutorials demonstrate how you can
34 # set a quota on the backup directory so that you can
35 # leave it in force at all times.
36
37 :0 ic
38 | $DELIVERTO user.$LOGNAME.Backup
39
40 ###############################
41 # If there used to be an existing system-wide procmailrc, you can
42 # include it here
43 #INCLUDERC=/etc/procmailrc
44
45 # We shouldn't be running as a privileged user, but just in case,
46 # make sure we drop any privileges we have
47 DROPPRIVS=1
48
49 ###############################
50 # If users want to be able to define their own private recipes
51 # and put them in their home .procmailrc files, comment out
52 # the next definition.
53 #
54 # These recipes will be processed BEFORE the user-specific
55 # recipes that are kept in the /home/cyrus directory
56 #
57 # setup some variables, before we start
58 ALERTSBOX=user.$LOGNAME.Folders.Alerts
59 LISTSBOX=user.$LOGNAME.Folders.Lists
60 #
61 INCLUDERC=$HOME/.procmailrc
62
63 # If you want to define user-specific recipes that
64 # you manage centrally (perhaps because you don't want
65 # to allow your users to "roll their own," then
66 # uncomment the following line.  In this case, you have
67 # to create a file for each user in the form:
68 # procmail.username -- for example, procmail.Joe
69 #
70 # INCLUDERC=/usr/cyrus/etc/procmail.$LOGNAME
71
72 #############################
73 # Now we begin our recipes
74
75 #############################
76 # Email-specific SPAM recipes
77 # Here's one example
78
79 #### NOTE: surely cyrus 'deliver' does its own locking? There should
80 #### thus be no need for :0:$LOGNAME.lock
81
82 :0
83 * ^To:.*anyplace@juno.com
84 | $SPAMIT
85
86 #############################
87 # General SPAM Recipes
88 # Here are a few examples
89 #
90 # The "To:" line doesn't exist
91
92 #:0
93 #* !^To:
94 #| $SPAMIT
95
96 # The "To:" line is empty
97
98 #:0
99 #* ^To: $
100 #| $SPAMIT
101
102 # The "From:" line is empty
103
104 #:0
105 #* ^From: $
106 #| $SPAMIT
107
108 #############################
109 # All the mail that falls
110 # through the above recipes
111 # will be put into the user's
112 # inbox.  This is always the LAST
113 # recipe to appear in the file.
114
115 :0W
116 | $DELIVERTO user.$LOGNAME
117
118 # If that fails - maybe because the user is out of quota, or the mailbox
119 # hasn't been created - then force a bounce (otherwise the message would
120 # get silently appended to /var/spool/mail/$LOGNAME).
121
122 # This is EX_CANTCREAT (Can't create output)
123 EXITCODE=73
124 :0
125 /dev/null
126
127 #
128 # End of procmailrc file
129 ##############################
This page took 0.112798 seconds and 3 git commands to generate.