betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

16 June 2006

Reject No-Reference Trackback

You don't link to me? Don't trackback to me!

To help me against the plague of trackback spam on this server, I've adapted my COREBlog to check for links to my blog on pages that want to trackback to me. The patch is just one changed line. COREBlog is so great, it has already code in there that checks for such links, and one could make such trackbacks without link get moderated (the "Moderate No-Reference Trackback" option in the "Comment,Trackback" settings). With my patch, such trackbacks will now just be rejected...

Trackback SPAM is a problem. It's such a big problem for weblog operators, that many decided to turn off trackback reception entirely. The problem is much bigger compared to comment spam, because comment spam is easier filtered and (in the worst case) commenters can be ushered through a CAPTCHA procedure - bad as that is by itself. But trackbackσ are meant to be automated, so we can only filter some words and moderate. Myself I have trackbacks moderated and I filter IPs of trackback spamming machines on my firewall. But I still got the annoying trackback notifications, and I still had to delete the trackbacks from the weblog (even though they would never appear).

The patch changes just one line, it raises an exception instead of setting moderation on. It will only work when the "Moderate No-Reference Trackback" option in the "Comment,Trackback" settings is checked. But beware, this patch is drastic. There might be legitimate trackback without a reference to you, those trackbacks would never go through and you wouldn't get even a notification. If there is a human who does the trackback, he/she will get an error "Link required, suspect spam." So use at your own risk, your mileage may vary, etc. etc. You have been warned.

RCS file: /home/betabug/work/cvs/COREBlog/,v
retrieving revision 1.3
diff -u -r1.3
---    20 Mar 2006 10:50:19 -0000      1.3
+++    16 Jun 2006 08:52:02 -0000
@@ -1038,7 +1038,7 @@
                 #Check property for trackback_moderation
                 if"moderate_noreference_trackback") and \
                    not link_to_my_blog(, val['url']):
-                        post_moderation = 1
+                        raise RuntimeError,"Link required, suspect spam."

Posted by betabug at 11:11 | Comments (0) | Trackbacks (1)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< A View at Kerameikos | Main | Turtles in the National Garden >>
There are no comments.
You can trackback to:
Κόλαση με τα trackbacks

Χτες ξεκίνησαν να έρχονται τα πρώτα trackback spam σε αυτό το blog. Δεν εμφανίζονται, γιατί τα έχουμε "moderated", αλλά ενοχλούν τα μέλια που στέλνει το σύστημα. Ώρα λοιπόν για αναβάθμιση του λογισμικού. Δύσκολο; Καθόλου, έλα να δείτε πως κάνουμε αναβάθμιση σε ένα προϊόν (Product) στο Zope...

Read the linking post here: Learning Zope in Greece at June 28,2006 09:35