From: Vincent Vanwaelscappel Date: Thu, 4 May 2023 09:29:45 +0000 (+0200) Subject: wait #5909 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=468448a009ea93b13f7ca398d9442041b406da18;p=fluidbook-toolbox.git wait #5909 @0.5 --- diff --git a/app/Mail/FluidbookQuoteReceived.php b/app/Mail/FluidbookQuoteReceived.php index 8e5d2ae47..d9f642fb6 100644 --- a/app/Mail/FluidbookQuoteReceived.php +++ b/app/Mail/FluidbookQuoteReceived.php @@ -10,11 +10,17 @@ class FluidbookQuoteReceived extends Base public function setData($post) { - $this->from($post['email'], $post['prenom'] . ' ' . $post['nom']); + + $this->replyTo($post['email'], $post['prenom'] . ' ' . $post['nom']); + $this->from('tech@fluidbook.com'); $this->to('tech@fluidbook.com'); $spam = ''; if ($post['spam'] === 'Oui') { $spam = ' *** SPAM ***'; + $this->withSwiftMessage(function ($message) { + $headers = $message->getHeaders(); + $headers->addTextHeader('X-Fluidbook-SPAM', '1'); + }); } $this->subject('[Fluidbook Workshop]' . $spam . ' Demande de devis'); @@ -28,6 +34,11 @@ class FluidbookQuoteReceived extends Base $this->html($converter->convertToHtml($markdown)); } + public function build() + { + return parent::build(); + } + public static function getMarkdown($post, $footer = '') { $fields = array( diff --git a/resources/emailconfig/spamassassin-rules.cf b/resources/emailconfig/spamassassin-rules.cf index a94915e93..8cee04f9f 100644 --- a/resources/emailconfig/spamassassin-rules.cf +++ b/resources/emailconfig/spamassassin-rules.cf @@ -19,8 +19,12 @@ score BAYES_95 3.1 score BAYES_99 3.5 score BAYES_999 10.5 -# TXRep +# Workshop rules +header X_FLUIDBOOK_SPAM exists:X-Fluidbook-SPAM +describe X_FLUIDBOOK_SPAM Message has been marked as SPAM by Fluidbook +score X_FLUIDBOOK_SPAM 110.0 +# TXRep loadplugin Mail::SpamAssassin::Plugin::TxRep ifplugin Mail::SpamAssassin::Plugin::TxRep use_txrep 1