URL-encoded filenames in reports

Rick Chadderdon mailscanner at yeticomputers.com
Tue Mar 20 21:03:23 CET 2007


Stephane wrote:
> Rick Chadderdon <mailscanner <at> yeticomputers.com> writes:
>
>   
>> Simon Walter wrote:
>>     
>>> Hello
>>>
>>> Is there a way to get the filename of files which got stored in
>>> quarantine as url-encoded string?

[...]

>> I would probably handle this with PHP.  The line in my corresponding
>> report .txt file would be something like:
>>
>>
>>     
> http://my.mailscannerbox.com/download.php?id=$id&filename=$filename&datenumber=$datenumber&hostname=$hostname
>   
>> and I would use my script to handle directing people to the correct file. 
>>     
>
> In fact, the problem is with $filename itself in Mailscanner. If the variable
> contains something as "WSComparison_#.DOC" or "WHform for summer 2008.doc", no
> way to passe this in an URL. 
>
> I've on my side this kind of command.
>
> http://quarantine.tld/download.php?hostname=godalnet&date=20070317&id=1HSb00-0002U3-7R&filename=WSComparison_#.DOC
>
> We need a key or a simple urlencode version of $filename. An $URLfilename will
> be great. Or may be another solution that I haven't discovered.
>   

While it's a less than optimal solution, my few tests with this have
shown that all of the web browsers/email clients I've tried this on will
URLize the spaces and odd characters automatically.  The links work fine
for me right now, although I have not done extensive testing.  Yes, it
would be nice if we had a properly URL encoded variable, but at the
moment, I don't seem to need it.

Rick


More information about the MailScanner mailing list