Question: I need to forward \*@domain.com to a script.

I know the [EXIM way](https://serverfault.com/questions/229964/forward-all-mail-on-a-specified-domain-to-script) and the [PROCMAIL way](https://stackoverflow.com/q/557906/313192).

Is there a lighter way? Any experiences? Which one is the fastest if I JUST WANT it to delivery emails to script? (no pop accounts, nothing else)

(I knew qmail but I don't want to install "big" software that eats too many resources on the server).

Answer: 
What you are asking is really about MTAs (Mail Transfer Agents) rather than MDAs (Mail Delivery Agents). Your question includes comments about both (Procmail is an MDA, exim is an MTA).

In your case you are going to dispose of any MDA by just "delivering" to your script. In exim an alias like `username: |/path/to/script` is enough to get that part done with no fancy internal routing or MDA needed.

As for the MTA, Exim is actually pretty light weight. It doesn't provide pop accounts or anything else, it just handles the chat with other mail servers to accept messages, then passes them off to somebody (Usually an MDA or other mail servers).

Don't make life more complicated for yourself down the road by trying to make a non-standard setup, short circuit normal protections like the validation that MTA's run on incoming mail, etc. Just wire the right parts together. Using a pipe-alias in exim as above is a dead simple way to route mail to a script and still behave properly as an MTA.
If you just want to recieve E-Mails you can use a "server" like <http://code.google.com/p/subethasmtp/> .

You can have a 1 file java program using this library that will accept all emails and execute some code for it. The problem with it is you will need to have java present on the machine.