Doctrine 1.2 and YAML

YAML Makes Life Easier

This post isn’t going to be breaking any new ground. I’ve been working on a project on and off for about a year now. It’s using the CodeIgniter 1.7 framework and Doctrine 1.2 for its ORM. With Doctrine, there are kind of two ways to define Models. You can create them in PHP or you can create them in YAML. I was doing the former for the longest time, but recently switched over to YAML and have been just kicking myself for not doing so sooner. Here’s an example of a model in PHP: Continue reading

Posted in PHP, Web Development | Tagged , , , | Leave a comment

Email Deliverability: Feedback Loop

Completing the Loop

So you’ve got your SPF records setup nicely, you’ve used the tools available at the Postmaster sites, and your emails are being delivered, but now what? There are two things you’re concerned with now: are your emails being read and are they being reported as spam? Feedback Loops (FBLs) can’t help you with the former, but they can help you with the latter.

A Feedback Loop is pretty simple idea: when a user signifies that they believe your message to be spam, the email provider notifies you of this and sends you the message that was flagged. The only difficulty involved is that an FBL must be setup with each email providers and ISP individually, and that each FBL you setup has a different set of requirements. Typically, FBL information is listed on the Postmaster sites, so a good place to start is the list of sites that I have here. Continue reading

Posted in Email Deliverability, Feedback Loop | Tagged , , | Leave a comment

Email Deliverability: Postmasters – Part 2

Postmaster Tools

Some of the Postmaster sites highlighted in Part 1 contain useful troubleshooting tools. There’s too many to go through all of them, so I’ve highlighted some of the most useful ones.

AOL
AOL probably has the most extensive number of Postmaster tools of any major email provider. Among them:

  • Reverse DNS Check
    Quickly verify your reverse DNS capability. You want the IP you are sending mail from to resolve to something logical. AOL has the following guidelines and recommendations for your reverse DNS entry:
    • All connecting Mail Transfer Agents must have established reverse DNS
    • The reverse DNS entry (PTR Record) should match the domain name (A Record)
    • Reverse DNS must be in the form of a fully-qualified domain name
  • Verify Connecting IP
    AOL has setup a special email address that will automatically report back to you the IP address that your email was actually sent from. This can be very helpful, especially when configuring your SPF records.
  • IP Reputation Check Tool
    This tool allows you to check on the reputation your IP address (that you found using the above method). Generally, your reputation will simply be “Undisclosed”, which is fine. AOL just hasn’t received enough emails from you to form an opinion.

A complete list of the tools that AOL provides can be found here.

Time Warner Road Runner
The Road Runner Postmaster Site has a very nice IP status tool. It actually provides the results of a number of different spam block lists all in one place. With one query, you can check the status of your sending IP address from Return Path, Spamhuas, Cloudmark, and, of course, Road Runner. Here’s an example of the results for ericbrandel.com:

Road Runner IP Check Query Results
Road Runner IP Check Query Results

Comcast
Comcast has a unique tool that helps you with getting your IP address unblocked. It’s unique in that it is automated. If Comcast is the one blocking you (your block is not based on being listed as a spammer by another group) you can use their RBL Removal Form. More information is available here.

Other than the tools highlighted above, most of the providers also have a system for setting up a Feedback Loop (FBL). This is a system that alerts you when your messages are marked as spam. A post covering FBLs in a little more depth is still in the works, and will hopefully be completed in the next couple of days.

Posted in Email Deliverability, Postmaster | Tagged , | Leave a comment

CodeIgniter 2.1 and RedBeanPHP 3.0

Based on a comment on my previous post, I decided to take a look at RedBeanPHP in conjunction with CodeIgniter. In about ten minutes, I had grabbed the latest releases of both (CI 2.1.0 and RedBeans 3.0.2), set them both up and had them playing nice with each other thanks to this great tutorial, and was inserting data into an empty and tableless database.

After following that tutorial, it was really this simple:

$this->load->library('rb');
$taco = R::dispense('taco');
$taco->cost = 14.95;
$taco->title = "Greatest Taco Ever";
$taco->flavor = "Tasty Fake Beef";
$id = R::store($taco);
$taco = R::load('taco', $id);
print_r($taco);

Continue reading

Posted in PHP, Web Development | Tagged , , , | Leave a comment

Yet Another Open Source CRM?

YAOS CRM?

Most developers I know have a million pet projects they’re either working on or would like to work on. For me, one of the many things I wish I had time for was writing a new Customer Relationship Management (CRM) tool. No, I’m not looking to go up against the big boys like SalesForce and SugarCRM, it would be more of a learning project. It seems like most every web developer will at one time write at least one of the following things:

  • Content Management System (CMS)
  • Customer Relationship Management (CRM)
  • Project Management (typically just a Basecamp clone these days)

I’ve done the first two already, and have no desire to do the third, but I have been wanting to have another crack at at CRM tool for a while now. The first one I wrote worked well, was customer support focused and was utilized for years with only minor issues, but the code left a lot to be desired. This new one would mainly be written using tools and technologies I wanted to spend more time with, and would probably consist of some of the following:

  • PHP Framework:
    1. CodeIgniter 2.x
    2. Symfony
    3. ZendFramework
  • PHP ORM:
    1. Doctrine 2.x
    2. RedBean
  • Database:
    1. MySQL
    2. MongoDB
    3. Cassandra
  • Node.js
  • jQuery UI & jQuery Mobile
  • HTML5 & CSS3

Continue reading

Posted in Projects | Tagged , , , , , , , , , , , , | 2 Comments

Email Deliverability: Postmasters – Part 1

Who’s the Postmaster?

ISPs and email providers understand that a lot of commercial email is not unsolicited email. Much of it is actually email that their users have requested, whether it be for a weekly email from a fan club they’re part of, or the status of an order on Amazon. To help this solicited email actually reach their customers, most major ISPs and email providers have a dedicated Postmaster site. Unfortunately, this means the Postmaster is not a person wearing a special hat. What the site actually contains are information and tools designed to help guide companies sending commercial email. Examples of what is included at these sites:

  • Information on Best Practices
  • Email troubleshooting information and tools
  • Support requests for mailers
  • A Postmaster Blog
  • Feedback Loop (FBL) information (this will be covered in a later post)

Continue reading

Posted in Email Deliverability, Postmaster | Tagged , | Leave a comment

Email Deliverability: SPF Records – Part 4

SPF Records – Part 4 – SPF Record Tools

To wrap things up, here are some good online tools for working with and troubleshooting SPF records.

The first one is a DNS lookup tool from ZoneEdit.com. With this tool you simply enter your domain name, and then it shows you what DNS records are currently associated with it. For example, here are the results for EricBrandel.com:

DNS Lookup Results For:
ericbrandel.com
ericbrandel.com. 43200 IN TXT "v=spf1 a/20 -all"
ericbrandel.com. 43200 IN NS ns2.mediatemple.net.
ericbrandel.com. 43200 IN NS ns1.mediatemple.net.
ericbrandel.com. 43200 IN MX 10 mail.ericbrandel.com.
ericbrandel.com. 43200 IN A 205.186.175.192
ericbrandel.com. 43200 IN SOA ns1.mediatemple.net. dnsadmin.mediatemple.net. 2011121303 10800 3600 1209600 43200

The first item is the TXT record that contains the SPF record for this site. As was mentioned earlier, the host for EricBrandel.com, MediaTemple, doesn’t support SPF records. So if you wish to utilize their DNS servers, you have to utilize a TXT record instead. There is no penalty for this, and it’s really just semantics, since a true SPF record still has to contain the v=spf1 starting chunk.

Continue reading

Posted in Email Deliverability, SPF Records | Tagged , | Leave a comment

Email Deliverability: SPF Records – Part 3

SPF Records – Part 3 – Setting Up Your SPF Record

The final post on SPF records will cover creating a record for your domain. In previous posts I had mentioned that the SPF record for EricBrandel.com was the following:

v=spf1 a mx -all

Well, one problem with that: it’s wrong. Let’s look at some email header snippets to see what happens when I send an email to my Gmail and Yahoo accounts (email addresses modified to protect the innocent):

Gmail:
Received-SPF: fail (google.com: domain of XXX@ericbrandel.com does not designate 205.186.172.19 as permitted sender) client-ip=205.186.172.19;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of XXX@ericbrandel.com does not designate 205.186.172.19 as permitted sender)
Yahoo:
Received-SPF: fail (domain of ericbrandel.com does not designate 205.186.172.19 as permitted sender)

So what happened? In the SPF record, the address (A) DNS record and the mail (MX) record are specified for approval, but all other hosts should fail (-all). But the A and MX records don’t match the IP address that the email is actually being sent from.

Continue reading

Posted in Email Deliverability, SPF Records | Tagged , | 2 Comments

Email Deliverability: SPF Records – Part 2b

SPF Records – Part 2b – Examples & Use Cases

The first post for Part 2 covered the Mechanisms and Qualifiers that are used to construct an SPF record. If you haven’t read that yet, you may wish to before proceeding. This post will show some examples and explain them in a little bit of detail. One note to remember: these mechanisms are processed from left to right. Each mechanism requires at least a single DNS lookup. It is best to order them from most likely to match to least in order to minimize the overhead.

For reference, here is the original SPF record that is in use by ericbrandel.com. It’s about as simple as it can be:

v=spf1 a mx -all

There are a lot of different things you can do with your domain’s SPF record, but two of the most common are:

  • Include a specific IP address
  • Include a range of IP addresses
  • Include another domain’s SPF record

Continue reading

Posted in Email Deliverability, SPF Records | Tagged , | Leave a comment

Email Deliverability: SPF Records – Part 2a

SPF Records – Part 2a – Mechanisms and Qualifiers

This second part will examine the options available in SPF records and breakdown some example records. I’ve again split these posts up, this time it’s to give the example SPF records a place to live on their own. That post should be up in a couple of hours. Also, if you haven’t read the first part of the article, Email Deliverability: SPF Records – Part 1, which covers the background of SPF records and gives a simple example, you might want to do so before proceeding.

SPF records have two main parts: mechanisms and qualifiers. Mechanisms are the options used to determine if a message has been sent from a valid host. There are a total of eight mechanism types. Qualifiers can be used to modify the action performed based on the mechanism. There are four qualifiers, but in practice only one is used.

Continue reading

Posted in Email Deliverability, SPF Records | Tagged , | Leave a comment