Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Full backend debugging for dovecot-antispam
#!/bin/bash
tmpf=/tmp/antispam.log.$$
(
date
id
let i=0
for arg; do
let i=1+i
echo "arg $i $arg"
done
cat - > $tmpf.msg
<backend command goes here> "$@" < $tmpf.msg
rc=$?
echo rc=$rc
date
exit $rc
) 2> $tmpf.err > $tmpf.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment