Yes, with Mail.dll IMAP client you can search by any header using Imap.Search
method and Expression
class:
List<long> uids = imap.Search(
Expression.Header("Message-ID", "id@example.com"));
You can also use dedicated MessageID method:
List<long> uids = imap.Search(Expression.MessageId("id@example.com"));
Message-ID header is available through IMail.MessageID property:
IMail email = new MailBuilder().CreateFromEml(eml)
string messageId = email.MessageID;