I know that crypt in glibc has ${scheme_token}$ at the start of the hashes in /etc/shadow that can be used to infer the scheme, but dovecot has the actual name of the hashing scheme used included as a prefix to the hash. e.g.
{SHA512-CRYPT}$6$O874ifKnKOTKofd.$dQ5428GEVkN1yHnf4EtXXCIPonyZLLWawME7BI02HqmbbsAsGL308ARM2KIy6Xo7NmWMOEeFoHIgA/kIrtB0h1
{ARGON2I}$argon2i$v=19$m=32768,t=4,p=1$HWFJUaoRxrV4seklZ2k+cw$jedriavwKU/ZH1e1quhM03O4CaMKA40T2+OF7htkJl4
Did any other program do this before dovecot?
{crypt}$<schem>$salt...which makes sense. Those{SHA512-},{ARGON2I}look redundant.