You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2023/09/28 12:25:44 UTC

[GitHub] [james-project] chibenwa opened a new pull request, #1741: RspamdListener configuration to not report added

chibenwa opened a new pull request, #1741:
URL: https://github.com/apache/james-project/pull/1741

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] RspamdListener configuration to not report added [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #1741:
URL: https://github.com/apache/james-project/pull/1741


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] Arsnael commented on a diff in pull request #1741: RspamdListener configuration to not report added

Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on code in PR #1741:
URL: https://github.com/apache/james-project/pull/1741#discussion_r1340851556


##########
server/container/guice/mailbox/src/test/java/org/apache/james/modules/mailbox/MailboxListenersLoaderImplTest.java:
##########
@@ -118,6 +118,37 @@ void configureShouldAddMailboxListenersWhenConfigurationIsGood() throws Exceptio
         assertThat(eventBus.registeredGroups()).containsExactly(NoopMailboxListener.GROUP);
     }
 
+    @Test
+    void configurationShouldBeOptional() throws Exception {
+        XMLConfiguration configuration = toConfigutation("<listeners>" +
+                    "<listener>" +
+                        "<class>org.apache.james.modules.mailbox.ConfiguredListener</class>" +
+                    "</listener>" +
+                "</listeners>");
+
+        testee.configure(configuration);
+
+        assertThat(ConfiguredListener.value).isNull();
+    }
+
+    @Test
+    void configurationShouldBeTakenIntoAccount() throws Exception {
+        ConfiguredListener.value = "v1";
+
+        XMLConfiguration configuration = toConfigutation("<listeners>" +
+                    "<listener>" +
+                        "<class>org.apache.james.modules.mailbox.ConfiguredListener</class>" +
+                        "<configuration>" +
+                            "<value>v2</value>>" +

Review Comment:
   ```suggestion
                               "<value>v2</value>" +
   ```



##########
third-party/rspamd/README.md:
##########
@@ -210,4 +213,31 @@ The scheduled task will have the following type `FeedHamToRspamdTask` and the fo
   "timestamp": "2007-12-03T10:15:30Z",
   "type": "FeedHamToRspamdTask"
 }
+```
+
+#### Use live reporting
+
+Alternatively, ham/spam can be reported by using a mailbox listener. To do so enable `RspamdListener` within `listeners.xml`
+configuration file:
+
+```xml
+<listeners>
+    <listener>
+        <class>org.apache.james.rspamd.RspamdListener</class>
+        <async>true</async>
+    </listener>
+</listeners>
+```
+
+Note that you can turn off `reportAdded` (which reports incoming messages as Ham) resulting in lesser work:
+
+
+
+```xml
+<listeners>
+    <listener>
+        <class>org.apache.james.rspamd.RspamdListener</class>
+        <async>true</async>
+    </listener>
+</listeners>

Review Comment:
   Wrong copy/paste? I don't see anything listener configuration reportAdded related :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org