Directadmin developers released BlockCracking 1.8 on October 9th and if you upgraded its version without upgrading /etc/exim.pl and /etc/exim.variables.conf you will most likely have an issue with sending emails. Here is a quick way on fix it.
cd /usr/local/directadmin/custombuild ./build update ./build exim_conf
It's very important to update version of exim.pl to 23+ and /etc/exim.variables.conf to newer. With older version of exim.pl and exim.variables.conf sending emails from a server with Directadmin + BlockCracking will fail with the following error:
rejected by non-SMTP ACL: failed to expand ACL string "${perl{get_env}{HOME}}": \ Undefined subroutine &main::get_env called.
For example:
2017-10-12 22:45:02 1e2smL-0005WP-ME F=<mail@domain.com> rejected \ by non-SMTP ACL: failed to expand ACL string "${perl{get_env}{HOME}}": Undefined \ subroutine &main::get_env called.
You can find out which version you have with the following command:
grep '#VERSION=' /etc/exim.pl
it should give the following:
#VERSION=23
If you have an older version (with lower number) then you should upgrade it with commands shown above (at the beginning of the article).
If for any reason you can't upgrade exim configs due to a customization, then you can do a partial upgrade with the following commands:
wget -O /etc/exim.pl http://files.directadmin.com/services/exim.pl.23 chmod 755 /etc/exim.pl perl -pi -e 's/keep_environment=.*/keep_environment=PWD:HOME/' /etc/exim.variables.conf.default perl -pi -e 's/keep_environment=.*/keep_environment=PWD:HOME/' /etc/exim.variables.conf
Control the version of exim.pl as shown ealier, and run this command:
grep ^keep_environment= /etc/exim.variables.conf /etc/exim.variables.conf.default
Desirable output is as the following:
/etc/exim.variables.conf:keep_environment=PWD:HOME /etc/exim.variables.conf.default:keep_environment=PWD:HOME
Restart exim:
service exim restart
That's it.
More information: