Author: Jethro R Binks Date: To: exim-users Subject: Re: [exim] Exim mail Header
On Fri, 17 Jun 2011, S Pratap Singh wrote:
> I have written a script which processes the incoming mails to the
> desired destination.
>
> But while checking few emails header has Subject line as mentioned below :
>
> Subject=>=?UTF-8?B?MAHDIKSANBDKHIDBSIHDSKBDSJDSKBDSJDGSJDBSDBSJDBDJGDSDBSJDB=?=
>
> =?UTF-8?B?fsnsmfnbmMNDSAJSDfsnfmsfnbsnNDSJAJSKnfjksnfkDsnjkDsdnDSBSHNSS==?=
>
> I am not sure why it is coming like that while processing the mail while
> reading the email in webmail or email client I am not getting such
> subject format. I am getting the correct subject line in text format.
>
> However sender is not our server I am receiving mails from other
> destination and asking them to let us know what format they are using to
> create the mails is not in my hand I am just reading the mails.
>
> Is there any way to read the subject line correctly in text format as it
> is appearing in the email client or webmail .
These appear to be UTF-8 headers, with "B" (base64) encoding.
See RFC2047 ("MIME (Multipurpose Internet Mail Extensions) Part Three:
Message Header Extensions for Non-ASCII Text") and related.
Your script needs to be able to decode them in the same way that your mail
client and system do for display.
Jethro.
. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK
The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.