+main() {
+
+ case $HOSTNAME in
+ bk)
+ folders=(/m/md/{expertpathologyreview.com,amnimal.ninja}/testignore)
+ froms=(ian@iankelling.org z@zroe.org testignore@je.b8.nz iank@gnu.org)
+ ;;
+ je)
+ froms=(ian@iankelling.org z@zroe.org iank@gnu.org testignore@amnimal.ninja)
+ folders=(/m/md/je.b8.nz/testignore)
+ ;;
+ *)
+ folders=(/m/md/l/testignore)
+ froms=(testignore@je.b8.nz testignore@expertpathologyreview.com testignore@amnimal.ninja ian@iankelling.org z@zroe.org iank@gnu.org)
+ if ! $int; then
+ ### begin rsyncing fencepost email ###
+ # We dont want to exit if rsync fails, that will get caught by
+ # our later test by virtue of not having the latest email.
+ did_rsync=false
+ try_start_time=$EPOCHSECONDS
+ try_limit=140 # somewhat arbitrary value
+ while ! $did_rsync; do
+ try_left=$(( try_limit - ( EPOCHSECONDS - try_start_time) ))
+ timeout=120 # somewhat arbitrary value
+ if (( try_left < 0 )); then
+ break
+ fi
+ if (( try_left < timeout )); then
+ timeout=$try_left
+ fi
+ if timeout $timeout rsync --chown iank:iank -e "ssh -oIdentitiesOnly=yes -F /dev/null -i /root/.ssh/jtuttle" -t --inplace -r 'jtuttle@fencepost.gnu.org:/home/j/jtuttle/Maildir/new/' /m/md/l/testignore/new; then
+ did_rsync=true
+ else
+ sleep 4
+ fi
+ done
+ if ! $did_rsync; then
+ echo mailtest-check: warning: fencepost rsync failed
+ fi
+ ### end rsyncing fencepost email ###
+ fi
+ ;;
+ esac
+
+
+ # avoid errors like this:
+ # Nov 8 08:16:05.439 [6080] warn: plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/WLBLEval.pm: lib/Mail/SpamAssassin/Plugin/WLBLEval.pm: Permission denied at (eval 59) line 1.
+ #Nov 8 08:16:05.439 [6080] warn: plugin: failed to parse plugin (from @INC): Can't locate Mail/SpamAssassin/Plugin/VBounce.pm: lib/Mail/SpamAssassin/Plugin/VBounce.pm: Permission denied at (eval 60) line 1.
+ # i dont know why, i just found the solution online
+ cd /m/md
+
+
+ getspamdpid
+ # first time we write, overwrite anything existing