procmail
[Top] [All Lists]

Re: ISO something in Subject

2004-10-24 01:39:36
Toen wij Dallman Ross kietelden, kwam er dit uit:

foreach? cat $s | gsed -n '/^Subject: */I { s///;
s/=[?][^?]*[?][BQ][?]//I; p; }' | base64-decode; echo "" foreach? end

See http://www.xs4all.nl/~rvtol/procmail/bq_demo.rc
for a 'just procmail' demo on decoding both quoted-printable
and base64 encoded strings. It can also decode multiple lines of
strings, like a full quoted-printable encoded body.

Basically it works like this:

  bq_Input =
"=?iso-8859-1?b?TmV3cyBMaW5lOiBSZXZvbHV0aW9uYXJ5IEhHSCBQaWxscw==?="
  INCLUDERC = "inc/bq.inc"

after which the decoded string will be in $bq_Return.

-- 
Grtz, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>