Hi @mrmanor ,
There is no required location to store custom scripts, but for convenience I would always recommend to store them in a directory that is included in your PATH.
Similar things could be said about the user. If you are running them on the same system as your Kopano, then running them as the user Kopano has the benefit that you don’t have to care for credentials to access Kopano (the user is already setup to be recognised as an admin in Kopano). If you want to run it as an additional user you can also add more user IDs to ‘local_admin_users’ in the ‘server.cfg’.
If you are running a multi server system or are running the script externally, the the run_as user does not matter at all, since you the either have it authenticate via SSL client certs, or supply credentials (python-kopano has built-in support to specify login credentials and some scripts make use of this) to the script anyways.