Enable mssql functions in PHP on a Directadmin machine.

I needed the mssql functions on 1 of our servers.
Note that this isn’t supported anymore in PHP 7.0 and higher.

First of all install the latest freetds from source (at the moment of writing 0.91)

If you not already have a custom php config in custombuild, create one:

Edit /usr/local/directadmin/custombuild/custom/fpm/configure.php56 and add:

somewhere in between.

Then build php:

And you’re done!

Allow incoming from particular hosts on a per domain basis

The company who i work for encountered a problem in their mail configuration.
Some domains on a server are using our SpamExperts cluster for their incoming email.
However some spammers are using the A record to deliver the mail, so the mail is being delivered without being scanned by our filter.

To block these email’s a small configuration change in our DirectAdmin Exim config was needed.

The first step is to create the config file to identify the domains for this setup.

Then fire up vi for /etc/exim.conf and look for the following rule

Right below add:

Then search for the following configuration:

Right below that add:

Make sure to change spamhost1 and spamhost2 to your own spamfilter.

Save, and add the domains that have incomming email thru the spamfilter in /etc/virtual/spamexperts_incoming.
Email for this domain coming in thru another route should now be blocked with a “nice” notice.

Directadmin MySQL backup script

Time for a new update.
I wrote a small script for Directadmin to dump al the users MySQL databases in .mysqlbackups in the users homedir.
I thought it may interest some of you.

I placed this little script in /etc/cron.daily.
Last thing to do is to set up an encrypted MySQL password.

When it prompt’s for your password. Enter the password for the da_admin user.