Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon AntiSpam > Archive > LEARN.BAT doesn't work when the mail is not on the same drive as MD.

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon AntiSpam  / Archive  /

LEARN.BAT doesn't work when the mail is not on the same drive as MD.

[Cramp, Edmund]
Edmund Cramp
Novice
Novice
Posts: 235

MDaemon
Outlook Connector
WebAdmin
Edmund Cramp - 08:41am, Aug 9 2019

I ran the default LEARN.BAT last night, here's the log:

Fri 2019-08-09 01:00:37.981: Performing Bayesian learning
Fri 2019-08-09 01:00:37.982: * Learning from Spam folder: D:/MDaemon/Public Folders/Bayesian Learning.IMAP/Spam.IMAP
Fri 2019-08-09 01:00:37.982: * Learned tokens from 0 message(s) (0 message(s) examined)
Fri 2019-08-09 01:00:37.982: * Learning from Ham folder: D:/MDaemon/Public Folders/Bayesian Learning.IMAP/Non-Spam.IMAP
Fri 2019-08-09 01:00:37.982: * Learned tokens from 0 message(s) (0 message(s) examined)
Fri 2019-08-09 01:00:37.982: * End Bayesian learning results

I've reported this error in the past but it's still not fixed. The problem is that the default LEARN.BAT contains commands like this:

CD "D:/MDaemon/Public Folders/Bayesian Learning.IMAP/Spam.IMAP"

But when that command is run from the default MD directory on the C: drive it doesn't work. It's a well known issues, on most versions of Windows you can't use the CD command to change drives, so all LEARN.BAT does is delete all of the files instead of submitting them to SpamAssassin.

So I'm going back to running my own MYLEARN.BAT file:

Fri 2019-08-09 08:40:19.328: * Performing updated Bayesian learning
Fri 2019-08-09 08:40:19.329: * Learning from Spam folder: D:/MDaemon/Public Folders/Bayesian Learning.IMAP/Spam.IMAP
Fri 2019-08-09 08:40:19.329: * Learned tokens from 151 message(s) (151 message(s) examined)
Fri 2019-08-09 08:40:19.329: * Learning from Ham folder: D:/MDaemon/Public Folders/Bayesian Learning.IMAP/Non-Spam.IMAP
Fri 2019-08-09 08:40:19.329: * Learned tokens from 16 message(s) (16 message(s) examined)
Fri 2019-08-09 08:40:19.330: * End updated Bayesian learning results

Problem solved.

  (older msg: 2)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Edmund Cramp - Aug 16, 2019 9:50 am (#3 Total: 4)  

 

Photo of Author
Edmund Cramp
Novice
Novice
Posts: 235

MDaemon
Outlook Connector
WebAdmin
Replying to: Edmund Cramp (Aug 14, 2019 6:38 am)
I'm attaching mylearn.bat so that you can see how I'm handling it.

Please note that if you download the mylearn.bat file, you will need to edit it to make it work for a specific setup:

You will need to create the C:/MDaemon/Temp directory - the spam is copied here from the default bayes directory.
You will need to specify the location for your default bayes directory - mine is on the D: drive.
After the bayes samples have been processed, I copy them to an archive directory (which is automatically pruned by MD to hold the last 60 days of messages) so that if I have any SA problems, I can quickly rebuild the bayes database - this is just insurance, it's not necessary.

I could re-write this to be easier to setup if anyone needs it.

[Last Editor: Edmund Cramp, Aug 16, 2019 9:56 am. Total Edits: 1]

Edmund Cramp - Aug 21, 2019 7:52 am (#4 Total: 4)  

 

Photo of Author
Edmund Cramp
Novice
Novice
Posts: 235

MDaemon
Outlook Connector
WebAdmin
Replying to: Arron.Caruth@mdaemon.com (Aug 12, 2019 8:11 am)
Thanks for your feedback.  This is still on our list to look into. --Arron CaruthDirector of Product Developmento: 817-601-3222    e: arron.caruth@mdaemon.comMDaemon...

Just a little feedback on this - I discovered this issue last year after thinking the SpamAssassin was completely useless for many years, as it turns out this was because it was never getting to scan my spam emails, the learn file was just deleting them.
Having fixed this problem SpamAssassin is functioning wonderfully, our daily spam level has dropped by at least 90%. One thing I added to the mylearn is an extra line to record the current SpamAssassin database processing details to the log - this means that I can now verify that everything is works by simply looking at the logs.

I'm very happy with MD and SA now.



  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.