I was able to recover by restoring /var/CommuniGate/Accounts/postmaster.macnt/account.settings from a backup. Somehow the UseAppPassword setting had changed to NO. I didn’t change it intentionally, so I guess it had to be caused by the script somehow.