Using "Train as Spam" does not move messages to Spam folder

Spam does not move to Spam folder
Longtime SpamSieve user with Apple Mail POP. I recently switched my Apple Mail app to IMAP because I bought an iPhone. At the same time I updated to SpamSieve 2.6.4. Now spam is identified (changes color) in my inbox but does not move to the spam folder. I tried to download the script you provided but it downloads as attachment.php which will not open in Script Editor. Any advice, please?

Are you referring to incoming spam messages or spam messages that you used “SpamSieve - Train as Spam” on? Have you changed the location of your Spam mailbox?

I am referring to incoming spam messages. I did not manually change the location of my spam mailbox, unless the app did it when I changed from POP to IMAP. Also, I have noticed that if my computer is on, spam is correctly moved to my spam folder, but any messages received by the mail server while my computer is off remains in my inbox after it is retrieved by Mail, even thought it is detected as spam (changes color). I am running a Powerbook G4 running OSX 10.4.10.

OK. This thread is about using the “Train as Spam” command. Next time please start a new thread if you are changing the topic. In any case, the script that you couldn’t get to work is irrelevant to your problem, because it has to do with the training command.

No, SpamSieve does not do that.

Does SpamSieve’s log show that they were predicted as spam? Do you have any rules in Mail besides the SpamSieve one?

OK. Keeping on topic, when Spam Sieve does not move my spam to the spam folder automatically and I try to move it via Train as Spam, nothing happens.

If you open the Console application, are there any error messages from Mail or SpamSieve in the console.log window?

Please be precise about what you mean by “nothing happens.” If you open SpamSieve’s log, does it say that the messages were “Trained: Spam (Manual)”?

I’ll probably need you to try the test script again. What happens if you rename the downloaded file to “Script.zip” and then try to open it?

“Train as spam” acting strange
OS 10.4.11, mac mail 2.1.3, SS 2.6.6

I’ve read this thread with interest because I’m having similar problems.

Initially, I could not get SS to train as spam mail coming from a particular user. No problem training other e-mail messages. I reinstalled the apple mail script twice while mail was running and once when it wasn’t to try and get it to work. I also installed the first mail script that is provided in this post. After using it, the first of two e-mails was recognized as spam. The second was recognized as suspect. I reran the “train as spam” command and the second e-mail would not change to gray - ie. it wasn’t trained. In the console app I get this message : Feb 21 10:18:50 Dougs-iMac crashdump[842]: crash report written to: Users/douglaslivie/Library/Logs/CrashReporter/scriptrunner.crash.log

When I run the script on this e-mail (that I already ran on the first one) I get the same error code mentioned before in this thread. “NSInternalScriptError”

I’m not really a techie and maybe I’m missing something obvious. On the other hand, maybe there something else going on.

Thanks for any help you can give.

Hi Douglas,

What does that mean, exactly? That is, what did you do, and what happened that was different from what you expected to happen?

It doesn’t matter whether Mail’s running when you install the plug-in, but you need to quit and re-launch it before using the newly installed plug-in.

What do you mean by “installed”? The post doesn’t say to install it anywhere, but rather to run it from within Script Editor.

Recognized how? Did you use the Message > Apply Rules command? What do you mean by “suspect”?

Please e-mail me the crash log file, as well as the message in question (saved using File > Save As > Raw Message Source).

Please run it from within Script Editor and tell me which line Script Editor reports as the source of the error.

Hi Michael,

Thanks for your questions. I had anticipated that when I highlight the message in question and ask that SS treat the message as spam, that it would 1. be color coded as spam (gray) and 2. be transfered to the spam folder. Before I ran the script in script editor, in using just SS, it neither changed color nor did it get transfered to the spam folder.

As for the script, I should have said that I downloaded and ran the script.

Regarding your question about how I think the SS recognized the spam, I figure that since the e-mail message was highlighted gray and moved to the spam folder, after running the script and the apply rules command, that it was recognized as a true spam. As for the second message from the same sender, when it was highlighted, it was highlighted blue and not gray. In this way, I presumed that it was judged to probably be spam but with a certain margin of error. Perhaps I just don’t quite understand the color coding.

I’ll send you the crash log file, as requested.

When I run the script editor, it doesn’t give a line in which the error occurs.

Yes, that’s what normally happens.

Did Script Editor report an error? What does “in just using SS” mean?

The color coding is described here. Please note that blue is actually more spammy than gray. All messages that are colored are ones that SpamSieve thought were spam. The color is just for you own information. In this case it confirms that the training of the first message didn’t go through. If SpamSieve had been told that message as spam, then it would have colored it blue.

It doesn’t tell you the line number, but it should select the portion of the script that generated the error, and then you could tell me the contents of that line.

You can find the “scriptrunner.crash.log” file in the Logs folder inside your Library folder. Based on the 11.5 MB raw message source that you sent me, it appears that you’re running into an OS bug involving AppleScript and large blocks of data.

Lowercase “spam” mailbox name keeps train-as-spam script from working
I fixed the problem of the Train as Spam command not moving messages to the Spam folder in Apple mail (on OS X 10.5.3) in this case: It turns out my “Spam” mailbox got renamed to “spam” somehow. Renaming the folder to “Spam” fixed the problem.

I think the SpamSieve Rule in Apple Mail prefs was pointing to the “spam” mailbox before. After renaming the folder, the Rule is pointing to “Spam” mailbox.

FYI, running the test script from this thread lead me to notice the problem. Here is a portion of the Event Log in Script Editor.

exists mailbox “Spam”
false
make new mailbox with properties {name:“Spam”}
“Mail got an error: AppleEvent handler failed.”

Yes, in Leopard Mail is case-sensitive. You either need to name the mailbox what SpamSieve is expecting (“Spam”) or tell it that you want to use a different name.

Training doesn’t move to IMAP mailbox
I’ve set up my iMac as a drone in the standard fashion with my Spam mailbox on an IMAP account. Everything seems to work as advertised except that when I use the “Train as Spam” command, SpamSieve creates a new Spam mailbox on my Mac and puts the message there instead of in the IMAP Spam mailbox. I checked the Rules and went through the “Change Settings” command to be sure everything was correct.

Using Apple Mail 3.4 with SpamSieve 2.7.1 on OSX 10.5.4.

Why are you using the “Train as Spam” command with the drone? Is that just for the initial training?

The rules do not affect the “Train as Spam” command. If everything were correct, it would probably be working, so saying that doesn’t really tell me anything. Instead, please tell me (or show me, using screenshots) how you have it set up. Please send me your SpamSieve preferences file and screenshots of Mail’s main window and the Accounts section of its Preferences window.

Yes. I wasn’t sure that that’s what you were doing.

Thanks. When you tell SpamSieve to use a remote spam mailbox, it looks for it in the first IMAP account. So please try dragging your HI.net account to the top of the list.

That fixed it
Good tip. Works as advertised now.

Thanks for the help - another opportunity to enhance the installation instructions?

I don’t think so, because the standard configuration is to use a local Spam mailbox, in which case the order doesn’t matter.

Cannot move messages to Spam any longer / no crash log present
Hello: my ‘mark as spam’ also stopped working recently.

I downloaded and unzipped the script from page one of this thread but I get an error that Script Editor cannot open the script. I don’t have scriptrunnercrash.log but in the cosole log there is a message:

... scriptrunner[23860] Error running script: /Users/[user1]/Library/Mail/Bundles/SpamSieve.mailbundle/Contents/Resources/TigerTrainSpam.scpt (null)

I’m totally without a clue of what to do next if anyone can assist/recommend?

thanks!

PS: the spamsieve log shows it’s still automatically moving some stuff to the Spam folder as of just today; it’s me doing it manually that’s not working.

Note: i replaced scripteditor with a previous backed up version but it’s still not moving the messages; and now I’m getting a new error in the console log
SpamSieve Mail Plug-In: Couldn’t load script: file://localhost/Users/[user1]/Library/Mail/Bundles/SpamSieve.mailbundle/Contents/Resources/TigerChangeSettings.scpt {NSAppleScriptErrorNumber = -1750; } fyi/fwiw

should i have restarted the computer completely?

Script Editor doesn’t report any more information than that? Please make sure that you’re using the test script from this post.

Unfortunately, this means that there was an error running the script, but the OS did not report to SpamSieve’s plug-in what went wrong.

Error -1750 is a generic scripting error. It sounds like there’s a problem with AppleScript on your system, probably below the Script Editor level. Would it be possible for you to revert your whole Mac system to a backup?

That’s not supposed to be necessary, but it often helps.