CentOS 6 with cPanel/WHM. Hackers kept getting into our cPanel mail accounts somehow and sending spam from our servers. They either spoofed the FROM address, or just used "reply to" to have their victims see the domain of the spammers' choice, e.g. lottery.microsoft.com or something like that. I decided to lock down the server and asked the hosting company to prevent any outgoing or incoming mail with non-local domains.
They made some changes to /etc/exim.conf, adding what looks like might be C code to the file. I didn't know configuration files could have programming constructs in them. Can anyone explain the meaning of the lines below?
The code they added is supposed to prevent emailing TO or FROM non-local domains. But now I would like to change it to allow emailing TO non-local, but continue preventing emailing FROM. I would also like to prevent outgoing emails with "reply-to" being non-local.
I assume the
# are commented lines. Where do these variables come from? What are
no_more? Is the if statement operational, or is it commented with the
#ifdef DCconfig_local # configtype=local # # Stand-alone system, so generate an error for mail to a non-local domain nonlocal: debug_print = "R: nonlocal for $local_part@$domain" driver = redirect domains = !example.com qualify_domain = example.com # domains = ! +local_domains allow_fail data = :fail: Mailing to remote domains not supported no_more #.endif