Trac is nice and simple and clean and “suits me well” for now. I was able to quickly add custom fields and use them on the front page of my tracker. And it supports the ability for anyone to anonymously add a new ticket, which is the Holy Grail of getting feedback. But getting feedback includes getting spammed. I was getting a few spam tickets every minute, making things unusable. How to fix?

TracSpam to the rescue. It’s built in to trac, but it required some tweaking…

  1. Install trac
  2. Add this to trac.ini to make sure TracSpam is completely enabled, and restart apache (required). I would remove any other tracspamfilter lines.
    [components]
    tracspamfilter.* = enabled
  3. Log in as admin.
  4. From the Admin -> Permissions page, add the TICKET_CREATE action to the anonymous subject.  Crazy, but I’ve gotten spam captured pretty well enough to make this work.
  5. Select Spam Filtering -> Capture, and make sure [x] Enabled is checked, and captcha type is Recaptcha.
  6. Go to Google reCAPTCHA and get some keys for your site.  Add them on the Capture admin page (and save them somewhere else).
  7. Select Spam Filtering -> Configuration, and enable “logging” purged after 1 day – this should probably be called “monitoring” – you’ll now get feedback on the Spam Filtering -> Monitoring page.
  8. Take a look at the karma settings on Spam Filtering -> Configuration.

    Here’s what I found to be important:

    No matter what I did, I could not seem to be able to get the recaptcha to display when adding tickets.
    Eventually I was able to test things out because for some reason, I discovered that the BlogSpam service was marking me as spam.
    So I set BlogSpam karma high enough to force my anonymous tickets to be marked as spam.
    I set CaptchaSystem karma slightly higher than BlogSpam to get me past it on a bad score.
    I used a clean machine with no cookies to try to create an anonymous ticket.  No Recaptcha was displayed when entering the ticket.
    After hitting Submit, the BlogSpam score marked it as spam, and THEN trac displayed the recaptcha.
    I entered the recaptcha correctly, and the ticket was added.

    So it appears that a ticket is created anonymously, then the spam score is generated, then if it’s spam, the recaptcha is displayed, then spam is recalced, then the ticket is added or rejected.  Even if the recaptcha is done correctly, the ticket will be rejected if the karma doesn’t increase enough.

  9. With this information, you should now be able to tweak Spam Filtering -> Configuration to get the job done.  It may take some monitoring to see what kind of scores you are seeing.  You also want to create some anonymous test tickets from some “good” IPs and make sure they get through.
  10. I would lean heavily on the Akismet score – if Akismet says it’s spam, I mark it as spam even if recaptcha succeeds.  And why not make them fill out the recaptcha to find out?  Ha, die spammer die.
  11. Don’t give too much karma to the SessionFilterStrategy.  If you browse twice from the same site, you’re in a trac session, which means you’ll get a third of the karma from this one.  Keep it low.
  12. I ended up setting the recaptcha score high enough to make up for 3 other filter failures, but not 4.
  13. Note that if you want to clear out the monitoring page, and you have tons of spam entries like I did, rework the url to show more tickets per page:
    (yourtracsite)/admin/spamfilter/monitor?num=500

So far so good.  It’s so nice to crush spam, isn’t it!?  🙂

27 Comments

  1. m says:

    Still going strong, 250 spam attempts every day, all rejected as spam, and no false positives yet.

    UPDATE: two spam tickets snuck through. Very manageable with my script to remove blocks of tickets.

  2. m says:

    UPDATE: after a month or so, Bayesian filtering is now updated and completely stopping ALL SPAM, YAY. I haven’t had much in the way of real new tickets yet. To be continued.

  3. yomguy says:

    Thanks a lot for these infos. It helped me a lot to tune my trac spam filter.

  4. m says:

    UPDATE: I upgraded to trac 1.0.1 and lost TracSpamFilter functionality. See the latest blog post for what I did to fix it up.

  5. Wow, this post is good, my younger sister is analyzing these kinds of things,
    thus I am going to inform her.

    my blog … beauty skin product (http://www.godinhearts.com/beautiful-skin-beautiful-body/)

  6. Heya i’m for the first time here. I came across
    this board and I find It truly useful & it helped me
    out a lot. I hope to give something back and help others like you helped me.

    my web blog … life extension skin restoring ceramides

  7. Whats up very nice website!! Guy .. Beautiful .. Wonderful ..
    I will bookmark your website and take the feeds additionally?
    I am satisfied to seek out so many useful info right here in the publish, we’d
    like work out more techniques in this regard, thanks for sharing.
    . . . . .

    Feel free to surf to my blog post lose weight fast diet

  8. Good day! I know this is somewhat off topic but I was wondering if you knew where I
    could find a captcha plugin for my comment form? I’m
    using the same blog platform as yours and I’m having trouble finding one?
    Thanks a lot!

    Feel free to visit my web page :: gnc testosterone booster

  9. Quality articles or reviews is the key to be a focus for the people to visit the web page,
    that’s what this web site is providing.

    Also visit my web blog; Digital money path
    income (http://www.ostlist.com)

  10. These are actually great ideas in regarding blogging. You have touched some nice
    points here. Any way keep up wrinting.

    my homepage http://endurosblog.net (http://www.rebelmouse.com)

  11. www.wat.tv says:

    Douloureux,animé réglage entre faciliter valeur R?ves pirater un compte facebook gratuitement et facilement.
    récrire entre et comment créer un compte facebook pour association.

  12. Armando says:

    Hi there! I’m at work browsing your blog from
    my new iphone 4! Just wanted to say I love rezding
    your blog and lookk forward to all your posts!

    Carry on the fantastic work!

    Feel free to surf to my blog post; make money online andd work from home [Armando]

  13. Awesome issues here. I’m very glad to see your article.
    Thank you so much and I’m looking ahead to touch you.

    Will you kindly drop me a e-mail?

    my web page mri hsp active

  14. Appreciating the time and effort you put into your site and in depth information you provide.
    It’s great to come across a blog every once in a while that isn’t
    the same out of date rehashed information. Wonderful read!
    I’ve bookmarked your site and I’m adding your RSS feeds to my Google
    account.

    my website; order tonaderm

  15. Thank you for sharing your info. I really appreciate your efforts and I will be waiting for your next post thanks once again.

    Have a look at my website … Garcinia Cambogia Slim [http://www.surrenderat20.net/2012/08/a-free-mundo-ringtone-and-something-for.html]

  16. hello there and thank you for your information – I’ve certainly
    picked up anything new from right here. I did however expertise
    some technical issues using this site, since I experienced to reload the site
    lots of times previous to I could get it to load properly.

    I had been wondering if your web host is OK? Not that I’m complaining, but slow loading instances times will very frequently
    affect your placement in google and could damage your quality score if advertising and marketing with Adwords.

    Anyway I’m adding this RSS to my email and can look out for much more
    of your respective exciting content. Ensure that you update this
    again very soon.

    Here is my web page :: Colon Cleanse Complete And Garcinia HCA, http://Www.Sieumaukimdung.Com,

  17. I savour, lead to I found just what I was having a look for.
    You have ended my 4 day lengthy hunt! God Bless you man. Have a great day.
    Bye

    Feel free to visit my webpage; get ripped fast

  18. Hello! I could have sworn I’ve been to this site before but after browsing through some of the post
    I realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll
    be bookmarking and checking back often!

    Feel free to surf to my site – protein powder

  19. Hi there, I do believe your blog could possibly be having web browser compatibility issues.
    Whenever I take a look at your website in Safari, it looks
    fine however, if opening in Internet Explorer, it’s got some overlapping issues.
    I merely wanted to provide you with a quick heads up! Other than that, excellent website!

  20. It’s perfect time to make a few plans for the longer term and it’s time to be happy.
    I have learn this post and if I may I want to suggest you some fascinating issues
    or advice. Maybe you can write next articles relating
    to this article. I want to read even more things approximately it!

  21. Right here is the perfect web site for anybody who
    really wants to understand this topic. You realize so much its almost hard to argue with you (not that I actually
    will need to…HaHa). You certainly put a fresh spin on a subject that has been discussed for decades.
    Great stuff, just excellent!

  22. Lilly says:

    Hi! I understand this is somewhat off-topic however I needed to ask.
    Does operating a well-established blog such
    as yours require a lot of work? I am brand new to blogging but I do
    write in my journal on a daily basis. I’d like to start a blog so I can share my personal experience
    and feelings online. Please let me know if you have any recommendations or tips for new aspiring
    blog owners. Thankyou!

  23. You have made some decent points there. I checked on the internet for additional information about the issue and found most people
    will go along with your views on this web site.

  24. A fascinating discussion is worth comment. I do think that you ought to
    publish more about this subject, it might not be a taboo matter but generally people don’t talk
    about such issues. To the next! Cheers!!

  25. Howdy this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.

    I’m starting a blog soon but have no coding skills so I wanted to get
    advice from someone with experience. Any help would
    be enormously appreciated!

  26. I do not know if it’s just me or if perhaps everybody else experiencing problems with your
    blog. It appears like some of the text within your content are running off the
    screen. Can somebody else please comment and let me know if this is happening to them as well?

    This could be a issue with my internet browser because I’ve had this happen before.
    Thank you

    my web-site: Massive Vitality

Leave a Reply