Bug 8146 - regression: sa-learn silently returns non-zero on empty Maildir folder
Summary: regression: sa-learn silently returns non-zero on empty Maildir folder
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Learner (show other bugs)
Version: 4.0.0
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-12 00:10 UTC by david
Modified: 2023-07-12 00:10 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description david 2023-07-12 00:10:46 UTC
After upgrading the Debian package for spamassassin from 3.4.6-1 to 4.0.0-6, when I run sa-learn on a Maildir folder with no messages in it, it returns 1 instead of 0. And it doesn't print an error, so it took me a while to figure out what was going on.

dseomn@mail-storage-bbf78862:~$ sudo -u vmail sa-learn --dbpath=/var/cache/mail/mandelberg.org/david/spamassassin/bayes --ham /var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.[redacted]
Learned tokens from 0 message(s) (0 message(s) examined)
dseomn@mail-storage-bbf78862:~$ echo $?
1