A Process to trash Porn

Spam Sieve is catching porn email and correctly moving the messages to the junk file. What I want is for those messages to be moved to trash. I use keyboard Maestro and installed a macro [SOLVED] Apple Mail – Add Email Address to Rules - Questions & Suggestions - Keyboard Maestro Discourse that places selected porn messages to a rule called Delete. The macro calls an apple script to do the heavy lifting. But this just adds the senders from to the delete rule.
I am asking that spam sieve include a new feature, somehow that when the user selects one or more messages to be moved to trash and to remember the from for the next time.
Thanks - Jonathan

And for the record, this is the keyboard maestro macro.
I modified the macro to also apply rules after I identify which messages should be added to the delete rule.

When you train a message as spam (or use the Block Sender script) it adds the sender to SpamSieve’s blocklist. You can use the Move it to the Trash if the spam score is at least setting to make SpamSieve move blocklisted messages directly to the Trash.

I understand that but it is not precise. My method with the apple script and keyboard maestro is precise in that it identifies specific forms. Of course I am using spam sieve and enjoy it to no end, but I needed a way to identify specific forms - and the script I modified for keyboard maestro works. I’m only asking you to consider how you might enhance spam sieve with a feature that works similarly. I execute the keyboard maestro script whenever I see porn that was captured by spam sieve and I assume hopefully over time, most if not all the senders will be identified in my delete rule.

Actually, I need to study the block sender script to see if I can modify it to more precisely behave like my keyboard maestro one. Not based on score though, based on message selection.

“Froms”? I think that’s what SpamSieve is doing. What differences are you seeing between the blocklist rules that it creates and your Apple Mail rule?

By the way, it’s fine to keep using the Apple Mail rule so long as it’s above the SpamSieve rule (if any) in Mail.

I have not yet tried the block sender script so I can’t answer your question yet. My delete rule is after the remote and spam sieve rule and it seems to work, because the keyboard maestro macro is running on manually selected messages from the junk folder, that spam sieve populated. This work flow gives me some control on what I deem as porn and frankly any other message from a sender (From) that I want in the future to always go to trash. Maybe I need to learn more about your blacklist rules.
Thx-
Jonathan

If I understand your plan, the Delete rule will be automatically applied to future messages. If you put that after the SpamSieve rule it will (a) not move messages that SpamSieve caught as spam, and (b) hide any SpamSieve mistakes from you, which will mess up the training. So I think it should instead be above the SpamSieve rule.

Michael,
Thank you for responding.

  1. I will move the deleted macro in front of the SpamSIeve rules
  2. I would prefer to use your script, which I downloaded and created an app and moved to the applications folder.
  3. When I run the app, I have to trust it is updating the blocklist and that future mails from that sender (From) will be automatically sent to the trash folder. Of course the selected messages stay in the junk folder even after running the script. My script running under Keyboard Maestro moves selected messages to the trash folder after updated the apple delete rule.

Even though I have been involved with computers and R&D software development for 54 years, I’m not an apple script expert. So I don’t have the IQ to update your script to add the moves to trash :slight_smile: 54 is not a typo. I learned Fortran on IBM mainframes in 1970. I have over 20 software related patents, but at my advanced age, I do not wish to become an apple script maven.

Thanks - Jonathan

Oh, and I have verified that selected messages, after running your script (app) does appear in the blocklist. So yeah, your solution is good, except for the initial trashing of selected messages.

While I can navigate your instructions, etc. I wonder how many novices will be able to do this easily. One of my 7 email addresses was compromised and I get over 100 porns a day. I’m not a prude, but 100 porn mails is 99 too many :slight_smile:

Or, instead of using the SpamSieve script as an app, you could use Keyboard Maestro to run the script and then move the messages to the trash. (Mail has a menu command for deleting messages.)

They don’t need to because the regular, built-in Train as Spam command also creates the blocklist rules. Block Sender is just slightly better for this particular use case because it doesn’t fill up the corpus unnecessarily.

Michael,
Pls confirm that Train as Spam moves selected emails to Trash. I don’t think it does, I think it just populates the block list for next time, since said messages (e.g. porn) stay in the junk folder. I’m also not sure if you are familiar with keyboard maestro. I enhanced my keyboard maestro script to first call your Block Sender script (which I converted to an app), and then run my original script to add selected email senders to the delete rule and then running the rule. I realize this is overkill.
For completeness, this is how it works. After selecting messages from the junk folder, I hit the F18 key (see green arrow) and the magic happens. The orange arrow points to your script and the red arrow points to where I apply rules after starting the mail app.

It depends on your settings:

You can paste the script directly into Keyboard Maestro, which will have less overhead than an app.

Michael,
I am still fighting porn spam that I don’t want to even see in my junk folder. I have disabled apple rules that I wrote and just use blocklist now. When I see the porn in my junk folder, I then train as spam and filter messages. At that point the messages do move to the trash folder. I assume this is the proper behavior ? But I think that subsequent porn from the same from name or from address comes in and just goes to the junk folder. I guess I want to train porn based on address or name to go to trash folder in the future. Is this possible ? Also, when I look at the blocklist, I notice some entries are based on From (address) or From (name) but not both. What is your algorithm for determining if a trained message is recorded in the blocklist based on name or address? Shouldn’t each trained message include a rule for matching the From name and another for the From address ???
Thanks - Jonathan

Michael,
I did another experiment. I enabled manual trained spam to go to trash. Two messages came in that I trained as spam. They went to trash, which is good. However, when I look at the block list only one had entries for both name and address ( Trophy Cara) and the other just name (EasyHouseWives). This will make sense if you look at the attached jpg.


So why didn’t both messages store both name and address in block list ?
Thanks - Jonathan

If SpamSieve already correctly classified the message as spam and moved it to Junk, it’s better to use the Block Sender script than to train it as spam, although that’s OK, too.

Is it going to the Junk mailbox because of SpamSieve or another rule/filter? You can tell based on the color and whether the Log window says that SpamSieve predicted the message to be spam.

Yes, that’s what the blocklist and the Move it to the Trash if the spam score is at least setting do. However, this only applies to message that SpamSieve processed. If you had a server filter move the messages to Junk so that they were never in the inbox on your Mac, SpamSieve would not be involved at all, so the SpamSieve settings would be irrelevant. If you want SpamSieve to reprocess messages that are in Junk, you could set up the rescue script and configure it (at the top of the script) to move the blue messages to Trash.

This happens automatically when you train as spam or use Block Sender.

It adds separate rules for both.

Did you search the blocklist? What does the log entry for the EasyHouseWives training say?

OK Michael,
I believe I see what is happening now. Look at the attached snippet to answer your questions. I think the blocklist is populated with both, I just didn’t realize there was an earlier date entry.

Regarding the Block Sender script, which I downloaded and put in the library → scripts → Applications → Mail folder. Please remind me how to activate it each time I want to run it.

I will hold off running it if I’m unhappy with the way things are.
Thanks - Jonathan

I’m sorry, I wasn’t that clear about running the block sender.scpt. I want to be able to select one or more messages and right click to have the block sender as an option. I guess I can convert the block sender.scrpt (as I did in the past) to an application, but I forgot how to add an application to right click. I will play around.

You can run it from the system script menu.