Multiple Email Accounts with Apple Mail Setup

The script should only list the accounts whose Train mailboxes you want it to check. If you add other accounts it will probably create Train mailboxes in those accounts.

Right.

You could, but you don’t have to. You could have a single Spam mailbox and multiple TrainGood mailboxes, and if you move the message to the right TrainGood mailbox it will end up in the corresponding inbox after training.