]> git.madduck.net Git - etc/mailfilter.git/blob - procmail/tickle

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 rules/admin eqdomain spamtrapping
[etc/mailfilter.git] / procmail / tickle
1 # The X-Tickle header has priority over the Original-To address
2 :0
3 *$ ^X-Tickle:${RE_SPACE}+\/${RE_NOT_SPACE}+
4 { TICKLE="$MATCH" }
5
6 :0 E
7 * ORIGINAL_TO ?? ^.+@tickle\.madduck\.net$
8 * ORIGINAL_TO ?? ^\/[^@]+
9 { TICKLE="$MATCH" }
10
11 :0
12 * TICKLE ?? .
13 * ! DEST ?? .
14 {
15   DAILY_DELIVERY_TIME=04:20
16   JUST_DATE="`$BIN_DATE -d \"$DATE\" +%x`"
17
18   :0
19   * TICKLE ?? ^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$
20   { DELAY="@$TICKLE" }
21
22   :0 E
23   * TICKLE ?? ^[0-9]+h$
24   * TICKLE ?? ^\/[^h]+
25   { DELAY="$DATE + $MATCH hours" }
26
27   :0 E
28   * TICKLE ?? ^[0-9]+m$
29   * TICKLE ?? ^\/[^m]+
30   { DELAY="$JUST_DATE + $MATCH months $DAILY_DELIVERY_TIME" }
31
32   :0 E
33   * TICKLE ?? ^[0-9]+w$
34   * TICKLE ?? ^\/[^w]+
35   { DELAY="$JUST_DATE + $MATCH weeks $DAILY_DELIVERY_TIME" }
36
37   :0 E
38   * TICKLE ?? ^[0-9]+d?$
39   * TICKLE ?? ^\/[^d]+
40   { DELAY="$JUST_DATE + $MATCH days $DAILY_DELIVERY_TIME" }
41
42   :0 E
43   {
44     LOG="tickle:      invalid tickler date string: $TICKLE$NL"
45     EXITCODE=69
46     HOST
47   }
48
49   JUST_DATE
50   DAILY_DELIVERY_TIME
51
52   LOG="tickle:      delaying message until $DELAY$NL"
53   DELAYED_QUEUE=$TICKLER_QUEUE
54
55   # unset DISABLE_DELAYS to enable delaying for tickle messages
56   DISABLE_DELAYS
57 }
58
59 TICKLE
60
61 # vim:ft=procmail