Logged in on B:
$ doveadm -D -v -o imapc_features="rfc822.size fetch-headers" -o mail_prefetch_count=20 -o imapc_user=ricudis -o imapc_password=topoulimoueinai38ekatosta -o imapc_host=dovecot-a.net -o imapc_port=993 -o imapc_ssl=imaps -o imapc_ssl_verify=no backup -R -u ricudis@dovecot-a.net imapc:
(modify for no SSL as appropriate, etc)
$ doveadm -D -v -o imapc_features="rfc822.size fetch-headers" -o mail_prefetch_count=20 -o imapc_user=ricudis -o imapc_password=topoulimoueinai38ekatosta -o imapc_host=dovecot-a.net -o imapc_port=993 -o imapc_ssl=imaps -o imapc_ssl_verify=no backup -R -u ricudis@dovecot-a.net imapc:
(modify for no SSL as appropriate, etc)