Bug 8145 - sa-learn error with backslash in Maildir path
Summary: sa-learn error with backslash in Maildir path
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-11 23:56 UTC by david
Modified: 2023-07-12 00:17 UTC (History)
1 user (show)



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-11 23:56:26 UTC
I use https://doc.dovecot.org/configuration_manual/plugins/listescape_plugin/ to enable some special characters in mailbox names, and it converts `.` to `\2e`. After upgrading the Debian package for spamassassin from 3.4.6-1 to 4.0.0-6, I get the below error running sa-learn on Maildir folders with backslashes in them. Adding an additional backslash seems to help though:

dseomn@mail-storage-bbf78862:~$ sudo -u vmail ls -ld '/var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.Archive.Lists.ietf\2eorg.93all'
drwx------ 5 vmail vmail 4096 Nov  1  2022 '/var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.Archive.Lists.ietf\2eorg.93all'
dseomn@mail-storage-bbf78862:~$ sudo -u vmail sa-learn --dbpath=/var/cache/mail/mandelberg.org/david/spamassassin/bayes --forget '/var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.Archive.Lists.ietf\2eorg.93all'
archive-iterator: no access to /var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.Archive.Lists.ietf2eorg.93all: No such file or directory
Forgot tokens from 0 message(s) (0 message(s) examined)
dseomn@mail-storage-bbf78862:~$ echo $?
1
dseomn@mail-storage-bbf78862:~$ sudo -u vmail sa-learn --dbpath=/var/cache/mail/mandelberg.org/david/spamassassin/bayes --forget '/var/local/mail/persistent/mail/mandelberg.org/david/Maildir/.Archive.Lists.ietf\\2eorg.93all'
Forgot tokens from 0 message(s) (23 message(s) examined)
dseomn@mail-storage-bbf78862:~$ echo $?
0
Comment 1 david 2023-07-12 00:17:42 UTC
(In reply to david from comment #0)
> After upgrading the Debian package for spamassassin from 3.4.6-1 to
> 4.0.0-6

Oops, I'm actually not sure this is related to the upgrade at all. I came across this bug while trying to figure out what was causing another bug. But I just realized that while debugging that one, I was running sa-learn in a different way than I usually do. (I usually change into the Maildir folder and run sa-learn with a path of `.`.) So I don't have any idea if this is a regression or not.