+1 vote

We have a requirement to migrate imap mailboxes from a "Critical Path" IMAP server.

We have the admin credentials and try to do a PROXYAUTH to impersonate the users: Login with admin credentials, then switch to any user without knowing their passwords.

How can we do that with the Limilabs Mail.dll IMAP library?

by

1 Answer

0 votes
 
Best answer

You can use Imap.SendCommand method, after you authenticate with admin credentials:

imap.UseBestLogin("admin", "admin-password");

ImapResponse response = imap.SendCommand("PROXYAUTH user");
if (response.Status != ImapResponseStatus.Positive)
    throw new Exception("Failure: " + response.Message);

Next release of Mail.dll will include this as a regular method on Imap client:

imap.UseBestLogin("admin", "admin-password");
imap.ProxyAuth("user");
by (301k points)
...