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 --all-domains --spam-file Maildir/.Junk/ --spamclear-days 5

Then to run the manually:

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

I get: 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 has:

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

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

Closed (fixed)