Apple Mail - Server Junk Mailbox question

To consolidate spam in specific spam mailboxes for several accounts is it:

on mainSpamMailboxInfo()
return {“iCloud”, “Spam”} , {“work”, “Spam”}
end mainSpamMailboxInfo

or

on mainSpamMailboxInfo()
return {{“iCloud”, {“Spam”}}, {“work”, {“Spam”}}}
end mainSpamMailboxInfo

Also does this Server Junk Mailbox or the Remote Training rule come first?

Thanks

Neither. The Apple Mail - Server Junk Mailbox script currently puts the spam in a single mailbox On My Mac or on a specific account. I plan to enhance it to look for a spam mailbox on the same account as the server junk mailbox.

It doesn’t matter.

I deleted this so please see below.

Ok so please correct me if I’m wrong.

Following on from

http://c-command.com/forums/showthread.php/4033-Training-your-drone-remotely

and

http://c-command.com/forums/showthread.php/4032-Apple-Mail-Server-Junk-Mailbox-question

  1. Really I want IMAP accounts to be like this

iCloud account
Spam (I make this for the Sieve rule and this goes to the favourites bar)
TrainSpam (I make this folder for remote training)
TrainGood (I make this folder for remote training)
Junk (this is already there)

Server Account 1
Spam (I make this for the Sieve rule)

Server Account 2 etc…
Spam (I make this for the Sieve rule)

Work Exchange Account
Spam (I make this for the Sieve rule)
Junk E-Mail (this is already there)

  1. and on my server I switch off the spam programs, which in my case are:
    Dynamic Spam Rejection with RBLs 1.1
    SpamAssassin 3.2.4

  2. I use the following for the drone script

on accountNamesForDrone()
	-- Enter your account names here. If you have more than one, separate with commas: {"iCloud", "Work Exchange Account", "Server Account 1", "Server Account 2"}
	-- The account name comes from the "Description" field in the Accounts tab of Mail's preferences.
	return {"iCloud", "Work Exchange Account", "Server Account 1", "Server Account 2"}
end accountNamesForDrone
  1. and I use the following so everything from the junk folders heads to the iCloud spam box
on accountAndServerJunkMailboxNames()
	return {{"iCloud", {"Junk"}}, {"Work Exchange Account", {"Junk E-Mail"}}}
end accountAndServerJunkMailboxNames

on mainSpamMailboxInfo()
	return {{"iCloud", "Spam"}
end mainSpamMailboxInfo

Is that all correct?

It looks good to me. Is it working for you?

So far so good!

I’m waiting to see if turning off my server spam makes a difference to where the spams are sent.

Also how would you write an auto delete script or rule?

E.g. any message in my iCloud Spam box over 2 days old gets deleted.

That way I can do a quick check and see if anything needs saving and then after a while it gets deleted?

If I go on holiday I could change the time to say two weeks or something like that.

Is that possible?

The problem with doing this in Apple Mail is that it doesn’t have a good way of running scripts on a schedule. You can run a script on every new message received, but that would probably be too slow for a script that checks every message in the Spam mailbox. I would suggest creating a smart mailbox to show the old spam. Then you can periodically select all the messages there and press Delete.