Compiling PHP with IMAP in DirectAdmin Custom Build

This is a quick guide on how to compile PHP with IMAP and SSL support for DirectAdmin Custom Build.

We will need to install additional libraries, change the build options for PHP5, and then recompile PHP. These instructions are for DirectAdmin 1.2.x and 1.3.x on CentOS 5 (x86-64). Use with caution.

Install needed libraries

yum install libc-client
 yum install libc-client-devel

Reconfigure CustomBuild PHP5 Configuration File

nano /usr/local/directadmin/custombuild/configure/ap2/configure.php5

Add the below lines to the configure.php5 file.

--with-imap=/usr/lib/dovecot/imap \
 --with-imap-ssl \

 

Recompile PHP5 with our customizations configure.php5

cd /usr/local/directadmin/custombuild/configure/ap2
./build php y

If all goes well, you will see it succeed without error.

Possible Error and Resolution:

Error: /usr/local/directadmin/custombuild/configure/ap2/configure.php5: line 31: –with-imap=/usr/lib/dovecot/imap: No such file or directory
*** There was an error while trying to configure php. Check the configure/ap2/configure.php5 file

To Resolve:

make sure that when you add the line to the configure.php5 that you add a trailing slash \ to the end of the line above it. (The second to last line, but not the last line itself).

for example,

--enable-mbstring

now becomes:

 --enable-mbstring \

Then save and call the build command once more.

Learn More

KSL.com Suggestion – Report Reverse Reply Spam

While KSL.com allows people viewing ads to report them, there is no mechanism to report spam sent via their built in “contact the seller” messaging service. Potentially anyone who has an account on KSL, can “reply” to a classified listing, and send spam to the original listing creator. It’s a process known as reverse-spamming. In a typical scenario, we might expect the classified listing itself to be the spam. However on legitimate postings, a spammer can capitalize on the concept known as in reverse-spam or reply-spam, where they use KSL.com as the means of relaying spam to the original classified lister. This is generally a successful technique for spammers because they are able to reach their target with 100% deliverability. Since the Email uses KSL.com’s email servers for delivery, it will inherit the reputation of their email servers when being processed at the recipients email server. Additionally, the spammer doesn’t actually have to know the target’s email address. They simply have to reply to a listing. An automated bot can crawl the site, and send off many replies with their spammed message in the content, and KSL.com will facilitate the delivery to their target, the lister.

My wish is that KSL.com would include an action on each email message sent out to the classifieds lister, where they could report the message as spam. Then they could track abusive users who are doing this reverse-spam methodology and address this problem to bring them in compliance with the CAN-SPAM Act.

Here’s a message I received on my auto listing. It’s obvious that this seller really didn’t want to look at my car.

wes stillman – <redacted>@gmail.com
I’m interested in your vehicle, I would like to look at it and take it for a test drive. Also I run a shutter company in salt lake called Stanfield Shutters we build custom shutters to fit any window no matter the shape or size of them, they come with a warranty. We also match any color or stain as well, would you be interested in trading shutters for the vehicle Thanks Wes

Learn More

Ten Second Mac OS X HTTP Server

Apple Macintosh OS X includes a little known python script which turns your computer into a basic web server. You can use this if you simply want to make an easy way to access files on your mac from another computer. Beware that as this is, there is no security for preventing anyone from connecting into the directory you’re sharing, so use it with caution, and always terminate the process / close it down when you’re done. Whatever directory you publish, will remain accessible with all files and folders within, until you terminate and close the process out. Use with caution.

How to setup an HTTP server on OS X in 10 seconds.

  1. Open Terminal
  2. Change to the directory where you want to serve up content from
    • cd /path/to/what/you/want/to/make/available
  3. Run the HTTP Server process via Python
    • sudo python -m SimpleHTTPServer 80

When you close the Terminal that spawned the python http server; you will end the process and terminate the http server.

Notes: Be mindful of anything you’re sharing as it could potentially be accessible to anyone on the network you are connected to as well as potentially the internet as well; so use with caution.

Learn More

Updating Ubuntu Kernel and Removing All Old Kernels

This is a quick guide on how to update your kernel and supporting header and image files, as well as clean out older ones to free up space on the boot partition. I have used this process and these specific commands on Ubuntu 10.04 through 14.04.

1. SSH in and switch user to get Root Access

sudo su

2. Update all packages

apt-get update;
apt-get upgrade;

3. Install any available kernel, image, and kernel headers packages.

Usually you will see a message stating that apt-get installed 0 items but three are available. You will have to manually type in apt-get install <package name> in order to do these updates. Just copy and paste the item names as you see from the output of apt-get.

4. Reboot

We need to make sure we’re running the most recent kernel and supporting files, especially if we just installed newer versions. We will then be able to remove the older ones.

reboot

5. Clean up any no longer needed packages and outdated versions

apt-get autoremove;
apt-get autoclean;

6. Remove remaining unused kernel packages.

This command checks for any existing but no longer used kernels, and deletes them. This prevents your boot partition from filling up with old kernels and supporting files. Use with care!

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge
Learn More

Remove Exchange Attributes from All Users in Active Directory – Uninstall Exchange Server

If you are attempting to remove Exchange Server from your active directory, you will find that Exchange has created user account attributes that exist on all accounts even after deinstalling Exchange server. If you want to remove these attributes from all accounts, this is a command to do so.

Please take note that you would only ever use this if you have completely deinstalled Exchange from your domain and no longer need it. If you run this command, all accounts will lose their Exchange attributes. This WILL REMOVE Exchange settings for all user accounts. This command is very dangerous. Do not use it unless you know what you are doing. Any use of it is without warranty or liability on my part.

 

get-aduser -filter {msExchMailboxGuid -like “*”} | set-aduser -clear msExchMailboxGuid,msexchhomeservername,legacyexchangedn,mail,mailnickname,msexchmailboxsecuritydescriptor,msexchpoliciesincluded,msexchrecipientdisplaytype,msexchrecipienttypedetails,msexchumdtmfmap,msexchuseraccountcontrol,msexchversion

Learn More

The Difference Between Network Illiterates, Amateurs, and Admins

To solve network connectivity problems, network illiterates will turn off the firewall; network amateurs will open ports, but true network admins will create conditional firewall rules. – P. Tanner Williamson

Turning off a firewall is just a bad idea. While usually a basic starting step to confirm that it is the firewall that is blocking your application connectivity, leaving it off as a solution is a very bad practice. You should only turn it off long enough to confirm connectivity works when it is off. If connectivity still doesn’t work when it is off, then you may have a compounded networking / application issue, and it may not be the only point of failure.

Opening ports or port forwarding is typically a NAT feature. On home routers, that do not utilize a dedicated firewall feature, this may be the only option you have. However on a true enterprise grade firewall device where NAT and Firewall rules are configured separately, but conjunctively in order to set up traffic, you would want to take advantage of the firewall configuration and define specifically which sources and types of traffic can be forwarded through a port, rather than letting anyone from any IP come through a port.

Another concept to think about, is that firewalls don’t have to only exist at the edge of the network facing the internet. You can also place firewalls within the network, to isolate areas of the network from other areas, depending on how you have designed your network.

Learn More

Self-Signed SSL Certificates cause Mozilla Firefox to say The URL is invalid and cannot be loaded.

If you have Mozilla Firefox telling you the URL is Invalid and cannot be loaded, chances are your Firefox installation has corrupted. I had multiple devices on my network which use self-signed SSL certificates. I have previously allowed them.

Symptoms:

Bob on his userprofile can get to the SSL site just fine, but John on the same computer under a different profile can’t get there and is told the URL is invalid. Other browsers work just fine but Mozilla Firefox does not.

Solution:

You have to Uninstall Firefox completely, and delete all the folders it has created.

YOU WILL LOSE ALL YOUR SETTINGS, BOOKMARKS, SAVED PASSWORDS, etc. SO it is highly recommended that you make a system backup, and at minimum backup your bookmarks. Create a list of the plugins you have that you want to reinstall, and get your saved passwords somewhere safe. I recommend Xmarks to backup your bookmarks, and LastPass to backup your passwords.

  1. First, go to Programs Files and Programs Files (x86) and delete all Mozilla Folders. (Warning, this will delete any other programs that you have by Mozilla such as Thunderbird.)
  2. Now, go to C:\Users\YOUR-USERNAME\AppData\Local\ and delete Mozilla
  3. Again, go to C:\Users\YOUR-USERNAME\AppData\Roaming\ and delete Mozilla.
  4. Now, reinstall Mozilla Firefox, and this issue should be gone.
Learn More

Symantec Backup Exec Agent Installation Fails with Error Setup Already Running

Symptoms:

Remote Installation or Local of the Backup Exec agent fails.

 Install  — The job failed with the following error: Fatal error during installation.

OR

Unable to run Setup.exe. Another instance is already running. WARNING: Installation has been canceled.

Applies to:

Backup Exec 2008, 2010, 2012.

The Cause:

I found the solution to the problem. The root cause is that

Learn More

Windows Update Error C8000710

If you’re getting Windows Update Error C8000710, it is most likely caused by a full disk. Check your OS partition to see if it has filled up. If it has, work to free up space immediately by either moving files and folders to another partition or drive, or clear temporary files.

This applies to Windows XP, Vista, 7, 8, and Server 2003, 2008, 2008 R2, and Windows Server 8.

Learn More

Backing up WHM/cPanel Reseller Accounts Offsite with WHMEasyBackup

Backups for WHM/cPanel can be daunting if you’re unsure of how you’ll do it for a decent price. R1Soft can be expensive and there isn’t a good niche for people who are hobbyists or smaller resellers.

After doing some research for my own needs, I came across WHMEasyBackup. For those of you who have entire WHM/cPanel servers or at least reseller accounts and need a way to back them up offsite, this is a product you may be interested in. WHM Easy Backup is a utility which you

Learn More