Skip to content

Instantly share code, notes, and snippets.

@cdombroski
Created August 26, 2013 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdombroski/6341818 to your computer and use it in GitHub Desktop.
Save cdombroski/6341818 to your computer and use it in GitHub Desktop.
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