Turns out that running zmlocalconfig |grep zmprov showed the problem. The results were:
zimbra_zmprov_default_soap_server = localhost
zimbra_zmprov_default_to_ldap = TRUE
on the working server and:
zimbra_zmprov_default_soap_server = localhost
zimbra_zmprov_default_to_ldap = false
on the server with the error. Solution was to either change localhost to a mailbox server OR change default_to_ldap to TRUE.
zmlocalconfig -e zimbra_zmprov_default_soap_server=ns.mm.com
zmlocalconfig -e zimbra_zmprov_default_to_ldap = TRUE
zmlocalconfig -e zimbra_server_hostname = ns.mm.com
zmlocalconfig -e zimbra_zmprov_default_soap_server = localhost
zmlocalconfig -e zimbra_zmprov_default_to_ldap=false
zmlocalconfig -e ldap_port=389
zmlocalconfig -e ldap_url=ns.mm.com