Share

AMaViS - A Mail Virus Scanner

Tracker: Bugs

5 Bug for virus DSN + non English subject - ID: 2723782
Last Update: Settings changed ( karamorf )

If Amavis is bouncing virus emails and a virus email comes through that has
a Japanese subject (I tested with Japanese, I assume this same thing
happens with other languages) then the subject will not be printed
correctly in the DSN template.

The problem is the majority of email clients (found this behavior in
Thunderbird and Outlook Express, didn't feel like testing beyond that) will
base64 encode the subjects if they are in Japanese (again I would assume
this happens for any non English language). Then the original subject ends
up looking like this in the DSN email send back to the sender:
=?UTF-8?B?44Gu44Km44Kk44Or44K544OB44Kn44OD44Kv44Gr44Gm?=

To fix this it needs to be decoded, I did this in the marco_header_field
subroutine but it might not be the best place for it. Anywise, before
returning the string I added these lines:
sub macro_header_field {
#... unchanged code original in this sub ...
if(/^=\?[^\?]+\?B\?(.+)\?=/) {
$_ = decode_base64($1);
}
$_;
}

Anywise, having this code seems to work (when getting the DSN I get
Japanese text instead of a bunch of gibberish).


Curtis MacDuff ( karamorf ) - 2009-03-31 19:39

5

Open

Duplicate

Nobody/Anonymous

None

None

Public


Comments

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
resolution_id None 2009-03-31 19:40 karamorf