URL-encoded filenames in reports

Stephane sleclerc at actionweb.fr
Sat Mar 17 21:46:16 CET 2007

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?
> >
> > Using $filename in reportfiles doesn't work for files with spaces or
> > special characters if the filename is used as part of an url.
> >
> > See: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410647
> >   
> I would probably handle this with PHP.  The line in my corresponding
> report .txt file would be something like:
> and I would use my script to handle directing people to the correct file. 
> Unfortunately, I have too many users who would retrieve *any* file -
> virus, spam or other - to give them this kind of a tool.
> I just fiddled with it a little bit, and it seems as if this would work
> just fine.  Now you made me want to test it...
> Rick

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.


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.


More information about the MailScanner mailing list