- "Ask the Expert" or Advice Column
- "Must Have" Modules
- A Challenge
- Books Overview
- Changing Garland - A Practical Example
- Comparison of Links and Web Links modules
- Create Simple Tables
- Creating a "Biographies" page
- Developing a Module on a Windows System
- Generic Table Display
- How to page a custom DB query
- List Users From a Single Role in a Block
- My Modules
- Announcements: Special Notices for Your Site
- Attendance Matrix
- Content Type Template
- FAQ_Ask
- Get Content Type
- Glossary
- Gotcha - Contact Spam Catcher
- Helpers
- Indexpage: summary of node type information
- Longer Node Titles
- Node Type Filter
- Quotes
- RealName: Using Profile fields to set a user's displayed name
- Register_Country
- Site Documentation Module
- Site Notes: Hidden Design or How To notes in Your Database
- Spam Tokens
- Spam Tune
- Taxonomy Browser
- Taxonomy Delegate
- Taxonomy Image: Associate Images with Taxonomy Terms
- Taxonomy List: Displaying Lists of Terms
- SBS Web Site Notes
- Searching for a New Hosting Company
- Taxonomy Tidbits
- Theming a Specific Content Type
Gotcha - Contact Spam Catcher
Submitted on Fri, 09/07/2007 - 16:57.
Gotcha is sort of a take off on "captcha." The idea was first mentioned on http://drupal.org/node/166921 as a possible way to trick spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. bots who try to use the DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. contact form. I don't particulary like the extra step humans are required to perform in these "verification" methods, and some just don't work.
The idea is simple: Basically you place a bogus input field on a contact form, and use CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page to not display it. On submission you check for a value. If there is a value entered, then that means a non-human has been blanketing form fields, and the form post can be ignored as spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites.. The spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. bot will probably never know.
Gotcha adds a field labeled "Subject" at the top of the contact form. It uses a "div" tag to render the field as "display: none" so human users shouldn't see it, and won't enter any data there. Hopefully, the suspected spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. bot will see "Subject" and be enticed to enter something there. There is descriptive text to encourage a human (whose browser might be set to display it anyway) to ignore this field.
Gotcha intercepts the contact form submission and checks the hidden field. If something is there, Gotcha simply returns to the front page and ignores the message. The attempt is logged, along with the submitter's IP address, and the suspect message is saved in the databaseA collection of data related to an application.. If the field is empty, then the message is passed on through to the contact moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. for normal processing.
Unfortunately, most of the spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. was still getting through. And most of that was a bunch of links to drugs or porn. From exerience, I knew that the Spam moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. was already good at dealing with this in comments. After browsing that moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP., I found that I could "hook" into its filters and use them to identify spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites..
All of my spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. emails stopped immediately!
Required Modules
The Gotcha moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. requires the core Contact moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. and the contributed Spam moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. (which you can also use to limit comment spamming).
Installation
Normal moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. installation procedures.
Settings
All of the settings for Gotcha are found in the Administer » SiteA logically grouped set of content - also web site. building » Contact form, under the "Settings" tab.
- Log all email - If this box is checked, all siteA logically grouped set of content - also web site.-wide Contact email will be logged in the Gotcha table. If it is not checked, only suspect emails will be logged.
- "Go Away" page: - This is the path to the page to be displayed when the message has been identified as spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites.. That message should be tactful, but forceful. When the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. is enabled, it checks to see if there is a page that is titled "Gotcha: Go Away!". If is present, that node's id will be set here. If is not found, the moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. will create a sample page and set the new page's path here. Note: It is not necessary for this pageto be in "published" status as it will be displayed anyway.
- Maximum body - The maximum size of the message's body to show in the logging list. This limits the size of the displayed list.
- Rows per Page - The number of rows to show per page in the logging list.
- Show SiteA logically grouped set of content - also web site. Name - If selected, the siteA logically grouped set of content - also web site.'s name will show in the logging list. This is useful in a multisite environment with a shared "gotcha" log.
Menu Items
Administer » Logs » Gotcha list - shows all the emails that have been logged. It has a delete linkThe technique which points to another page, anywhere on the Internet, from the current page. to allow you to clean up the table.
CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page
The moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. does implement a basic style sheet. I recommend that you not change the "gotcha_covered" style. If you use CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page compression, you may have to disable and re-enable it for this moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP..
The Future
It is my intention to work with the author of the SpamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. to integrate this functionality into that code. If, or when, that happens, I will de-commission this moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. shortly after that.
To Do List
- Build an IP address blacklist? Share with spamUnsolicited email or web site postings that are undesirable, usually containing links to other sites. moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP.?
- Expire email log after some interval?
- Do the same type of thing with comments?
- Check IP address against current list (and SpamUnsolicited email or web site postings that are undesirable, usually containing links to other sites.'s list)?
This moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. can be found at http://drupal.org/project/gotcha.



Recent comments
6 days 22 hours ago
5 weeks 5 days ago
5 weeks 5 days ago
6 weeks 4 days ago
6 weeks 5 days ago
7 weeks 6 days ago
8 weeks 11 hours ago
8 weeks 3 days ago
8 weeks 4 days ago
8 weeks 5 days ago