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

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:

lower SA limit for autotraining ham to unsure crm
[etc/mailfilter.git] / procmail / delay-delivery
1 #TODO: create config/delay-(disabled|tonight|weekend)
2
3 :0
4 * POSTPONED ?? .
5 {
6   :0 fw
7   |$FORMAIL -R X-Postponed X-Was-Postponed
8 }
9
10 :0 E
11 * ! DISABLE_DELAYS ?? .
12 * DELAY ?? .
13 {
14   #TODO: for tickling, use header date
15   RELEASE="`$BIN_DATE -d \"$DELAY\" +'%s %c'`"
16
17   :0
18   *$ RELEASE ?? ^\/${RE_NOT_SPACE}+
19   { RELEASE_TS=$MATCH }
20
21   :0
22   *$  $RELEASE_TS ^0
23   *$ -$OURDATE_TS ^0
24   {
25     :0
26     *$ RELEASE ?? ^[0-9]+${RE_SPACE}+\/.+
27     { RELEASE_TIME="$MATCH" }
28
29     LOG="delay:       delay delivery of $MSGID until $RELEASE_TIME$NL"
30     POSTPONED="$RELEASE_TS ($RELEASE_TIME)"
31
32     INCLUDERC=$PMDIR/record-delayed-mail
33     INCLUDERC=$PMDIR/addheaders
34
35     :0
36     $DELAYED_QUEUE
37   }
38 }