Jump to content

Delete spam messages Prestashop 1.6


PrestaSam

Recommended Posts

Hi,

 

Our shop was spammed by some Chinese spam bot (messages from qq.com) via the contact form. I managed to stop it by deleting the specific contact it was sent to.

 

But in the last 3 days more than 130.000 messages were sent and I need to delete them. Prestashop allows only a view with 1000 messages to delete at once. It's cost me hours...

 

Does somebody know how to delete all messages at once? You would really help me a lot.

Link to comment
Share on other sites

  • 1 year later...

I you are familiar in PHP you can make script - something like:

$id_customer_thread = SELECT id_customer_thread FROM ps_customer_thread WHERE email LIKE '%qq.com';

then

DELETE FROM ps_customer_message where id_customer_thread = ".$id_customer_thread."

DELETE FROM ps_customer_thread where id_customer_thread = ".$id_customer_thread."

This script is not complete.

Link to comment
Share on other sites

If you only delete in database, it should not resolve your problem 100%. What is after deleting the spam emails, then tomorrow it should back again?

 

I think you should do two things:

1. In contact form: You should add a captcha option to avoid spam.

2. Delete all the old spam message.

You can use this SQL command to delete all of them: 

DELETE FROM ps_customer_thread WHERE email LIKE '%qq.com';

 

becareful if your db have another prefix, you should replace "ps_" to your prefix.

 

 

Hope this help!

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...