]> git.madduck.net Git - etc/mailfilter.git/blob - procmail/justme

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

replace $ with S in log filenames
[etc/mailfilter.git] / procmail / justme
1 :0 H
2 *$ MSGID ?? ^<.+@$RE_MYDOMAIN>
3 {
4   JUSTME="from machine in my domain"
5   LOG="justme:      passing; $JUSTME$NL"
6 #  SKIP_SPAMCHECKS=from-mydomain
7 }
8
9 :0 EH
10 *$ ^(References|In-Reply-To):.*<.+@$RE_MYDOMAIN>
11 {
12   JUSTME="in-reply-to/referenced"
13   LOG="justme:      passing; $JUSTME$NL"
14   SKIP_SPAMCHECKS=in-reply-to/referenced
15 }
16
17 :0 E
18 * ? echo "$ORIGINAL_TO" | $EGREP -qif $CONF/justme-addresses
19 {
20   :0
21   * ? echo "$ORIGINAL_TO" | $EGREP -qif $CONF/justme-address-exceptions
22   {
23     JUSTME="explicitly excepted address"
24     LOG="justme:      passing; $JUSTME$NL"
25   }
26   
27   :0 E
28   *$ 1^0 B ?? .*\<$RE_FIRSTNAME$RE_SPACE_NEWLINE+$RE_LASTNAME\>
29   *$ 1^0 B ?? .*\<$RE_LASTNAME[,]?$RE_SPACE_NEWLINE*$RE_FIRSTNAME\>
30   {
31     JUSTME="full name reference"
32     LOG="justme:      passing; $JUSTME$NL"
33   }
34
35   :0 E
36   *$ B ?? .*\<$RE_LASTNAME\>
37   {
38     JUSTME="last name reference"
39     LOG="justme:      passing; $JUSTME$NL"
40   }
41
42   :0 E
43   *  1^0 B ?? .*\<madduck\>
44   * -1^0 B ?? mass\.madduck\.net
45   {
46     JUSTME="nickname reference"
47     LOG="justme:      passing; $JUSTME$NL"
48   }
49
50   :0 EBH
51   *$ ? $EGREP -qif $CONF/justme-keyword-exceptions
52   {
53     JUSTME="keyword reference"
54     LOG="justme:      passing; $JUSTME$NL"
55   }
56
57   :0 E
58   * MSGID ?? ^<mailman
59   * ORIGINAL_TO ?? ^[^=]+=[^@]+@mass\.madduck\.net$
60   {
61     :0
62     * FROM ?? -request@
63     * SUBJECT ?? ^confirm [0-9a-f]+$
64     {
65       JUSTME="mailman confirmation"
66       LOG="justme:      passing; $JUSTME$NL"
67     }
68
69     :0 E
70     * FROM ?? -bounces@
71     * SUBJECT ?? ^You have been unsubscribed
72     {
73       JUSTME="mailman confirmation"
74       LOG="justme:      passing; $JUSTME$NL"
75     }
76
77     :0 E
78     * FROM ?? -bounces@
79     * SUBJECT ?? .+ mailing list reminder$
80     {
81       JUSTME="mailman password reminder"
82       LOG="justme:      passing; $JUSTME$NL"
83     }
84   }
85
86   :0 E
87   * FROM ?? ^[Mm]ajordomo@
88   * ORIGINAL_TO ?? ^[^=]+=[^@]+@mass\.madduck\.net$
89   * SUBJECT ?? ^Confirmation for
90   {
91     JUSTME="majordomo confirmation"
92     LOG="justme:      passing; $JUSTME$NL"
93   }
94
95   :0 E
96   * FROM ?? ^noreply@googlegroups\.com$
97   * ORIGINAL_TO ?? ^[^=]+=[^@]+@mass\.madduck\.net$
98   * SUBJECT ?? ^Google Groups: Please confirm
99   {
100     JUSTME="googlegroups confirmation"
101     LOG="justme:      passing; $JUSTME$NL"
102   }
103
104   :0 E
105   {
106     LOG="justme:      discarding$NL"
107     SWITCHRC=$PMDIR/discard
108   }
109 }
110
111 # vim:ft=procmail