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

b174b3592a17a68039f8109e26a3b39041dc50eb
[etc/mailfilter.git] / procmail / justme
1 VERBOSE=yes
2 :0
3 * ? echo "$ORIGINAL_TO" | $EGREP -qif $CONF/justme-addresses
4 {
5   :0 H
6   *$ MSGID ?? ^<.+@$RE_MYDOMAIN>
7   {
8     LOG="justme:      passing; from machine in my domain$NL"
9     :0 fw
10     |$FORMAIL -I'X-Justme: from machine in my domain'
11     SKIP_SPAMCHECKS=from-mydomain
12   }
13
14   :0 EH
15   *$ ^(References|In-Reply-To):.*<.+@$RE_MYDOMAIN>
16   {
17     LOG="justme:      passing; in-reply-to/referenced$NL"
18     :0 fw
19     |$FORMAIL -I'X-Justme: in-reply-to/referenced'
20     SKIP_SPAMCHECKS=in-reply-to/referenced
21   }
22
23   :0 E
24   * ? echo "$ORIGINAL_TO" | $EGREP -qif $CONF/justme-address-exceptions
25   { 
26     LOG="justme:      passing; explicitly excepted address$NL"
27     :0 fw
28     |$FORMAIL -I'X-Justme: in-reply-to/referenced'
29   }
30
31   :0 EBH
32   *$ 1^0 B ?? $RE_FIRSTNAME$RE_SPACE_NEWLINE+$RE_LASTNAME
33   *$ 1^0 B ?? $RE_LASTNAME[,]?$RE_SPACE_NEWLINE*$RE_FIRSTNAME
34   {
35     LOG="justme:      passing; full name reference$NL"
36     :0 fw
37     |$FORMAIL -I'X-Justme: full name reference'
38   }
39
40   :0 EBH
41   *$ B ?? $RE_LASTNAME
42   {
43     LOG="justme:      passing; last name reference$NL"
44     :0 fw
45     |$FORMAIL -I'X-Justme: last name reference'
46   }
47
48   :0 EBH
49   *  1^0 B ?? madduck
50   * -1^0 B ?? mass\.madduck\.net
51   {
52     LOG="justme:      passing; nickname reference$NL"
53     :0 fw
54     |$FORMAIL -I'X-Justme: nickname reference'
55   }
56
57   :0 EBH
58   *$ ? $EGREP -qif $CONF/justme-keyword-exceptions
59   {
60     LOG="justme:      passing; keyword reference$NL"
61     :0 fw
62     |$FORMAIL -I'X-Justme: keyword reference'
63   }
64
65   :0 E
66   { 
67     LOG="justme:      discarding$NL"
68     :0
69     $DISCARD
70   }
71 }
72
73 VERBOSE=no
74 # vim:ft=procmail