Exchange 2010 – Public Folder database replication not working “550 5.2.0 RESOLVER.ADR.BadPrimary”

Public folder database replication is not working. Message taking log is showing error:

‘550 5.2.0 RESOLVER.ADR.BadPrimary; recipient primary SMTP address is missing or invalid’;’550 5.2.0 RESOLVER.ADR.BadPrimary; recipient primary SMTP address is missing or invalid’

Issue is caused by wrong proxyAddresses for the  Public folder databases. There is eather two Primary SMTP addresses or wrong Primary SMTP address.

They can be found in ADSI edit.pf