I have setup an Ubuntu 12.04 VM, which I use to test and develop magento shops. On this desktop VM I have an almost exact copy of the shop running. I prefer to use a desktop VM as this gives me the option to run a browser inside the VM and keep everything local. If I want to I can modify the hosts file and route shop domain names to localhost.
I would like to be able to test mail functionality. To give an example: for an existing shop some mails are not sent. Instead of messing with the production site, I want to test this on the VM. If mails are sent here, the mail should stay on the VM and not be sent out over the internet. So I want to be able to send the mail out from magento, but the mail stays local. And I want to read the mail, preferrably with a mail client like Thunderbird.
I have blocked traffic to port 25 using UFW, so I hope this prevents mail from leaving the VM.
ufw deny 25/tcp
I have worked with postfix and prefer that as smtp server, but I can't say (at all) that I'm experienced. I hope this is not too complex to setup.
Why not test with my own mail or test address? Well that might be a solution, but on a running magento install mail might be sent out automatically to other people. As I use a copy of the production database, with real customers and existing addresses, I don't want them to receive status update mails from the test system. If the solution only works for one or two domains or mail addresses, that's fine.