1

Topic: Scanning and removing existing spam messages?

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.3
- Linux/BSD distribution name and version: CentOS 7.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Apache
====

Greetings,

iRedmail hasn't been flagging spam messages for a long time and there are 1000s in iMap/Dovecot email folders.

I manually moved some messages in one account to a Junk folder for training and ran sa-learn spam to update the tags.

Now I need to run "some job" on the INBOXes of all user accounts where existing messages are analyzed, retagged and MOVED to a Junk folder so they can be reviewed and deleted.

I tried running `spamc -c < message` in the .Junk/cur folder and all of the messages report 0/0 even though I trained on them.

sa-learn --spam --username=vmail /var/mail/vmail1/my.tld/o/n/o/onno-2016.01.04.23.27.14/Maildir/.Junk/{cur,new}
cd /var/mail/vmail1/my.tld/o/n/o/onno-2016.01.04.23.27.14/Maildir/.Junk/cur
for i in *; do spamc -c < $i; done

all report 0/0

1. Why is spamc showing 0/0?
2. Once I get spamc to show them as spam (not 0/0) what command do I run to analyze INBOX/cur and re-flag each message analyzed as spam and then move those to JUNK/cur for verification and deletion?

Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.

2

Re: Scanning and removing existing spam messages?

first of all, you run a really really outdated version on a not supported system, it changed that spam tagging and sorting is done via amavis which invokes SA and with a sieve script


you should consider upgrading to a new system/version and then use imapcopy which should refilter the messages

3

Re: Scanning and removing existing spam messages?

I appreciate your reply. That said, upgrading isn't something I can do currently and this functionality existed when this was a current version. So knowing how to do this on this version would be nice if anyone has the info.

4

Re: Scanning and removing existing spam messages?

FYI https://docs.iredmail.org/dovecot.imapsieve.html