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

handle spam separately, not from spamfilter
[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 EBH
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 EBH
36   *$ B ?? $RE_LASTNAME
37   {
38     JUSTME="last name reference"
39     LOG="justme:      passing; $JUSTME$NL"
40   }
41
42   :0 EBH
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   { 
59     LOG="justme:      discarding$NL"
60     :0
61     $DISCARD
62   }
63 }
64
65 # vim:ft=procmail