This is a simple Procmail recipe to filter emails depending on subject:
:0
* ^Subject: .*Content to filter
$HOME/Maildir/.INBOX.My_filtered_folder/
The above very simple Procmail recipe works without problems. But some emails have Base64 encoded Subject content like this example:
Subject: =?UTF-8?B?VmlldGFsaXMgUG9sZXBl?=
=?UTF-8?B?bGwaY29tbWVudPVkIG9u?=
=?UTF-8?B?IGAgbGlubyBCYWPrcGFj?=
=?UTF-8?B?a2Vw4oDZcyBGZWxpY3l0eSA=?=
=?UTF-8?B?c3hjckVkLg==?=
So it's needed to decode this encoded Subject content first to be able to filter the emails like in the above recipe.
How is it possible to decode such base64-encoded email subject strings within a Procmail recipe prior to filter for Subject content (on Debian 7)?
This question is NOT a duplicate to a question about "Sendmail/procmail - get mail sender and mail subject, utf8 encoding issues [closed]" – it's quite a completely different question.