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:

ensure that logfile filenames are < 255
[etc/mailfilter.git] / procmail / tickle
1 # The X-Tickle header has priority over the Original-To address
2 :0
3 * ! POSTPONED ?? .
4 *$ ^X-Tickle:${RE_SPACE}+\/${RE_NOT_SPACE}+
5 { TICKLE="$MATCH" }
6
7 :0 E
8 * ! POSTPONED ?? .
9 * ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$
10 * ORIGINAL_TO ?? ^\/[^@]+
11 { TICKLE="$MATCH" }
12
13 :0
14 * TICKLE ?? .
15 * ! DEST ?? .
16 {
17   DAILY_DELIVERY_TIME=04:20
18   JUST_DATE="`$BIN_DATE -d \"$DATE\" +%x`"
19
20   :0
21   * TICKLE ?? ^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$
22   { DELAY="@$TICKLE" }
23
24   :0 E
25   * TICKLE ?? ^[0-9]+h$
26   * TICKLE ?? ^\/[^h]+
27   { DELAY="$DATE + $MATCH hours" }
28
29   :0 E
30   * TICKLE ?? ^[0-9]+m$
31   * TICKLE ?? ^\/[^m]+
32   { DELAY="$JUST_DATE + $MATCH months $DAILY_DELIVERY_TIME" }
33
34   :0 E
35   * TICKLE ?? ^[0-9]+w$
36   * TICKLE ?? ^\/[^w]+
37   { DELAY="$JUST_DATE + $MATCH weeks $DAILY_DELIVERY_TIME" }
38
39   :0 E
40   * TICKLE ?? ^[0-9]+d?$
41   * TICKLE ?? ^\/[^d]+
42   { DELAY="$JUST_DATE + $MATCH days $DAILY_DELIVERY_TIME" }
43
44   :0 E
45   {
46     LOG="tickle:      invalid tickler date string: $TICKLE$NL"
47     EXITCODE=69
48     HOST
49   }
50
51   JUST_DATE
52   DAILY_DELIVERY_TIME
53
54   :0
55   { RELEASE="`$BIN_DATE -d \"$DELAY\" +'%s (%c)'`" }
56
57   LOG="tickle:      delaying message until $RELEASE$NL"
58   DELAYED_QUEUE=$TICKLER_QUEUE
59
60   :0 fw
61   |$FORMAIL -I"X-Tickle: $RELEASE"
62
63   # store messages as read
64   MARK_READ=tickler
65
66   # unset DISABLE_DELAYS to always enable delaying for tickle messages
67   DISABLE_DELAYS
68 }
69
70 # vim:ft=procmail