Now and then I get reports about the error message "The account xxx has a duplicate name in Mail".

error message duplicate accounts

What does this error message mean and how to you fix the problem?

Lots of things are unique: phone numbers or your bank account numbers. The phone numbers need to be unique or you wouldn't be able to call the person with the number. Banks as we know them wouldn't be able to work without unique bank account numbers.

Mail Archiver "talks" to the accounts in AppleMail. To be able to do that the account names need to be unique.

I currently have an account named "Macsend" in AppleMail. If I want - for whatever reason - to create another account with the same name I get an error message in High Sierra:

create new account

I can't create another account because an account with the same name already exists. 

In older versions of AppleMail you would NOT get this error message and you could create the account if the original account was not enabled. If you update from an older version of AppleMail with such duplicate account names to a newer version the accounts are kept.

In this case you get the above mentioned error message in Mail Archiver. To fix the problem go to the accounts in AppleMail:

Duplicate accounts in AppleMail

You would see another account at the bottom of the account list with the same name as an enabled account. Delete or rename the account.

Problem fixed!