This question more is for learning purpose.
I'm exploring ways to develop a small email server (in + out).
I have a domain that points to my server as well as mx records and all that stuff...
I also have the open ports 25, 26, 110, 993, 995, 143, 465....
I'd like to activate a shell script on incoming email.
I have apache + php running without problem. I type my domain on a browser => I see my pages from anywhere. (that part is done).
I don't exactly know where to start...
There is tons of stuff when I search
I tried dovecot
, mailhog
, exim
but I'm having difficulty to get them up and running.
My question is more : "is there a way to listen to port x for emails => when a email arrives => execute a script (in the rawest form possible)" ?