Block list, remote training

You can change the pMoveBlueMessagesToTrash setting at the top of the script from false to true if you want it to move blocklisted spam messages from Junk to Trash, i.e. to match the Move it to the Trash if the spam score is at least setting.

That’s what I was talking about when I mentioned the script in which you need to change one of the properties. Note it won’t work the way you want unless you do this.

Thanks Michael. I’ll try your version and make that change and see how it works compared to mine. Mine seems to be working correctly except for the occasional timeout. I think im also getting the occasional messsge which should go to Trash or Junk in my inbox. I’m assuming that is because my script is running and sending SpamSieve commands and perhaps it misses incoming mail. Just a guess though. I have one now that I need to check.

Maybe running the script as a Rule would be better than every 5 minutes.

Rand

Here is the example Michael. Must be some sort of timing issue, I assume. The email in the background is in my iCloud Inbox but the email address is in my blocklist, active, and created last month.

PastedGraphic-1.png

Assumes this happens when my script is running, but don’t know.

Thanks,

Rand

The script shouldn’t affect the processing of incoming mail. Anyway, there’s no need to assume. You can just look in SpamSieve’s Log window to see what happened with that message.

I’ll look for it in the log and let you know what I find. I think there are also three others that arrived at noon in my Inbox that I think are in the blocklist, but I’ll have to go downstairs to my server and check.

Thanks

Rand

Well I tried loading the logs and get this error,

Do I hve to remove and reinstall SpamSieve or is there a way to fix this to be able to find log entry.

Rand

I used sqlite3 to search the log file from the 10th and that address doesn’t appear. So I don’t know why it was in my inbox but not processed by SpamSieve.

I don’t think I stopped SpamSieve yesterday but if I did, then it would appear in Inbox without being in SpamSieve’s log. So don’t worry about it. I’m using your script now. I’m going to set my script to only train. I will also run them as rules. That should hopefully fix the timeout and other issues I was occasionally seeing.

Thanks

Rand

Michael,

The three new messages were not in blocklist, so they were ok. The NSSQLiteErrorDomain error 11, I’m still a bit confused about. The SpamSieve Log shows the following ,

CoreData: error: -executeRequest: encountered exception = Fatal error. The database at /Volumes/Home/itunes/Librar
y/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3 is corrupted. SQLite error code:11, 'database disk image is malformed' with userInfo = {
NSFilePath = "/Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3";
NSSQLiteErrorDomain = 11;
NSStackTraceKey = "0x7ff8144eec00 0x7ff81b73f0bc 0x7ff81b73e67f 0x7ff81b766468 0x7ff81b765a9b 0x7ff81b765922 0x7ff81b753277 0x7ff81b752ef8 0x7ff81b73993c 0x7ff8147097e2 0x7ff8147168f2 0x7ff81b739847 0x7ff81b752c03 0x7ff81b752ac8 0x7ff81b7523f4 0x7ff81b74e108 0x7ff81b8b649d 0x7ff81b74d752 0x7ff81b74cdf7 0x7ff81b856a63 0x7ff81b854476 0x7ff81b765534 0x7ff81b84a03c 0x10604f871 0x10604f7d8 0x1056a6a2b 0x1056a7c91 0x10601719b 0x1060175a9 0x106016383 0x10601866a 0x10601e219 0x7ff81b7483b0 0x7ff8147097e2 0x7ff81470f95b 0x7ff8147103e2 0x7ff81471a0db 0x7ff8147199dc 0x7ff8148adc7f 0x7ff8148acbdb";
}
CoreData: error: (11) Fatal error. The database at /Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3 is corrupted. SQLite error code:11, 'database disk image is malformed'
CoreData: error: SQLCore dispatchRequest: exception handling request: <NSSQLCountRequestContext: 0x600001279880> , Fatal error. The database at /Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3 is corrupted. SQLite error code:11, 'database disk image is malformed' with userInfo of {
NSFilePath = "/Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3";
NSSQLiteErrorDomain = 11;
NSStackTraceKey = "0x7ff8144eec00 0x7ff81b73f0bc 0x7ff81b73e67f 0x7ff81b766468 0x7ff81b765a9b 0x7ff81b765922 0x7ff81b753277 0x7ff81b752ef8 0x7ff81b73993c 0x7ff8147097e2 0x7ff8147168f2 0x7ff81b739847 0x7ff81b752c03 0x7ff81b752ac8 0x7ff81b7523f4 0x7ff81b74e108 0x7ff81b8b649d 0x7ff81b74d752 0x7ff81b74cdf7 0x7ff81b856a63 0x7ff81b854476 0x7ff81b765534 0x7ff81b84a03c 0x10604f871 0x10604f7d8 0x1056a6a2b 0x1056a7c91 0x10601719b 0x1060175a9 0x106016383 0x10601866a 0x10601e219 0x7ff81b7483b0 0x7ff8147097e2 0x7ff81470f95b 0x7ff8147103e2 0x7ff81471a0db 0x7ff8147199dc 0x7ff8148adc7f 0x7ff8148acbdb";
}

So it appears that Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log/V2/Log 2024-01.sqlite3 is corrupt. But I can open it with sqllite3, no errors,

itunes@server v2 % pwd

/Volumes/Home/itunes/Library/Application Support/SpamSieve/log.spamsieve-logd/Log 2024-01.spamsieve-log/v2

itunes@server v2 % ls

Log Log 2024-01.sqlite3-shm

Log 2024-01.sqlite3 Log 2024-01.sqlite3-wal

itunes@server v2 % sqlite3 "Log 2024-01.sqlite3"

SQLite version 3.43.2 2023-10-10 13:08:14

Enter ".help" for usage hints.

> .tables

ZBAYESIANROUND ZENVIRONMENT ZMESSAGEORIGIN ZWORDUSAGE

ZBLOB ZLOGENTRY ZMJTCLOUDTOKENS Z_METADATA

ZCATEGORY ZLOGMESSAGE ZNAMEDBLOB Z_MODELCACHE

ZCORPUSCHANGE ZLOGRULE ZRULECHANGE Z_PRIMARYKEY

> .quit

Do you want more information or should I just remove this log directory to fix the issue is the NSSQLliteErrorDomain error 11?

Thanks

Rand

SQLite error 11 means the database file is corrupt. However, sqlite3 might not report that error if you are only accessing parts of the database that are not damaged.

You can quit SpamSieve and remove the folder:

/Volumes/Home/itunes/Library/Application Support/SpamSieve/Log.spamsieve-logd/Log 2024-01.spamsieve-log

to prevent that error. The more recent log entries are in a different database and so should not be affected.

Will do. Thanks