How to Filter Cyrillic Messages

Introduction

The “KOI8-R” you see in Cyrillic Subject lines refers to a popular Cyrillic encoding and indicates to the mail client that the rest of the text is thusly encoded. For more info, Wikipedia has a nice article on KOI8-R. There is another encoding, called windows-1251 that is also used to encode Cyrillic, albeit less commonly than KOI8-R.

In this example, we filter messages with Cyrillic headers into a folder called Cyrillic by adding these rules to .procmailrc. To automatically delete them, replace target location Cyrillic with /dev/null. Remember that procmail processes rules in .procmailrc from top to bottom.

Rules

:0:
* Subject:.*koi8-r
Cyrillic

:0:
* Subject:.*windows-1251
Cyrillic

References

  1. http://thesmithfam.org/blog/2008/05/28/using-procmail-to-filter-out-cyri...