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.

Supermicro IPMI error: [kcs] kcs_error_exit:

So, i tried to fetch the ip information of an Supermicro IPMI card.
In place of the wanted information, i was confused with this error:

After some searching, i noticed there was a special kernel module for this.
So let’s try to load it with the command:

And then see what happens….

VOILA! Problem solved!

Mac OS X disk space not freed

This morning i noticed my hard drive was almost full. So i decided to clean up some old data. After cleaning up i noticed not all the space has become available again.
About This Mac

I also noticed there was almost 90GB of data assigned to “Backups”.
I remembered configuring my Mac Book’s Time Machine to make backups on my NAS at home. So i thought it must have something to do with that.

After googling around a bit, i found out that if your on the way and the backup location is unavailable, Time Machine makes snapshots on local storage. When the backup locations becomes available again, Time Machine syncs the snapshots to your backup location and the disk space becomes available again!

Useful but i don’t need it, since i only use the Time Machine to have my data backed up on a regular basis. I don’t really want to go back in time every hour. I decided to turn this feature off.  Since you can’t do this in the Time Machine settings, it was a bit hard to find out how to do this. There is a command line tool called “tmutil” for configuring the Time Machine. It had quite a few options, most important for us now are “enablelocal” and “disablelocal“.

To turn of local backups type:

As we can see it has cleared up the space:

About This Mac

To enable local snapshots again simply use: