+ ### 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
+ echo "mailtest-check: failed to rsync fencepost > $try_limit seconds"
+ 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 ###