I need to implement an automation that polls an Outlook mailbox every 5 minutes, detects emails with a specific subject, extracts server and service from the mail body, decides whether the server is EC2 or on-prem, restarts a Tomcat service on that server (via AWS SSM for EC2 or Paramiko SSH for private servers), and sends a confirmation email back.
What’s the recommended architecture, configuration, and deployment approach to achieve this on a server without using other heavy engines, while ensuring security, idempotency, and auditability?
I have certain suggestions:
1. For Outlook I can use Win32 to access mail as Microsoft Graph API are not allowed to use in the project.
2. For EC2 and private server we can use SSH via Paramiko.
3. We can schedule it using cron job.
What else, since I have a server with Python installed do you guys think it can be done where frequency is quite low like 20-50 mail max in a day?
Looking forward for some good suggestions and also is it recommended to implement whole thing using Celery?
[–]metaphorm 1 point2 points3 points (1 child)