So here's a little snippet of my
# Rewrite the subject and sender to remove foreign characters
OLDSUBJECT=`/usr/local/bin/formail -xSubject:`
NEWSUBJECT=`echo $OLDSUBJECT |/usr/bin/tr -cs '\11\12\40-\176' 'Z'`
OLDSENDER=`/usr/local/bin/formail -xFrom:`
NEWSENDER=`echo $OLDSENDER |/usr/bin/tr -cs '\11\12\40-\176' 'Z'`
:0fw
|/usr/local/bin/formail -i "Subject: $NEWSUBJECT"
:0fw
|/usr/local/bin/formail -i "From: $NEWSENDER"
This won't work. And is a security risk. (Score:1)
andNEWSUBJECT=`echo "$OLDSUBJECT" | tr ...`
NEWFROM=`echo "$OLDFROM" | tr ...`