Messages Not Removed from TrainGood

The Spam Filtering Drone is not removing the TrainGood label from messages. The downloaded script file seems to have an error in it. So when a message is put into TrainGood after it processes the message now appears in both INBOX and TrainGood. Then everytime it is run it reprocesses the same message. Looking at the script file I noticed the following line:
my moveMessage(_message, my inboxForAccount(_account), false )
I edited that line and changed the “false” to “true” and now the messages are removed from the TrainGood folder as they should be.

Is this with a Gmail account? The script was written that way in order to work around a problem other customers had reported where Mail was not properly moving messages to the inbox. However, if it works better for you with that change, feel free to keep using the script like that.

Yes this is with Gmail. I will have to try my bellsouth and icloud accounts and see what they do.

Ok yes this is causing an issue with my Yahoo mail account. iCloud account works fine.

What happens with the Yahoo account?

Now it is really not functioning correctly. I erased the edited file and redownload a fresh copy and put it in the scirpts folder. I set the flag for logging and the movemessage flag to true. saved the file. But now when I put anything in the traingood folder and run the script it moves the message to Junk. This is happpening on all the accounts but the Mail app no longer freezes.
tell current application

do shell script “/usr/bin/logger -s ‘SpamSieve [Apple Mail Remote Training MJTLog] Moving message to Junk: [C-Command] [SpamSieve] Messages Not Removed from TrainGood’”

→ “”

end tell

tell application “Mail”

move message id 1161014 of mailbox “[Gmail]/All Mail” of account id “CA8C41D2-74E1-4CB2-95C3-D002F332A204” to junk mailbox

The modification that you made was to tell the script that the messages being moved were always spam. If you want to modify the script to tell Mail a different way of moving the messages, I would instead change the line:

move _message to inbox

to:

set _message's mailbox to _mailbox

I don’t understand your point about Mail no longer freezing, since you didn’t mention that before…

Not sure what was happening but the mail app was freezing. It is not anymore. Also, to make Gmail work like the rest with the default script no changes. I went into the Gmail settings itself and turned off “Show in IMAP” Important, Chats, and All Mail. Doing that fixed the issue with Apple Scripts and Gmail IMAP not playing nicely.

1 Like