]> 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:

do not cleanup tickle/delayed/resubmitted headers
[etc/mailfilter.git] / procmail / justme
1 :0
2 * ? echo "$ORIGINAL_TO" | $EGREP -qif $CONF/justme-addresses
3 {
4   :0 H
5   *$ MSGID ?? ^<.+@$RE_MYDOMAIN>
6   {
7     JUSTME="from machine in my domain"
8     LOG="justme:      passing; $JUSTME$NL"
9     SKIP_SPAMCHECKS=from-mydomain
10   }
11
12   :0 EH
13   *$ ^(References|In-Reply-To):.*<.+@$RE_MYDOMAIN>
14   {
15     JUSTME="in-reply-to/referenced"
16     LOG="justme:      passing; $JUSTME$NL"
17     SKIP_SPAMCHECKS=in-reply-to/referenced
18   }
19
20   :0 E
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 ?? .+ mailing list reminder$
72     {
73       JUSTME="mailman password reminder"
74       LOG="justme:      passing; $JUSTME$NL"
75     }
76   }
77
78   :0 E
79   * FROM ?? ^[Mm]ajordomo@
80   * ORIGINAL_TO ?? ^[^=]+=[^@]+@mass\.madduck\.net$
81   * SUBJECT ?? ^Confirmation for
82   {
83     JUSTME="majordomo confirmation"
84     LOG="justme:      passing; $JUSTME$NL"
85   }
86
87   :0 E
88   {
89     LOG="justme:      discarding$NL"
90
91     INCLUDERC=$PMDIR/addheaders
92
93     :0
94     $DISCARD
95   }
96 }
97
98 # vim:ft=procmail