Fix Ok, I've taken another look, and have a fix.
Update zmtrainsa to use a different fetchmailrc by changing these lines.
echo "server $SERVER user $USER@$SERVER password $PASS keep" > ${zimbra_home}/conf/.fetchmailrc
chmod 600 ${zimbra_home}/conf/.fetchmailrc
export HOME=${zimbra_home}/conf # Add this line
/usr/bin/fetchmail -f ${zimbra_home}/conf/.fetchmailrc -n -a -u $USER $FOLDER -m "${zimbra_home}/bin/sa-learn -p ${zimbra_home}/conf/salocal.cf --dbpath ${zimbra_home}/amavisd/.spamassassin/ --no-sync --showdots -L --${MODE}" ${SERVER}
# This line is unchanged
${zimbra_home}/bin/sa-learn -p ${zimbra_home}/conf/salocal.cf --dbpath ${zimbra_home}/amavisd/.spamassassin/ --sync
rm -f ${zimbra_home}/conf/.fetchmailrc |