In the attachment I send the part where I have to fill in my accounts of my email addresses. Instead of the email addresses I entered Account 1, Account 2, etc. When running the script I get a Sytax error. How can I fix that?
on accountAndServerJunkMailboxNames()
return {{"Account 1", {"Junk"}}, {"Account 2", {"Junk"}}, {"Account 3", {"Junk"}}}
end accountAndServerJunkMailboxNames
But instead of Account 1, etc. you should enter the account descriptions as shown in Mail. And instead of Junk you should enter the name of the advertising folder that you want it to process.
I started by entering 3 email accounts and I succeeded. However, when entering another 3 accounts, I kept getting the error message "Syntax error Expected line break but found “,”. After all, I have 6 accounts.
Kind regards
Hans
Saving and executing the script was successful. Because the line with accounts was broken in your e-mail of 9/30, I did not see the entire pattern and therefore did not enter the parentheses at the accounts correctly.
Although the execution of the script was successful, this morning junk mail ended up in “Unwanted advertising” again. This also happened after I changed the name Unwanted advertising to Ongewenste eclame.
Regards
Hans
After I emptied the Junk folder, messages still appeared in this folder. The only thing that happens when manually executing the script is that I see the result “”. The script does nothing automatically.
I also created another "Apple Mail - server Junk Mailbox 2.scpt and replaced Unwanted advertising with Unwanted advertising. That also doesn’t work.
I recommend that you enable debug logging in the script as described here. Then you can open the Console app, select your Mac under Devices, enter Server Junk Mailbox in the search field, and click Start streaming. Then run the script manually using Script Editor, and you should see some information in Console about what happened.
To make sure that I have performed all actions correctly, I list the steps below:
In Apple Mail - Server Junk Mailbox.scpt I enabled debug logging by changing pEnableDebugLogging from false to true (property pEnableDebugLogging : true)
In Utilities (“hulpprogramma’s”) I Open “Console.app”
I slelect in the Console.app Devices (Apparaten) under Devices MMacbook pro
In the search field I enter “Server Junk Mailbox” and click Start streaming (“Begin met streamen”)
Go to Finder > ibrary (bibliotheek) > com.apple.mail > click on Apple Mail - Server Junk Mailbox.scpt
Thanks. It looks like either the account name or the mailbox name (Unwanted advertising) that you entered in the script does not match the name in Mail, so the script isn’t doing anything because it isn’t finding the right mailbox.
It seems like the mailboxes that you specified still don’t match what’s in Mail. You can run this script to see what the actual mailbox names in Mail are.
As an attachment I am sending you the Spamsive Diagnostic report and a partial printout of List Mailboxes.scpt. It does not contain any Junk advertising or ID, but it does contain Trash. I also notice that in the Spamsieve Diagnostic report 2 Accounts mentions Spam. Is that correct?
I have replaced the names of the accounts with Account 1, Account 2, etc.
Thanks for this information. There seem to be multiple problems:
You have a bunch of account-specific SpamSieve rules in Mail that are disabled, some of which are set to move messages to the inbox. These are unnecessary because you already have a SpamSieve rule at the top that filters every message.
The screenshot from the script says that your accounts have names like Account 1, Account 2, but in the script the account names are entered like e-mail addresses.
The script has some extra { and } for the second and subsequent accounts. (I’ve fixed the example here.)
The mailbox names in the script don’t match the ones in the screenshot.
Did you mean to configure the script to move messages out of Trash?
All of the above is fixable, but you may find it simpler to switch from the Spam mailbox to the Junk mailbox. Then you could have both SpamSieve and the server filters move spam messages to the same place, and you could get rid of the script and all but the single, regular SpamSieve rule. (If you still want SpamSieve to double-check the server filter’s work, there’s a different script for that, which doesn’t require any editing.)