james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Updated: (JAMES-160) AttachmentFileNameIs can't handle national characters in filename
Date Thu, 01 Apr 2004 21:45:44 GMT
The following issue has been updated:

    Updater: Noel J. Bergman (mailto:noel@devtech.com)
       Date: Thu, 1 Apr 2004 1:45 PM
assigned to component
             Component changed to Matchers/Mailets (bundled)
For a full history of the issue, see:


View the issue:

Here is an overview of the issue:
        Key: JAMES-160
    Summary: AttachmentFileNameIs can't handle national characters in filename
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: James
             Matchers/Mailets (bundled)

   Reporter: Christian Andersson

    Created: Tue, 16 Mar 2004 3:59 AM
    Updated: Thu, 1 Apr 2004 1:45 PM
Environment: James running on Suse Linux 8
JDK version 1.4.2_02-b03

AttachmentFileNameIs is not matching on files with national characters in it.

I have added this configuration in the james configuration (Thanks to Noel for showing this)

<mailet match="AttachmentFileNameIs=*.bat,*.com,*.dll,*.exe,*.lnk,*.pif,*.scr,*.vbe,*.vbs,*.wsh"
    <notice>550 Rejected - Banned type of attachment.  Please contact
intended recipient.</notice>

The problem is that it does not Match on files with national characters in them, the reson
for this is that if there are national characters in the filename, the filename gets encoded
and the matcher therefore gets in trouble since it matches against the encoded filename and
not an unencoded filename.

I sent a file called 'øyenblikksfoto1.exe' with mozilla to myself (using an other mail-account)
this message came through even though it should have been stopped by the matcher.  Here is
what the e-mail code for this attachement looked like.

Content-Type: application/octet-stream;
Content-Transfer-Encoding: base64
Content-Disposition: attachment;

and since the matcher matches for *.exe this file gets through, since there is NO *.exe in
that filename  (mozzilla parsed this filename correctly)

I then had a friend send me an "exe" file through hotmail (I don't have that myself) the file
was called "nånting.exe"  and here is what came to me in the mime-encapsulating...

Content-Type: application/octet-stream;
    name="=?iso-8859-1?B?buVudGluZy5leGU= ?="
Content-Disposition: attachment; filename="=?iso-8859-1?B?buVudGluZy5leGU= ?="
Content-Transfer-Encoding: base64

This file also got through to me, but this time not even mozilla could parse that filename...

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message