I have a development Ubuntu Server (12.04.1) VM that I use to develop php sites and e-commerce sites (like Magento etc).
Because this is for development purposes, and I need to test with e-mail addresses other than my own, I need a way for the sendmail command to accept a mail but not actually deliver it, but rather archive is somewhere where I can look at it.
What is the easiest way to install a mail server such that the sendmail command routes ALL mail to a local directory? i.e. I do NOT want any mail to be delivered to the internet.
I tried the steps discussed in this question ( SMTP server to deliver ALL mail to user@localhost), but it doesn't seem to work - I get an error message in my (local) mailbox telling me that it cannot deliver my test message (e.g. someone@gmail.com)