1

How to configure sendmail to only send to specified domains?

view story
linux-howto

http://serverfault.com – I have a local development server (centos) which I develop a number of websites on. Occasionally I need to test email sending scripts. I want to avoid the development server from sending emails to anyone who doesn't have an email address with a particular domain (ie: [email protected], [email protected], etc). So, I would like to create a white list or rule on the server which prevents emails being sent to any email address that doesn't match mydomain.com. I'm currently using PHP's built-in mail() function. But I imagine this is something more on the server level and I would like something t (HowTos)