URL-encoded filenames in reports
Rick Chadderdon
mailscanner at yeticomputers.com
Thu Mar 22 18:33:11 CET 2007
Stephane wrote:
> Hi Rick!
>
> This example doesn't work:
>
> http://quarantine.actionweb.fr/download.php?hostname=antispam2.actionweb.fr&date=20070317&id=1HSb00-0002U3-7R&filename=WSComparison_#.DOC
>
> No way to catch "#". Same problème with filename with special characters as "é à
> @ $", etc.
>
> Working example:
>
> http://quarantine.actionweb.fr/download.php?hostname=antispam2.actionweb.fr&date=20070317&id=1HSb00-0002U3-7R&filename=message.zip
>
> Tested with Firefox Mac OSX.
>
> Stéphane
Looks like you're right. Fortunately, my mail flow is low enough that I
haven't had anyone use any non-working characters yet, and even if a few
did, the support of those few that broke this would not be oppressive.
With a bigger setup, this could certainly be a problem. It'd be pretty
easy to modify the setup to not include the filename, though. Your
message could read:
----
Mailscanner has removed one or more files from this message. To
retrieve these files, please click:
http://quarantine.actionweb.fr/download.php?hostname=antispam2.actionweb.fr&date=20070317&id=1HSb00-0002U3-7R
---
At which point your PHP script could display a list of URLS created from
a listing of the files in the directory, which it should be able to
determine from the URL mailscanner generated. In fact, this seems
trivial enough that I will probably do this myself.
Rick
More information about the MailScanner
mailing list