I got 700 Newsletter subscribers per day for my site, the subscriber name and email id not relevant. What is the possible way to prevent. I think these are all spam accounts.
4 Answers
You can use newsletter subscription confirmation feature in Magento. Enable this from:
admin-login >> System >> Configuration >> Customer >> Newsletter >> select Yes from Need to confirm drop-down option.
I hope this will help you.
-
Please accept or vote this answer if it really helpful to you.– NitsCommented Apr 27, 2016 at 12:42
-
Enabling confirmation is the best way to go. Magento should enable by default this option. Many websites have this option disabled and someone can create a script to fill in the [newsletter_subscriber] table with thousands of rows very short. Even I am using this option I am checking frequently Apache log for those who are subscribing for real or fake. There are still a lot of fake requests 20 - 50 per day. I am banning those IP's for 7 days. If you are interested check your Apache access log for this string 'POST /newsletter/subscriber/new'. Also mail.log will record sending and receiving. Commented May 3, 2017 at 12:38
Also you can add captcha if you don't want to use subscription confirmation.
-
I agree, captcha will block creating new rows in [newsletter_subscriber] table. Using subscription confirmation will not prevent creating new rows, but you can see in your Backend any subscription Status as "Not Activated". Then you can delete easy lots of rows in a minute after 1 - 2 days of changing of status. Commented May 3, 2017 at 12:44
My favorite solution is a free extension: https://github.com/magento-hackathon/HoneySpam
About Hackathon Magento Honey Spam
This Magento Extension adds a field which is hidden with JavaScript to the Customer Register and the Product Review Form which looks like the URL Field of a Wordpress Comment Form. If this field gets filled and the Form is send, there appears a error message and nothing will be saved.
There is also a check if this form is too fast transmitted, a human normally takes a couple of Seconds or more.
You can enable and disable the functionalities or set the time how long it should take to transmit this forms in the Magento Admin Backend.
Freshly added: Regex-checking on all input-fields to determine a loose index for spam-level. It is not the most accurate thing at all, but it may prevent the low-end spam ("broadband spam"). You also can enable/disable this feature in the backend and set a maximum spam index trust level.
An additional method to asking confirmation from your subscribers is banning those IP's which are passing fake subscriptions for a period of time let's say 7 days. Use fail2ban which is a great tool, here is how you will identify a fake subscription in your webserver access log:
POST /newsletter/subscriber/new/ HTTP/1.1" 302 570 "h t t p://mydomain.com/" "Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
It is clear to me this is a bot, in the last two days there are 200 lines into my log with the same content coming from different IP's. This is the part to use with fail2ban to create a new jail: POST /newsletter/subscriber/new/ HTTP/1.1" 302 570. Just grep your logs for this string and see what is happening :)
PS - stackexchange did not allow h t t p without spaces above.