title: converting base64 encoded mail subject to text
body: <p>Set out to write a simple procmail recipie that would forward the mail to me if it found the text "Unprovisioned" in the subject.</p>
  
  <pre><code>:0:
  * ^Subject:.*Unprovisioned.*
  ! me@test.com
  </code></pre>
  
  <p>Unfortunately the subject field in the mail message coming from the mail server was in MIME encoded-word syntax. </p>
  
  <p>The form is: <strong>"=?charset?encoding?encoded text?=".</strong></p>
  
  <pre><code> Subject: =?UTF-8?B?QURWSVNPUlk6IEJNRFMgMTg0NSwgTkVXIFlPUksgLSBVbnByb3Zpc2lvbmVkIENvbm4gQQ==?=
      =?UTF-8?B?bGVydA==?=
  </code></pre>
  
  <p>The above subject is utf-8 charset, base64 encoding with text folded to two lines. So was wondering if there are any mechanisms/scripts/utilities to parse this and convert to string format so that I could apply my procmail filter. Ofcourse I can write a perl script to parse this an perform the required validations, but looking to avoid it if possible.</p>