mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Create hidden posts for received spam emails (#6010)
* Add possibility to add hidden posts with PostCreator * FEATURE: Create hidden posts for received spam emails Spamchecker usually have 3 results: HAM, SPAM and PROBABLY_SPAM SPAM gets usually directly rejected and needs no further handling. HAM is good message and usually gets passed unmodified. PROBABLY_SPAM gets an additional header to allow further processing. This change addes processing capabilities for such headers and marks new posts created as hidden when received via email.
This commit is contained in:
committed by
Régis Hanol
parent
6e3a2197f8
commit
28dd7fb562
12
spec/fixtures/emails/spam_x_spam_flag.eml
vendored
Normal file
12
spec/fixtures/emails/spam_x_spam_flag.eml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Return-Path: <existing@bar.com>
|
||||
From: Foo Bar <existing@bar.com>
|
||||
To: category@bar.com
|
||||
Subject: This is a topic from an existing user
|
||||
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
||||
Message-ID: <32@foo.bar.mail>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
X-Spam-Flag: YES
|
||||
|
||||
Hey, this is a topic from an existing user ;)
|
||||
12
spec/fixtures/emails/spam_x_spam_status.eml
vendored
Normal file
12
spec/fixtures/emails/spam_x_spam_status.eml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Return-Path: <existing@bar.com>
|
||||
From: Foo Bar <existing@bar.com>
|
||||
To: category@bar.com
|
||||
Subject: This is a topic from an existing user
|
||||
Date: Fri, 15 Jan 2016 00:12:43 +0100
|
||||
Message-ID: <32@foo.bar.mail>
|
||||
Mime-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: quoted-printable
|
||||
X-Spam-Status: Yes, score=12.3 required=4.5
|
||||
|
||||
Hey, this is a topic from an existing user ;)
|
||||
Reference in New Issue
Block a user