title: Get Relative message number from UID in IMAP?
body: <p>In IMAP it's pretty straightforward to get the UID for a single message if you happen to have a relative message number:</p>
  <pre><code>FETCH 1 (UID)
  </code></pre>
  <p>But suppose you had a UID and later wanted to determine the relative message number for just that message? Does IMAP provide a way to do that?</p>
  <p>I'm not seeing anything especially obvious in the <a href="https://www.rfc-editor.org/rfc/rfc3501" rel="nofollow noreferrer">spec</a> that would allow you to get the relative message number for a single message. I could do</p>
  <pre><code>UID FETCH 1:* (UID)
  </code></pre>
  <p>and then parse and search through the results to find it, but that seems like overkill (not to mention exponentially slow).</p>