Finally a way to have a “local cloud” with Google Drive – Insync

If you read my post on Egnyte before, you know I really like their solution to cloud storage. The bad thing with Egnyte is Egnyte the company. They are a pain in the arse to deal with, and they raise prices constantly.

Being an early adopter of Google Docs (now Drive), I’ve always wanted to move everything to drive. I run Linux though, and Google unforgivably doesn’t support Linux with their sync application. Another downfall with the Google sync application is it only supports one account. Imagine my delight when I found a small program called Insync.

With Insync, I can install it on my Linux box. I can install it on my Windows vm. Not only that, I can sync all my Google Drive accounts, and I can sync them to different folders. Let’s just say this little app rocks the party.

WordPress emails not working

This wasn’t intended to be my first post, but I just finished getting email working for this blog, so I figured why not post how I got it work. We can always do an intro later.

For this blog and another blog I just started, www.playingwithpython.com, I setup a Linux server to host the sites using Apache. After getting the sites setup, I went to setup a couple security plugins that send email alerts. Unfortunately, emails were not working.

Being a fairly recent adopter of Linux, these type of issue are never light bulb moments for me. It takes hitting up Google for the answers. Typically, I scour the web for a couple hours trying pull enough pieces together to get the puzzle put together. This was no different.

In order to save you the time that I wasted, let me just post the steps I did to get this working.

First, I immediately figured I didn’t load sendmail, since I loaded a barebones linux install for this server. So, first step is to load Sendmail.

Install Sendmail:

  1. Since I’m running CentOS, I installed sendmail with “yum install sendmail”.
  2. Next, I set the service to start automatically with the “chkconfig sendmail on” command.
  3. Lastly, start the service with “service sendmail start”.

Alright, send mail is loaded and allows local host by default. Let’s go test these emails again….. nope. Still not working. I was getting the error “Could not instantiate mail function”.

I went to check the logs in the file /var/log/maillog and found the error…

NOQUEUE: SYSERR(apache): can not chdir(/var/spool/clientmqueue/): Permission denied

The problem now is SELinux. You can test and resolve this issue via the following commands:

  1. Check to see if httpd can sendmail by running “getsebool -a | grep mail”
  2. See if “httpd_can_sendmail –> on” shows. If it says off, SELinux is blocking httpd from initiating sendmail.
  3. Run “setsebool -P httpd_can_sendmail on” to fix SELinux.

You should now be able to send emails via WordPress’s, well really PHP’s mail() function.