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

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