If Maildir/cur contains an untrained message,
mboxtrain.py dies with
Traceback (most recent call last):
File "./mboxtrain.py", line 294, in ?
main()
File "./mboxtrain.py", line 281, in main
train(h, g, False, force, trainnew)
File "./mboxtrain.py", line 216, in train
maildir_train(h, os.path.join(path, "cur"),
is_spam, force)
File "./mboxtrain.py", line 113, in maildir_train
f = file(tfn, "wb")
IOError: [Errno 2] No such file or directory:
'.../Maildir/cur/tmp/1057721381.20217_25.domain.com
What's with /cur/tmp/ ?
Logged In: YES
user_id=552329
/cur/tmp/ is where a temporary copy of the message is stored
until it is renamed to the /cur/ name.
If you create the /cur/tmp/ directory, this should work. I
suppose mboxtrain should check that this directory exists,
and create it if it doesn't (like pop3proxy does for it's
directories).
Logged In: YES
user_id=790676
The temporary directory is Maildir/tmp, not Maildir/cur/tmp.
The observed behavior is a regression wrt v1.0a2;
creating a new directory is a hacky workaround.
Logged In: YES
user_id=552329
Ah, I see. This was introduced in v1.6.
Fixed in v1.10. You should be able to get this version of
mboxtrain and drop it into the a4 release. (note that sf
pserver cvs is crappy at the moment, so it might take a while
for v1.10 to be visible).
Logged In: YES
user_id=790676
And, worse yet, this "workaround" does not work for obvious
reasons:
Traceback (most recent call last):
File "./mboxtrain.py", line 294, in ? main()
File "./mboxtrain.py", line 281, in main train(h, g, False,
force, trainnew)
File "./mboxtrain.py", line 216, in train maildir_train(h,
os.path.join(path, "cur"), is_spam, force)
File "./mboxtrain.py", line 118, in maildir_train
os.rename(tfn, cfn)
OSError: [Errno} 21] Is a directory
Logged In: YES
user_id=552329
Sorry, I missed that maildir_train would then try to pick it up
as a file. In any case, the v1.10 fix should still work.