sa-learn.sh not deleting spam after running cron job

676 views Asked by At

I have a small script that seems to be running,according to the logs, but it is not removing the the emails in the folder, as instructed, after processing.

I've searched and searched, but don't know how to troubleshoot any further. Can anyone help:

Here is the script:

#!/bin/bash
/usr/bin/sa-learn --no-sync --spam ~/mail/domainname.com/username/.learn-spam/cur
/usr/bin/sa-learn --no-sync --ham ~/mail/domainname.com/username/.learn-ham/cur
/usr/bin/sa-learn --sync
rm -f ~/mail/domainname.com/username/.learn-spam/cur
rm -f ~/mail/domainname.com/username/.learn-ham/cur

Here is the cron instructions:

/home/accountname/sa-learn.sh >/dev/null 2>&1

I've substituted actual names.

Can anyone shed any light as to why it might not be deleting from those folders?

Thank you!

0

There are 0 answers