Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

spamaway

1,332 sites Security covered
View on drupal.org

When Antibot & Honeypot aren't sufficient and you don't want those in your face anti spam captchas, this is the module for you!

What is it?

This module was created because Antibot/honeypot were still being bypassed thus we created an extra anti spam measure for webforms. Although it can be used standalone, it is still advised to use this module as an extra measure, next to other modules like antibot/honeypot.

What does it do?

It will mark webform submissions as spam:

  • By analysing text of previous submissions and rating it by similarity. A similarity threshold is then used to decide if a submission is considered spam or not.
  • Limit these similar submissions within a configurable period of time
  • Limit submissions from the same IP within a configurable period of time

How can I use/add this?

This module provides a webform handler.
Thus adding this handler to your webform and configuring it properly will most likely eliminate spam attacks.

Notes

  • Query limit has a hard limit of 200!, setting it any higher won't have any effect. This is done for performance reasons
  • Warning: this will handle SPAM attacks, but it doesn't eliminate SPAM 100%.
    What does this mean? It can happen that one, two, three (depending on your settings) SPAM submissions get through before the code kicks in.

More information/descriptions about the configuration options can be found in the field descriptions in the handler configuration form.

Auto add this handler to new webforms

/**
 * Implements hook_ENTITY_TYPE_insert().
 */
function MY_HOOKY_webform_insert(WebformInterface $webform) {
  /** @var \Drupal\webform\Plugin\WebformHandlerManagerInterface $handler_manager */
  $handler_manager = \Drupal::service('plugin.manager.webform.handler');
  // Create webform handler.
  $handler_configuration = [
    'id' => 'spamaway_anti_spam_forms',
    'label' => 'SpamAway - Anti spam handler',
    'handler_id' => 'spamaway_anti_spam_handler',
    'status' => 1,
    'weight' => 0,
    'settings' => [],
  ];
  $handler = $handler_manager->createInstance('spamaway_anti_spam_forms', $handler_configuration);
  // Must set original id so that the webform can be resaved.
  $webform->setOriginalId($webform->id());
  // Add webform handler which triggers Webform::save().
  $webform->addWebformHandler($handler);
}

Supporting organizations

  • Federal Police Belgium

Activity

Total releases
4
First release
Apr 2025
Latest release
5 months ago
Release cadence
62 days
Stability
75% stable

Release Timeline

Releases

Version Type Release date
2.0.3 Stable Oct 20, 2025
2.0.2 Stable Oct 14, 2025
2.0.x-dev Dev Apr 18, 2025
2.0.1 Stable Apr 18, 2025