Is it possible to trigger a shell script on incoming emails, can it be done without services like dovecot, postix, etc? [closed]
Solution 1:
You can start by reading RFC 5321 and RFC 5322 that define SMTP protocol and email message format. Once you finished with these two, you can continue reading all other email-related RFCs.
When you familiarize yourself with the depth of the rabbit hole you are going to jump into, you can try Python simple SMTPD (deprecated) or aiosmtpd. You'll also need email.parser to parse incoming emails and extracting files.
And the answers to the question "Is it possible to trigger a shell script on incoming emails, can it be done without services like dovecot, postix, etc?" are here and here (actually, I have misread the question as written "with postfix" instead of "without" but I'll leave the links anyway)