I need a very simple daemon script that receives all emails to a domain name and just forwards them to a script. I know there's software like exim, qmail or others to do this, but I do not want to install big software that eats performance in the host.
I have the MX record of the domain pointing to the host; now I need some daemon listening on port 25 and answering correctly to the mail standard communications (HELO and that stuff), and then handing the mail to a script.
How can I do that?
Edit: the domain.com will JUST be incoming, I don't need that domain to have POP accounts, or send emails; the domain will just receive emails addressed to
*@domain.com, and I would like all of them to be redirected to a script.
I would like it in C or Perl if possible