نصائح لمنع البريد المزعج

:bookmark: This documentation provides a comprehensive guide on preventing spam in Discourse forums, and includes information about various settings and tools designed to help maintain a spam-free community environment.

:person_raising_hand: Required user level: Administrator

On most forums spam is rare. However, if you’re having problems with spam on your site, Discourse comes with numerous tools to help you automatically prevent spam.

The following guide offers some recommendations on how you can help prevent spam, while still maintaining a positive and welcoming environment for your community.

Spam Detection with Discourse AI

AI Spam Detection is one of the best Discourse features for automated spam detection. Unlike other tools, it can automatically block users and posts based on preconfigured rules. AI Spam Detection is available to all users on Discourse hosting, and on self-hosted sites with an LLM configured.

Benefits of AI Spam Detection include:

  • Automation: No manual intervention is needed to block obvious spam.
  • Customizability: You can tailor it to your community’s unique requirements.
  • Scalability: Works well even when communities are under heavy spam attacks.
  • Broad compatibility: Free (on Discourse hosting) and budget-friendly LLMs like GPT-4, Claude 3.5, and Gemini Flash can handle spam detection effectively.

Setting up AI spam detection

:megaphone: This is now default turned on for Starter and Standard customers

Simply turn it on in Admin settings → plugins → AI → Spam Handling (details here).

By default it uses a prompt that Discourse has tailored for our sites, but you may add custom instructions specific to your site.

Example tailored prompt

:information_source: With Discourse AI you can also use the creative AI bot to generate tailored prompts that are specific to your site’s needs.

Default Trust Levels

The default trust level for new users on your site can be adjusted on the .../admin/site_settings/category/trust page, however, we recommend keeping the default trust level set to 0.

If you’ve modified the value of this setting, we strongly recommend changing it back to 0: new user, as changing this setting can put your site at serious risk for spam, due to the way that trust levels interact with Discourse’s spam related settings.

Spam Related Site Settings

:warning: Unless you are specifically having trouble with spam, we recommend keeping the following settings at their default values.

Discourse has several spam related site settings that you can access on your site’s .../admin/site_settings/category/spam page.

These settings can be adjusted to increase or decrease the sensitivity of spam detection, and the strictness of the consequences associated with posting spam.

The following are some of the more commonly adjusted spam related settings that have a notable impact on how spam is handled on a site.

The default values for all settings are shown below.

Hiding Posts

The hide post sensitivity and cooldown minutes after hiding posts settings control the likelihood that a flagged post will be automatically hidden by Discourse, and how long a user must wait before they can edit a flagged and hidden post.

Silencing New Users

Discourse has a num users to silence site setting, which will automatically silence a new user if they receive a certain number of spam flags.

By default this is set to 3, so you may want to consider lowering this if you’re consistently having problems with spam coming from the same user(s).

Limiting Links

Discourse limits the number of posts a new user can make that contain links to an outside domain with the newuser spam host threshold setting. If new users on your site are frequently spamming links to the same domain, you may want to consider lowering the value of this setting.

Limiting IP Addresses

Discourse limits the number of new accounts a user can make from any given IP address. If you’re finding that problematic users on your site are repeatedly creating accounts to spam your site, you could consider lowering this from the default value.

There’s also a flag sockpuppets checkbox that you can enable to prevent users from creating multiple accounts and then commenting on the same topic:

Additionally, you can manually look up the IP addresses of problematic users on their admin page under the Last IP Address and Registration IP Address fields, and delete other accounts associated with the same IP address.

Or consider blocking IP addresses that spammers are using on the “Logs → Screened IPs” page (.../admin/logs/screened_ip_addresses):

Adjusting Flag Requirements

By default, a topic needs to be flagged by 5 unique users before Discourse will automatically suspending posting to that topic.

You can adjust the num flaggers to close topic site setting to raise or lower the number of flaggers required to suspend posting on a topic, and adjust the auto close topic sensitivity setting to change the likelihood that the topic in question will get automatically closed instead.

Watched Words

Watched Words are another great feature for helping block or limit posts that contain words, phrases, or URL links that spammers might be repeatedly using.

Considering adding some “Blocked” or “Silence” Words to your site if you’re finding that spammers are frequently using the same types of text in their posts.

For a more advanced use of Watched Words, you could also consider Using Regex with Watched Words.

Increase Trust Level Requirements

If you’re finding that spam is coming mainly from TL0 users, you may also want to adjust some of the trust level settings to make it harder to get to TL1:

hCaptcha Plugin

The Discourse hCaptcha plugin aims to enhance security and bot protection by integrating hCaptcha into the local sign-up form.

:sparkles: On all Discourse hosted sites, this plugin is automatically included.

Additional Steps

It’s important to understand why users are spamming your site. Are they’re bored, malicious, or looking to promote themselves?

Suggestions for dealing with The Difficult User, along with a variety of other moderation topics can be found in our Discourse Moderation Guide, so you may want to read through this guide for some additional ideas regarding moderating your site.

Outside of the above, ramping up your moderation team for the short term, so that you have full coverage is another good approach to combatting spam. The key is to wear the problem users down so they get bored and move on.

If you’re continually having problems with spam after going through this guide, you could also consider placing all or some posts from new users into the review queue with the approve post count, approve unless trust level, or approve new topics unless trust level settings:

However, it’s important to make sure you have enough moderators at hand to handle this, as this can have the potential make it difficult for new users to start interacting with the site if posts go unapproved.

Last edited by @Saif 2025-03-13T15:11:05Z

Check documentPerform check on document:
17 إعجابًا

لا يمكنني التحدث نيابة عن جميع المنتديات، ولكن في المنتدى الذي كنت فيه كـ TL3، كان هناك منشور واحد على الأقل من البريد العشوائي لا يزال معروضًا عندما سجلت الدخول لأول مرة في اليوم في الفئات التي أراقبها. والمنتدى الذي أنا مشرف عليه حاليًا، نتلقى ما معدله منشورين تقريبًا من البريد العشوائي يوميًا. لذلك أعتقد أنه شائع إلى حد ما في العديد من المنتديات بناءً على ذلك.

5 إعجابات

أحد التعبيرات النمطية المفيدة جدًا هو \\d{3}-\\d{4}|[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+ والذي يحظر عناوين البريد الإلكتروني وأرقام الهواتف. لا تنس تمكين الإعدادات - النشر - “التعبيرات النمطية للكلمات المراقبة”.

7 إعجابات

أهلاً :wave:

لقد كنت أستفيد بشكل كبير من هذه النصائح في منتدى الخاص بي، لذا… شكراً لك! :heart:

هل هناك إعداد يمكن تفعيله يرسل فقط المستخدمين الجدد الذين يسجلون من نطاق gmail.com، إلى قائمة المراجعة؟

حاليًا، يتم إرسال جميع المستخدمين الجدد إلى القائمة للمراجعة، ولكني وجدت أن غالبية المستخدمين المزعجين هم أولئك الذين تم إنشاؤهم باستخدام بريد إلكتروني من Gmail. إرسال هؤلاء فقط إلى قائمة المراجعة سيقلل العبء ووقت المراجعة، بالنسبة لي على الأقل :sweat_smile:

إعجاب واحد (1)

@SaraDev هل تعرفين ما إذا كان هذا ممكنًا؟ سأحب أن أعرف أيضًا حيث سيكون ذلك مفيدًا جدًا لحظر ليس فقط عناوين IP ولكن أيضًا نطاقات محددة!

إعجاب واحد (1)

لا توجد ميزة أساسية في Discourse لإرسال المنشورات من مستخدمين بنطاق معين فقط (مثل gmail.com) إلى قائمة المراجعة.

الميزة الأكثر صلة هي إعداد الموقع auto approve email domains (الموافقة التلقائية على نطاقات البريد الإلكتروني)، والذي يسمح لنطاقات بريد إلكتروني معينة بتجاوز عملية الموافقة اليدوية للمستخدمين عن طريق الموافقة تلقائيًا على المستخدمين من تلك النطاقات.

هناك أيضًا إعدادات لـ blocked email domains (نطاقات البريد الإلكتروني المحظورة) و allowed email domains (نطاقات البريد الإلكتروني المسموح بها) التي توفر طريقة لتقييد أو التحكم في من يمكنه التسجيل في موقعك بناءً على نطاقات بريدهم الإلكتروني:

ومع ذلك، تتطلب كل هذه الإعدادات تمكين إعداد must approve users (يجب الموافقة على المستخدمين)، وتؤثر فقط على المستخدمين الذين يسجلون في موقع لأول مرة، ولا تؤثر على التفاعل بين إنشاء المنشورات وقائمة المراجعة.

كحل بديل، يمكنك استخدام Groups (المجموعات) لتحقيق وظائف مماثلة. على سبيل المثال، يمكنك إنشاء مجموعة مخصصة وإضافة المستخدمين الذين يسجلون بعنوان بريد إلكتروني محدد تلقائيًا إلى المجموعة، ثم إضافة هذه المجموعة إلى إعداد approve unless allowed groups (الموافقة ما لم تسمح المجموعات) و approve new topics unless allowed groups (الموافقة على المواضيع الجديدة ما لم تسمح المجموعات).

مع هذا النوع من الإعداد، يمكنك تجاوز قائمة المراجعة بشكل فعال للمستخدمين الذين لديهم نطاق معين، مع الاستمرار في إرسال المنشورات الأخرى إلى قائمة المراجعة إذا رغبت في ذلك.

إعجابَين (2)

مرحباً، كنت أتساءل عما إذا كان من الممكن فرض اختبار كابتشا عند إنشاء موضوع و/أو مشاركة؟

لا أعرف، ولكن ما فائدة أن يتمكن الروبوت من تجاوز اختبار التحقق عند تسجيل الدخول؟ عندها يمكنه فعل الشيء نفسه عند النشر.

صحيح، ولكن يبدو أن هناك دعمًا لكابتشا للتسجيل، لذلك كنت أتساءل عما إذا كان الشيء نفسه موجودًا لإنشاء المواضيع/المشاركات.

لقد رأينا عددًا من العملاء يتعرضون لهجمات بريد عشوائي كبيرة مؤخرًا، وكان الشيء المشترك بينهم جميعًا هو أنهم فتحوا فئة واحدة أو أكثر لـ الجميع - إنشاء، متجاوزين جميع قيود مستوى الثقة.

بالنسبة لمسؤولي Discourse المتمرسين، من الواضح أن هذه فكرة سيئة، ولكن بالنسبة للأشخاص الأقل خبرة، فهي ليست كذلك. لذلك قد تكون فكرة جيدة توضيح ما هو (بالنسبة لنا) واضح وإضافة هذا إلى المنشور الأول للموضوع.

7 إعجابات

في الآونة الأخيرة، كنا نتعامل مع مرسلي البريد العشوائي الذين يستخدمون التسجيل التلقائي ثم يحاولون إنشاء مواضيع جديدة بمحتوى تم إنشاؤه بواسطة الذكاء الاصطناعي يبدو وكأنه طلبات نصائح حقيقية، ولكنه يتضمن روابط تابعة لأمازون. عادةً ما يقومون بإخفاء هذه الروابط باستخدام محركات مختلفة لاختصار عناوين URL. إنهم قادرون على الرد على الردود وحتى الدردشة في الرسائل الخاصة بطريقة مضحكة. هل واجه أي شخص هذا؟ أتساءل عما إذا كانت هذه المحاولات مؤتمتة بالكامل، فهل سيكون هناك العديد من منتديات Discourse المستهدفة الأخرى. هل لديك أي نصائح حول استراتيجية للتخلص منها؟

إعجاب واحد (1)

مرحباً @Overgrow،

بعض الأفكار التي يمكنك تجربتها هنا لمنع ذلك:

  • استخدم Discourse AI - AI triage لـ إعداد اكتشاف البريد العشوائي في مجتمعك لاكتشاف هذا النوع من المحتوى
  • أضف مُقصرات عناوين URL وأنماط روابط أمازون التابعة إلى قائمة الكلمات المراقبة المحظورة لديك
  • قلل من newuser spam host threshold وزد المتطلبات لـ TL1
  • قلل max new accounts per registration IP وقم بتمكين flag sockpuppets
  • استخدم Discourse hCaptcha للمساعدة في منع التسجيلات العشوائية/الذكاء الاصطناعي الآلية على موقعك.
  • ضع في اعتبارك وضع جميع محتويات المستخدمين الجدد في قائمة انتظار المراجعة حتى يتوقف الهجوم عن طريق تعديل:
    • approve post count
    • approve unless trust level
    • approve new topics unless trust level

سيكون النهج هنا مشابهًا لمنع البريد العشوائي بشكل عام، مع تركيز أكبر تحديدًا على عناوين URL المختصرة والمحتوى الذي تم إنشاؤه بواسطة الذكاء الاصطناعي.

بالنسبة لحالتك هنا، يمكنك محاولة استخدام مطالبة بالذكاء الاصطناعي للكشف عن محتوى الذكاء الاصطناعي تحديدًا مثل ما يلي:

أنت نظام للكشف عن البريد العشوائي. قم بتحليل المحتوى والسياق التالي.

ملاحظات:
- يجب أن تظل الردود ذات صلة بخيط المناقشة.
- ضع علامة SPAM إذا كان المحتوى غير ذي صلة أو ترويجيًا أو آليًا.
- ضع في اعتبارك منشورات المستخدمين الجدد التي تحتوي على روابط كبريد عشوائي محتمل ما لم تكن ذات صلة صريحة بالموضوع.

ابحث عن المحتوى الذي يبدو أصيلًا ولكنه يحتوي على أنماط غير طبيعية.
ابحث عن النصوص ذات الصياغة الغريبة، أو الرسمية المفرطة الممزوجة باللغة العامية، أو النصائح العامة التي لا تتناسب تمامًا مع السياق.
قم بتمييز المحتوى الذي يحتوي على روابط تابعة مخفية، خاصة عندما يبدو المنشور مصممًا لتوجيه توصيات المنتجات بشكل طبيعي.

انتبه بشكل خاص لهذه العلامات الحمراء:
1. المحتوى الذي يقدم نفسه كطلبات نصائح حقيقية ولكنه يحتوي على عناصر ترويجية
2. المنشورات التي تقدم مشكلة ثم تقترح منتجات محددة كحلول
3. وجود مُقصرات عناوين URL (bit.ly، tinyurl، t.co، goo.gl، إلخ) التي قد تخفي روابط تابعة
4. روابط منتجات أمازون أو إشارات إليها، خاصة مع معلمات تابعة (tag=، ref=، affiliate=)
5. المحتوى الذي يبدو أنه يطلب توصيات ولكنه يوجه بشكل خفي نحو منتجات معينة
6. نص عالي الجودة مصطنع - لغة رسمية مفرطة ممزوجة بتعبيرات عامية أو هيكل غير ملائم
7. حسابات جديدة تنشر محتوى بأي من الأنماط المذكورة أعلاه

استجب فقط بـ "SPAM" أو "NOT SPAM".
3 إعجابات

أواجه الكثير من المشاكل مع حسابات الروبوتات مؤخرًا. اضطررت إلى تعطيل تسجيل المستخدمين الجدد للمرة الثانية. بالأمس اضطررت إلى حذف حوالي 50 حساب روبوت مع حوالي 30 منشورًا غير مرغوب فيه. لقد قمت بالفعل بتمكين hcaptcha مع لغز صعب ولكنه لم يوقفهم. كنت على الإصدار 3.5.0 ولكنني قمت بالتحديث للتو إلى الإصدار 3.6.0 بعد الهجوم مباشرة. نحن بالفعل لا نسمح بالروابط في مستوى الثقة 0 ونطلب 30 منشورًا قبل السماح بالروابط، ولكن هذه المنشورات هي مجرد جدران من النصوص حول وكلاء السفر وهراء عشوائي آخر. كانت هناك أيضًا حسابات ومنشورات بالذكاء الاصطناعي تشير إلى محتوى المنتدى الفعلي ولكنها لا معنى لها تمامًا. هذه المنشورات مسلية إلى حد ما لقاعدة المستخدمين لدينا، ولكن على أي حال، لم أكن أرغب في تمكين الذكاء الاصطناعي في المنتدى ولكني أشعر أنني استنفدت جميع الخيارات الأخرى. ومع ذلك، أحصل على هذه الرسالة:

لكنني لا أرى مكانًا لإضافة هذا التكوين؟

وفوق كل ذلك، بينما قد يساعد الذكاء الاصطناعي في البريد العشوائي، لا أعتقد أن تمكين هذا سيساعد في إنشاء حسابات الروبوتات في المقام الأول أم أنني مخطئ؟

إعجاب واحد (1)

إذا تم تعيين approve post count على 1. فهل لا يزال التعديل مطلوبًا؟

بصراحة، لا أعرف الإجابة على هذا السؤال.