A Fix For Slow Sendmail on Ubuntu

April 15th, 2013 • 1 note

I currently host a majority of my websites on a DigitalOcean VPS. For the most part it’s been a great experience, and easy on my wallet. One thing I noticed however, was trying to use PHP’s sendmail function.

If you just install it via apt-get, you’ll likely notice that sending mail is painfully slow. There is a quick fix for this fortunately, and I’m going to show you how. First of all, if you don’t have sendmail installed, you’ll want to do that. Pretty easy, once you’re SSH’d into your server, execute the following command:

apt-get install sendmail

Great, we now have the sendmail module installed. Now, we need to configure our hosts file, just to make sure our entry is correct. If you don’t know your host name, just run the command hostname, and it will return it. Now we need to edit our hosts file. The quickest way is to use a command line text editor like nano, so let’s do that.

nano /etc/hosts

There should be an entry for your localhost. Edit the line so it resembles this, but using your own hostname.

127.0.0.1       localhost localhost.localdomain yourhostnamehere

Press Control+o, then enter, and finally Control+x. Now issue the following command and answer ‘Y’ to everything:

sendmail config

And for good measure, restart apache:

service apache2 restart

After that, your sendmail function should work much faster. Questions or comments? I’m @syropian on Twitter and App.Net

Hello Kirby →

February 15th, 2013 • 1 note

A short write up of my portfolio site’s new architecture.

Pay Collin!

February 10th, 2013 • 1 note

Pay Collin!

When Stripe finally came to Canada I was so very excited. Excited at the notion of dropping PayPal forever because they’re shady, ugly, and generally sucky.

I finally decided to build a tiny little web page to allow anyone to pay me an amount, powered by Stripe. It’s written in plain ‘ol PHP, HTML, CSS, and jQuery, and hosted on Heroku. Go ahead and check it out on your desktop or mobile device. Be warned, if you fill it out with your actual credit card info, it will charge you. You’ve been warned.

Laravel 4 Beta →

January 15th, 2013 • 2 notes

Laravel, my prefered PHP framework has hit v4 (in beta). Go check it out!

Uploading Images to Amazon S3 With Laravel

November 25th, 2012 • 2 notes

Amazon S3 (Simple Storage Service), is a nice little service for storing images in the cloud. When building an application, I usually prefer to keep my assets on my own server, but put any uploaded images into an S3 bucket. I’m going to show you how to upload files and get them in your S3 bucket.

Read More