Jul 14, 2006

Spam Assassin Reads Comment Tags?

We recently ran our free HTML email templates through Spam Assassin’s filters, and noticed that we were being penalized for a few items (learn more about Spam Assassin here). Most of them were caused by some "placeholder" text like, "free" and "preview," but that content would be replaced by the end user anyways.

But we noticed that our comment tags were getting flagged as spammy too! If you’re a coder, you should know about this.

See, in our HTML email templates, we include all kinds of descriptive comment tags for users, so that they know why we coded things the way we did (because making HTML work for email is really odd sometimes). Normally, these comment tags are "invisible" unless you view the raw source code of your HTML. They’re just notes to help other coders know where and why you placed your code.

I was a little surprised to learn that these tags were actually being read, and scored, by Spam Assassin. Kinda reminds me of this crazy Calc5 professor I had, who actually deducted points for my bad handwriting.

Some examples of comment tags that got us flagged:

Example #1:

<!– /// CSS goes here in case the /HEAD tags get stripped \\\ –>

Example #2:

<!– /// Sometimes, BODY tags get stripped. This table is for background color when that happens.  \\\ –>

* We got a 2-point penalty for "SHOUTING" because of these comments. Switching "CSS," "HEAD," and "BODY" to lowercase cleared the penalty.

Example#3:

<!– /// footer area with contact info and opt-out link \\\ –>

I used this comment tag to point out the proper place to stick their unsubscribe link (in the header and footer of the email). In turn, I got a 1-point penalty for using the term, "opt-out." Since I had that in 2 locations in my email, this resulted in a total of 2 points added to my spamminess score. Guess too many spammers use "opt-out" in their messages. Switching to "unsubscribe" helped. Note that the word, "unsubscribe" still gets flagged by other spam filters. Some people choose to use the word, "remove" instead, or "take me off this list." Just don’t go nuts with the old thesaurus, because that’s bound to look even more fishy to the spam filters.

Overall, we’re not the types who fret about every little point. Just like money, you can be "penny wise, pound foolish" about spam points too. For the most part, you shouldn’t be too concerned. As Spam Assassin says, "We filter spam. If you don’t send spam, you’ve got nothing to worry about."

But if you send content with any financial information, or if you had a special "free giveaway," or if you send pharmaceutical related emails, every tiny fraction of a point matters. No need for your comment tags to skew your score.

FYI, we’ve modified all our free HTML email templates.

Related links: