chiark / gitweb /
More error handling: set -e, set -o pipefail
[modbot-mtm.git] / stump / etc / modack.approved.INO
1 #!/bin/bash
2
3 set -e
4 set -o pipefail
5
6 (
7   cat $@ | formail -rt -I "Reply-To: $NOACK" \
8         -I "X-Webstump-Event: approve" \
9         $MAILOUT_ACCEPTACK_FORMAIL_ARGS
10   cat <<_EOB_
11 Hello,
12
13 $EXPLANATION
14
15 This is an automatic notification that your message has been APPROVED
16 for posting to moderated newsgroup $NEWSGROUP. 
17
18 For details of the moderation arrangements see
19     %GROUPURL%
20
21 If you do not want to receive automatic acknowledgments in the future,
22 simply reply to this message, QUOTING ITS TEXT IN FULL.
23
24 _EOB_
25
26   sanitise_and_quote_email \
27      $@
28
29 ) | sendmail -t -f $MUNGED_ADDRESS