You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/08/17 09:49:19 UTC

[GitHub] [james-project] quantranhong1999 opened a new pull request, #1134: JAMES-3775 Quick rework ClamAVScan mailet

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

   Following the James <-> Rspamd <-> ClamAV integration, I would like to do a quick rework for the `ClamAVScan` mailet so we can have more deployment choices ( James <-> ClamAV).


-- 
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] chibenwa commented on a diff in pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa commented on code in PR #1134:
URL: https://github.com/apache/james-project/pull/1134#discussion_r949841961


##########
third-party/clamav/pom.xml:
##########
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

Review Comment:
   License?



-- 
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] chibenwa commented on pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1222568063

   https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1134/13/testReport/junit/org.apache.james.clamav/ClamAVScanTest/org_apache_james_clamav_ClamAVScanTest/
   
   Some ClamAV related failures (container did not startup).
   
   Can we at least increase the timeout to something large?


-- 
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] quantranhong1999 commented on pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
quantranhong1999 commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1220289710

   Rebased on master.
   > How about moving ClamAV related stuff in a dedicated third-party/clamav maven module as a separate extension?
   
   https://github.com/apache/james-project/pull/1134/commits/0a9239e8e13500990ba24b7a3483972355f85385 solves.


-- 
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] quantranhong1999 commented on a diff in pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
quantranhong1999 commented on code in PR #1134:
URL: https://github.com/apache/james-project/pull/1134#discussion_r951191636


##########
third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java:
##########
@@ -0,0 +1,50 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.clamav;
+
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.utility.DockerImageName;
+
+public class DockerClamAV {
+    private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("clamav/clamav");
+    private static final String DEFAULT_TAG = "0.105";
+    private static final int DEFAULT_PORT = 3310;
+
+    private final GenericContainer<?> container;
+
+    public DockerClamAV() {
+        this.container = new GenericContainer<>(DEFAULT_IMAGE_NAME.withTag(DEFAULT_TAG))
+            .withExposedPorts(DEFAULT_PORT);

Review Comment:
   https://github.com/apache/james-project/pull/1134/commits/71fde51d646439db4d12e312ec0504b5973b24d6



-- 
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] chibenwa commented on pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1223793344

   > Can we merge this or not then?
   
   Let's go, if it annoys us we will tag it as unstable.


-- 
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] chibenwa commented on a diff in pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa commented on code in PR #1134:
URL: https://github.com/apache/james-project/pull/1134#discussion_r951176528


##########
mailet/standard/pom.xml:
##########
@@ -46,6 +46,10 @@
             <artifactId>apache-mailet-test</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>${james.groupId}</groupId>
+            <artifactId>james-server-core</artifactId>
+        </dependency>
         <dependency>

Review Comment:
   This dependency is no longer needed



##########
third-party/clamav/src/test/java/org/apache/james/clamav/DockerClamAV.java:
##########
@@ -0,0 +1,50 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.clamav;
+
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.utility.DockerImageName;
+
+public class DockerClamAV {
+    private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("clamav/clamav");
+    private static final String DEFAULT_TAG = "0.105";
+    private static final int DEFAULT_PORT = 3310;
+
+    private final GenericContainer<?> container;
+
+    public DockerClamAV() {
+        this.container = new GenericContainer<>(DEFAULT_IMAGE_NAME.withTag(DEFAULT_TAG))
+            .withExposedPorts(DEFAULT_PORT);

Review Comment:
   Please add https://github.com/apache/james-project/pull/1139/commits/3822c62641a444c12995f18f77bb7c62095898cd
   
   ```
               .withEnv("CLAMAV_NO_FRESHCLAMD", "true")
               .withEnv("CLAMAV_NO_MILTERD", "true")
   ```



-- 
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] chibenwa merged pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa merged PR #1134:
URL: https://github.com/apache/james-project/pull/1134


-- 
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 pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
Arsnael commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1223755809

   Can we merge this or not then? 


-- 
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] chibenwa commented on pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
chibenwa commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1220740107

   ```
   Failed
   
   org.apache.james.clamav.ClamAVScanTest.org.apache.james.clamav.ClamAVScanTest
   
   12:25:24.094 [ERROR] ?.105] - Could not start container
   org.testcontainers.containers.ContainerLaunchException: Timed out waiting for container port to open (localhost ports: [49623] should be listening)
   
   12:25:24.129 [ERROR] ?.105] - Log output from the failed container:
   Starting ClamAV
   LibClamAV Warning: **************************************************
   LibClamAV Warning: ***  The virus database is older than 7 days!  ***
   LibClamAV Warning: ***   Please update it as soon as possible.    ***
   LibClamAV Warning: **************************************************
   ```
   
   On my checklist: ensure that the clamAV virus database do not get refreshed every time the clamAV container starts...


-- 
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] vttranlina commented on pull request #1134: JAMES-3775 Quick rework ClamAVScan mailet

Posted by GitBox <gi...@apache.org>.
vttranlina commented on PR #1134:
URL: https://github.com/apache/james-project/pull/1134#issuecomment-1219035608

   read it


-- 
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