Here an easy way to set up an email sandbox in Linux. All email sent from the server will be forwarded to an external email address.
- Install postfix with pcre support.
apt-get install postfix postfix-pcre
- Create the file /etc/postfix/virtual with the following line it (replace email@example.com with the email address that should receive all email).
- edit /etc/postfix/main.cf and add the following line at the end
virtual_alias_maps = pcre:/etc/postfix/virtual
- Restart postfix.