# Spambots abuse Mautic Forms

**URL:** <https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316>\
**Category:** Product Support\
**Created:** [January 13, 2022, 8:04am UTC](https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316 "2022-01-13T08:04:12Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![dominikbelca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dominikbelca/32/6809_2.png) [@dominikbelca](https://forum.mautic.org/u/dominikbelca)\
**Post date:** [February 9, 2022, 12:04pm UTC](https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316/21 "2022-02-09T12:04:09Z")

</div>

Sorry, this service has the same level of problems regarding the compliance with GDPR. You only need to look on the privacy statement to find violating terms, e.g. for sharing / selling the collected data.

The other problems regarding US based services (CLOUD act, …) are the same as with Google actually.

---

<div class="post-metadata">

**Author:** ![alexhammer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/alexhammer/32/14525_2.png) [@alexhammer](https://forum.mautic.org/u/alexhammer)\
**Post date:** [June 17, 2022, 6:50am UTC](https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316/22 "2022-06-17T06:50:07Z")

</div>

This is a really nice “solution” @mrfromgermany. Even though it is not 100% safe.  
I put that in place for one of our clients as well and it works great.  
I don’t send a push notification via the bash script but i send a webhook to n8n which sends me a telegram message.  
I will make a tutorial on Youtube for that to show how it’s done.  
Until then here’s the script i wrote for that:

Save this script as bash on your server and make it executeable. I placed this script onto the server within the directory of the mautic user.

```auto
nano path/to/script/yourantispamscript.sh

```

Paste this code into it and replace everything to your needs:

```auto
#!/bin/bash
dbhost=localhost #replace with IP of DB server if necessary
dbname=mauticdatabasename #Database name
dbuser=mauticdatabaseuser #Database username
dbpass=mauticdatabasepassword #Database password

subscount=$(mysql $dbname -h $dbhost -u $dbuser -p$dbpass -se "select count(*) as number from form_submissions where date_submitted >= DATE_SUB(NOW(),INTERVAL 60 minute)")

if (( $subcount > 200 )); then
    mysql $dbname -h $dbhost -u $dbuser -p$dbpass -se "UPDATE forms SET is_published = 0";
    curl -X POST -H 'Content-type: application/json' --data '{"mauticuser":"Instancename"}' https://n8n.hartmutapp.com/webhook/7ed70c51-38b3-41c4-9d83-4487e6dbd062; #write whatever you need into the data part between the curlybrackets
fi

```

now make it executeable for the mautic user:

```auto
chown -R www-data:www-data /var/www/path/to/script
chmod -R 755 /var/www/path/to/script

```

execute the script with a cronjob:

```auto
* * * * * path/to/script/yourantispamscript.sh

```

Hope it helps someone as well. Let’s stay ahead of this problem and make Mautic safer 🙂

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [July 27, 2022, 8:53am UTC](https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316/23 "2022-07-27T08:53:27Z")

</div>

Hello Alex.

Where you able to make the video tutorials? Kindly share link.

[Previous page](https://forum.mautic.org/t/spambots-abuse-mautic-forms/22316.md?page=1)
