Hello, Software Engineer and Linux Admin here, what you are looking for is a bash shell script which will perfom all these actions using the CLI(Command Line Interface) at background, to be honest never worked with nextcloud but it won't be a problem, I am checking the documentation right now, I have a question, is your email server different than your nextcloud server? Or both services are in the same server? Could you explain me with more details the process you may want to automate? Kind regards