BlackListing + Hotmail's spambox

Posted by John
on Wednesday, 19 March 2008

An annoying thing about building an email system is the fear of your server's IP getting accidentally logged on one of the many Anti-Spam blacklisting sites.

These site's basically record who they think is sending spam emails, so if they think you're one of the bad guys you go in their book; which as you can imagine services like GMail, YahooMail and Hotmail reference these to gauge bad senders.

To check if you've been unintentionally listed;

Most site's will allow you to request removal from their black-lists without too much of a problem.

Hotmail's SpamBox

Another thing i'm trying to figure out is how to stop emails my webapp sends from going into into Hotmail's spam box, it's ok with Gmail and everyone else, but bad with MS Hotmail.

'Hotmail have a propietry spam filter which is prone to false positives from some senders for no aparent reason. Hotmail wont tell you why it is classed as spam.'

Thankfully Thomas Glasgow has suggested that if you should first send an email from YahooMail to your site, then reply back to YahooMail; YahooMail should then interpret that as a good site and stop doing this.

Not sure whether it works for Hotmail but worth a shot.

Apache 2.2 + PHP on a MacBook ?

Posted by John
on Monday, 19 November 2007

Being a developer and today being my trip to the dentist (and a day off work), I tend to get bored really really easy.

And knowing tomorrow I've got to work with JSON I thought I'd show you how easy it is to install and compile Apache 2.2 Web Server and Enable PHP 4 on your MacBook, so you can get to and build PHP apps natively on OSX.

Now obviously you could download MAMP to get up and running fast, but really that's just not geeky enough for us hard-core developers, so let's begin.

Apple Developer Tools Required

Yes, to build from source you're going to need the GCC compiler which can be obtained for the Apple Developer Connection website (free), search my searchbox for a link otherwise just download from their site.

Apache 2.2

Installing Apache 2.2 Web Server

First goto the Apache site and download the latest sourcecode to your desktop.

Once downloaded, do the following in your TERMINAL window;

cd desktop
gnutar -xzf httpd-2.2.6.tar.gz
cd httpd-2.2.6

Now we've untar'd it to the desktop and have navigated into it, let's build from source.

Run this to setup the sourcefiles for your machine and build spec,

./configure --enable-module=most --enable-shared=max

Now compile the sourcecode, and install

make
sudo make install

Bingo, you now have Apache 2.2 (or whatever version your downloaded) installed on your MacBook.

Starting & Stopping Apache2

Start with...

sudo /usr/local/apache2/bin/apachectl restart

Stop with...

sudo /usr/local/apache2/bin/apachectl stop

Running PHP on OSX

Enabling PHP 4 ?

Now every MacBook comes with PHP4 installed as standard, it just waits until you enable it to work.

So to enable it, type in TERMINAL;

cd /etc/httpd
sudo mate httpd.conf

This will navigate to the httpd Apache config file and open it's INI file in TextMate (I'm baised but you can use NANO or TextEdit if you like to edit the file).

When you've got the file open, search for 'PHP' anywhere in the file.

You should see two occurences, commented out with #'s remove these to enable PHP.

# LoadModule php4_module libexec/httpd/libphp4.so
# AddModule mod_php4.c

Now save and close the file

And restart Apache

sudo apachectl restart

Stop with...

sudo apachectl stop

Hang on this isn't Apache 2.2?

Now what this will do is startup your Mac's native Apache server (which isn't 2.2), sorry but I haven't worked that one out.

Your fresh 2.2 build will also have an *httpd.conf file in...

cd /usr/local/apache2/conf
sudo mate httpd.conf

To edit it's config file, sorry I haven't an answer at the moment but I'll figure it out.

Next question,

Where to stick my WebPages?

First make sure Personal Web Sharing is enabled in System Preferences / Sharing.

Next in your user directory (or the first directory you appear in when opening TERMINAL), create a directory called...

mkdir Sites

Now everything you stick in this directory will be acted upon like it's a website (including PHP).

To test your PHP setup works, create a file in there called test.php and add this in it...

<?php phpinfo() ?>

Now before you leave System Preferences / Sharing, click the info link by Personal Web Sharing.

This will display a dialog and at the bottom of this will be some web addresses, the one's for the web server running on your machine!

Click on one and bookmark the link.

Add /test.php to the end and run it in Firefox or Safari, you should now see the version of PHP installed on your system.

Well done, you have now successfully installed PHP and Apache2 from source on your MacBook.

Enjoy and when I can figure out how to replace Apple's native 1.3 Apache server with 2.2 I'll let you know, but for now it works.

AtomPad re-design

Posted by John
on Friday, 14 September 2007

bit of a rapid re-design here, not much but fixes a lot of problems and makes it a bit more un-cluttered and sparse.

the black-on-white icon is very ss but i’ve used that .psd on all my other sites it’s become something of a trademark so included it better here.

enjoy, there’s a lot of features and bugs still to iron out and in no means perfect but it’s getting there.

John.

www.atompad.com

Happy Anniversary, We're 5 years old!

Posted by John
on Wednesday, 12 September 2007

Looking back on the server logs it suddenly dawns on me, my pride and joy is now 5 years old, party!!!

That’s some History…

It’s been a rollercoaster ride. This site’s first incarnation appeared back on a very early incarnation of Blogger before Google bought them out. Then under the guise of wolfsclaw.com on a UK hoster running PHP 4 and Textile, then off to TextDrive PHP 5 and Wordpress for a while. Then over to DreamHost then MediaTemple Grid-Server → full DV box.

Now finally it’s sitting on it’s own custom Linux VPS server under Xen virtualisation, running Ruby on Rails with professional-grade deployment and load-balancing nodes. All made possible by SliceHost

It’s been quite a ride but I’ve enjoyed it and have no intention of letting up just yet.

Why do it?

I originally started the blogging idea as a means of putting myself out there, finding new friends, colleagues and quasi-self-promotion. But it’s thankfully grown away from that and now whenever I solve something difficult or write up some crackin’ solution it goes here.

I work on the notion if it’s helpful to me then it’s probably helpful to someone else out there, and if I end up making someone’s day then that’s thanks enough.

Still no Ad’s!

Yep I’m still sticking with my policy of no ad’s or annoying popups on the site, financing it out of my own pocket for the greater good.

Hackers go Bye Bye!

And having had no major break-ins or take downs in it’s history, life’s been mighty nice.

I’ve implemented load balancing on the web server to keep the Digg effect from happening and have a nice pool of bandwidth and processor resources and nightly disk imaging to keep things secure and bullet-proof.

Numbers?

If your interested, the logs suggest around 3,000 visitors a day, averaging 60,000 a month. Google Analytics tracks the details for me and sends a graphical chart each month, so far 200 goal achivements per month can’t be bad!.

Looking forward to the next 5!

Take care all,

‘Goodnight and Good Luck’

Added Stumble Button

Posted by John
on Wednesday, 27 June 2007

stumble button
Wahey!, now you can add any new posts on this website directly into the StumbleUpon social network via a button in the sidebar (replaced the Reddit button).

Below is a link to the zip file where all the source code is located, along with the gif image.

Stumble Button version 1.0

…code is in php, image is a gif, all my own work,

Enjoy!