Exim - Restrict relay by domain

sircodealot

Registered
Feb 13, 2005
4
0
151
We use a centralized mail system in our setup, so the servers with Cpanel are really only used for outgoing e-mail generated by PHP, CGI, or other such scripts. What we are basically looking at doing is restricting the domains that are allowed to send out of the server to the ones listed in /etc/localdomains, or the hostname. For example, when someone tries to send out an e-mail using a PHP script, and they set the From: header to [email protected], it will get rejected, because the domain paypal.com does not exist in /etc/localdomains. I've tried messing with some ACL and transport changes that haven't worked as I expected them to work (I'm not too experienced with the exim configuration). I've also looked at using antivirus.exim, but it doesn't look like it accepts a file list of domains. Can someone please point me in the right direction?

Thanks.