summaryrefslogtreecommitdiffstats
path: root/etc/procmailrc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/procmailrc')
-rw-r--r--etc/procmailrc42
1 files changed, 15 insertions, 27 deletions
diff --git a/etc/procmailrc b/etc/procmailrc
index 5ffeba8..77a02e2 100644
--- a/etc/procmailrc
+++ b/etc/procmailrc
@@ -3,42 +3,30 @@ PATH = /usr/bin:/bin
3LOGFILE = $HOME/log/procmail.log 3LOGFILE = $HOME/log/procmail.log
4GITHUB_FILTER = $HOME/libexec/filter-github-emails 4GITHUB_FILTER = $HOME/libexec/filter-github-emails
5DEFAULT_RECIPIENT = admin@monitoring-plugins.org 5DEFAULT_RECIPIENT = admin@monitoring-plugins.org
6FROM = `formail -c -x 'From ' | cut -d ' ' -f 1`
7EXTENSION = $1 6EXTENSION = $1
8 7
9:0 fhw
10| formail -A "X-Original-From: $FROM"
11
12#
13# Handle emails sent to <plugins+github@monitoring-plugins.org>.
14#
15:0 8:0
16* EXTENSION ?? ^^github^^
17* ! ^X-Loop: plugins@monitoring-plugins\.org 9* ! ^X-Loop: plugins@monitoring-plugins\.org
18{ 10{
19 :0 fw
20 | $GITHUB_FILTER
21
22 #
23 # Forward the email only if $GITHUB_FILTER rewrote the To: header.
24 #
25 :0 fhw 11 :0 fhw
26 * ^To:(.*[^-a-zA-Z0-9_.])?devel@monitoring-plugins\.org 12 * ^From \/[^ ]+
27 | formail -A 'X-Loop: plugins@monitoring-plugins.org' 13 | formail -A 'X-Loop: plugins@monitoring-plugins.org' \
14 -A "X-Original-From: $MATCH"
28 15
29 :0 a 16 # Handle emails sent to <plugins+github@monitoring-plugins.org>.
30 ! devel@monitoring-plugins.org 17 :0
31} 18 * EXTENSION ?? ^^github^^
19 {
20 :0 fw
21 | $GITHUB_FILTER
32 22
33# 23 # Forward only if $GITHUB_FILTER rewrote the To: header.
34# Handle emails that shouldn't be forwarded to the mailing list. 24 :0
35# 25 * ^To:.*\/devel@monitoring-plugins\.org
36:0 26 ! $MATCH
37* ! ^X-Loop: plugins@monitoring-plugins\.org 27 }
38{
39 :0 fhw
40 | formail -A 'X-Loop: plugins@monitoring-plugins.org'
41 28
29 # Handle emails that shouldn't be forwarded to the list.
42 :0 30 :0
43 ! $DEFAULT_RECIPIENT 31 ! $DEFAULT_RECIPIENT
44} 32}