Automatic spam clearing not working with custom folder delivery

The automatic spam clearing option isn't working with custom spam folder delivery...

I use Maildir/.Junk/:

virtualmin modify-spam.pl --all-domains --spam-file Maildir/.Junk/ --spamclear-days 5

Then to run the spamclear.pl manually:

export WEBMIN_CONFIG=/etc/webmin
export WEBMIN_VAR=/var/webmin
cd /usr/share/webmin/virtual-server
/usr/share/webmin/virtual-server/spamclear.pl --debug

I get:

example.net: finding mailboxes
example: finding folders
example: no spam folder
example: no virus folder
trey.example: finding folders
trey.example: no spam folder
trey.example: no virus folder

There really are Junk folders though... Line 51 of spamclear.pl has:

foreach $fn ("spam", "virus") {

It should read the value of the spam/virus delivery folder here instead.

Status: 
Closed (fixed)