chiark
/
gitweb
/
~webstump
/
modbot-mtm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inews: Add %ABBREV% to "lost" messages
[modbot-mtm.git]
/
inews.INO
diff --git
a/inews.INO
b/inews.INO
old mode 100644
(file)
new mode 100755
(executable)
index
a2bbc54
..
915dd6e
--- a/
inews.INO
+++ b/
inews.INO
@@
-1,9
+1,6
@@
#!/bin/sh
set -e
#!/bin/sh
set -e
-#real=false
-real=true
-
export NNTPSERVER=nnrp.chiark.greenend.org.uk
export NNTPAUTH='md5cookie1way chiark'
export NNTPSERVER=nnrp.chiark.greenend.org.uk
export NNTPAUTH='md5cookie1way chiark'
@@
-17,11
+14,14
@@
set +e
output=`
set -e
exec 2>&1
output=`
set -e
exec 2>&1
- if $real; then
- inews -h -Q -R <$tf
+ if [ x%DIVERTPOSTINGS% = x ]; then
+ perl -pe '
+ next unless ($.==1)../^$/;
+ s/^(?:X-Trace|NNTP-Posting-(?:Date|Host)|X-Complaints-To|Injection-Info)/X-$&/;
+ ' $tf | inews -h -Q -R
else
(set -e
else
(set -e
- echo "Newsgroups: %
TESTGROUP
%"
+ echo "Newsgroups: %
DIVERTPOSTINGS
%"
sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h
fi
`
sed 's/^Newsgroups:/X-Would-Newsgroups:/' $tf) | inews -h
fi
`
@@
-31,7
+31,7
@@
set -e
if [ $rc = 0 ]
then
echo 'posted ok!'
if [ $rc = 0 ]
then
echo 'posted ok!'
-
$HOME/live
/xlog/bin/record posted %GROUP% <$tf
+
%BASEDIR%
/xlog/bin/record posted %GROUP% <$tf
exit 0
fi
exit 0
fi
@@
-40,4
+40,4
@@
fi
echo
echo ======================
cat $tf
echo
echo ======================
cat $tf
-) | mail -s
'lost moderated newsgroup submission'
webstump
+) | mail -s
"lost moderated newsgroup submission %ABBREV%"
webstump