spamclear.pl does not work

I notice spam cleaning procedure is not working

If I run spamclean.pl --debug from command line I get:

refino.mx: spam clearing is enabled refino.mx: finding mailboxes refino.mx: no retention active refino.mx: spam=spam virus=virus trash=trash refino: finding folders refino: no spam folder refino: no virus folder refino: no trash folder refino: processing 0 folders marcela.refino: finding folders marcela.refino: spam folder is /home/refino/homes/marcela/Maildir/.spam marcela.refino: no virus folder marcela.refino: trash folder is /home/refino/homes/marcela/Maildir/.Trash marcela.refino: processing 2 folders marcela.refino: processing folder /home/refino/homes/marcela/Maildir/.spam Error: Failed to open /home/refino/homes/marcela/Maildir/.spam/cur : Permission denied

Error

Failed to open /home/refino/homes/marcela/Maildir/.spam/cur : Permission denied

Permission are: [root@erl webmin]# ls -alr /home/refino/homes/marcela/Maildir/.spam

drwx------ 2 marcela.refino refino 4096 May 31 16:12 tmp drwx------ 2 marcela.refino refino 4096 May 31 16:12 new -rw------- 1 marcela.refino refino 52 Jan 12 00:10 dovecot-uidlist -rw------- 1 marcela.refino refino 3496 Jan 12 00:10 dovecot.index.log -rw------- 1 marcela.refino refino 25600 Jan 12 00:10 dovecot.index.cache drwx------ 2 marcela.refino refino 4096 May 24 00:28 cur drwx------ 20 marcela.refino refino 4096 Jun 29 01:15 .. drwx------ 5 marcela.refino refino 4096 Jan 12 00:10 .

What could be the problem?

Thanks in advance

Status: 
Active

Comments

If you switch to that user with the su command, can you list the /home/refino/homes/marcela/Maildir/.spam/cur directory?

Before su to that user I had to change her shell, because /sbin/nologin does not let you su: This account is currently not available.

Using /sbin/bash it let me su to that user:

bash-4.1$ cd /home/refino/homes/marcela/Maildir/.spam/cur/

bash-4.1$ ls -al

total 52

drwx------ 2 marcela.refino refino 4096 May 24 00:28 . drwx------ 5 marcela.refino refino 4096 Jan 12 00:10 .. -rw------- 1 marcela.refino refino 19428 May 21 17:17 1432253866.29259_0.erl.pregasistemas.com -rw------- 1 marcela.refino refino 21978 May 23 19:00 1432432816.7414_0.erl.pregasistemas.com

Before I put back "nologin" I tried: [root@erl ~]# /etc/webmin/virtual-server/./spamclear.pl --debug

Same results:

marcela.refino: finding folders marcela.refino: spam folder is /home/refino/homes/marcela/Maildir/.spam marcela.refino: no virus folder marcela.refino: trash folder is /home/refino/homes/marcela/Maildir/.Trash marcela.refino: processing 2 folders marcela.refino: processing folder /home/refino/homes/marcela/Maildir/.spam Error: Failed to open /home/refino/homes/marcela/Maildir/.spam/cur : Permission denied

Error

Failed to open /home/refino/homes/marcela/Maildir/.spam/cur : Permission denied

Thanks Jamie

Ok, so it sounds like the permissions are fine - there must be a bug in Virtualmin.

If you run the spamclear.pl command again with the --dry-run flag and see if it reports the same error?