Hi Evaggelos,
I use the same command ( via cron ) but my maildir folder with spam is more than 50.000 emails !!! so ...
I had the same issue and I solved it with a little bash script. The trick is to use the xargs function to break up the spam list in smaller blocks (I also restrict spam processing to spam older than $TIME_LIMIT in order to let time to user remove non-spam, and ignore filename ending with T as they have already been removed). Relevant lines :
find ./ -iname "*" -mtime +$TIME_LIMIT -print | grep -v T\$ > $TEMP_FILE_NAME cat $TEMP_FILE_NAME | xargs -r -n500 sa-learn --showdots --spam -C $SA_CONF_DIR
Cheers,
Denis
but my question wasnt about spamassassin (wrong mail list :) ) but with alternative mailbox format (like dbox) in dovecot 1.0.x
Michal Soltys wrote:
Evaggelos Balaskas wrote:
the problem i have with maildir is that programs like sa-learn (from spamassassin) returns argument too long list and perhaps a lot of other programs too.
I have never seen sa-learn giving me any problems while learning spam from maildirs (often with tens of thousands messages).
Simple:
sa-learn --progress --spam new
does the thing, with previously prepared maildir with messages classified as spam.
Evaggelos Balaskas - http://ebalaskas.gr Unix System Engineer Informatics Engineer Technological Education -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHndd4WIK+Pe9twhoRAoNsAJ4rBkxPsa+ngWGXUEPO9jZmePYLAACgiZZ0 LoIkPnyr9Hiu709QzHK4Azc= =ePcg -----END PGP SIGNATURE-----
-- Denis Cardon Tranquil IT Systems 44 bvd des pas enchantés 44230 Saint Sébastien sur Loire tel : +33 (0) 2.40.97.62.67 http://www.tranquil-it-systems.fr