[jira] [Resolved] (JAMES-2254) Introduce RPM packaging

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/JAMES-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat resolved JAMES-2254.
---
Resolution: Fixed

merged

> Introduce RPM packaging
> ---
>
> Key: JAMES-2254
> URL: https://issues.apache.org/jira/browse/JAMES-2254
> Project: James Server
>  Issue Type: Improvement
>Reporter: Raphaël Ouazana
>
> Such a Debian, we should introduce RPM packaging.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Closed] (JAMES-2254) Introduce RPM packaging

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/JAMES-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat closed JAMES-2254.
-

> Introduce RPM packaging
> ---
>
> Key: JAMES-2254
> URL: https://issues.apache.org/jira/browse/JAMES-2254
> Project: James Server
>  Issue Type: Improvement
>Reporter: Raphaël Ouazana
>
> Such a Debian, we should introduce RPM packaging.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Resolved] (MAILBOX-322) Diagnose ghost mailbox

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAILBOX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat resolved MAILBOX-322.

Resolution: Fixed

merged

> Diagnose ghost mailbox
> --
>
> Key: MAILBOX-322
> URL: https://issues.apache.org/jira/browse/MAILBOX-322
> Project: James Mailbox
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: master
>Reporter: Tellier Benoit
>
> Ghost mailbox bug definition:
> At Linagora, for unknown reasons, once in a while, mailbox path based mailbox 
> read misses for existing mailboxes. For JMAP system mailboxes, provisioning 
> will re-create and overrides these mailboxes as well, leading to disappearing 
> content.
> We observed this behaviour in our production system, however, we did not 
> succeed to reproduce it yet, nor have strong certitudes on the origin.
> We need tools for auditing that production system.
> A dedicated structured logger can be added. It will report all mailbox 
> operation (create, delete, rename and read) as well as missed reads. That 
> will allow diagnosing "ghost mailboxes" as well as review the patterns 
> leading to it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Closed] (MAILBOX-322) Diagnose ghost mailbox

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAILBOX-322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat closed MAILBOX-322.
--

> Diagnose ghost mailbox
> --
>
> Key: MAILBOX-322
> URL: https://issues.apache.org/jira/browse/MAILBOX-322
> Project: James Mailbox
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: master
>Reporter: Tellier Benoit
>
> Ghost mailbox bug definition:
> At Linagora, for unknown reasons, once in a while, mailbox path based mailbox 
> read misses for existing mailboxes. For JMAP system mailboxes, provisioning 
> will re-create and overrides these mailboxes as well, leading to disappearing 
> content.
> We observed this behaviour in our production system, however, we did not 
> succeed to reproduce it yet, nor have strong certitudes on the origin.
> We need tools for auditing that production system.
> A dedicated structured logger can be added. It will report all mailbox 
> operation (create, delete, rename and read) as well as missed reads. That 
> will allow diagnosing "ghost mailboxes" as well as review the patterns 
> leading to it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[2/2] james-project git commit: JAMES-2254 Introduce RPM packaging

2017-12-15 Thread aduprat
JAMES-2254 Introduce RPM packaging


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/a7959458
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/a7959458
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/a7959458

Branch: refs/heads/master
Commit: a7959458f4a7605544209ebfcc1ec8a3a147e50b
Parents: eeca3b5
Author: Raphael Ouazana 
Authored: Thu Dec 7 15:08:41 2017 +0100
Committer: Antoine Duprat 
Committed: Fri Dec 15 16:53:09 2017 +0100

--
 README.adoc |  14 +-
 dockerfiles/packaging/Dockerfile|  24 
 dockerfiles/packaging/debian/Dockerfile |  21 ---
 dockerfiles/packaging/debian/james.postinst |  11 --
 dockerfiles/packaging/debian/james.prerm|   5 -
 dockerfiles/packaging/debian/james.service  |  36 -
 dockerfiles/packaging/debian/package.sh |  42 --
 .../etc/james/templates/cassandra.properties|   6 -
 .../package/etc/james/templates/dnsservice.xml  |  29 
 .../package/etc/james/templates/domainlist.xml  |  28 
 .../james/templates/elasticsearch.properties|  42 --
 .../package/etc/james/templates/imapserver.xml  |  54 ---
 .../package/etc/james/templates/jmap.properties |  13 --
 .../package/etc/james/templates/jmx.properties  |  28 
 .../package/etc/james/templates/jwt_publickey   |   3 -
 .../package/etc/james/templates/lmtpserver.xml  |  41 --
 .../package/etc/james/templates/logback.xml |  30 
 .../etc/james/templates/mailetcontainer.xml | 144 ---
 .../etc/james/templates/mailrepositorystore.xml |  34 -
 .../etc/james/templates/managesieveserver.xml   |  65 -
 .../package/etc/james/templates/pop3server.xml  |  42 --
 .../package/etc/james/templates/quota.xml   |  53 ---
 .../james/templates/recipientrewritetable.xml   |  26 
 .../package/etc/james/templates/smtpserver.xml  | 105 --
 .../etc/james/templates/usersrepository.xml |  26 
 .../etc/james/templates/webadmin.properties |  41 --
 .../packaging/debian/package/usr/lib/.gitkeep   |   0
 .../debian/package/usr/share/james/.gitkeep |   0
 .../debian/package/var/lib/james/.gitkeep   |   0
 .../debian/package/var/log/james/.gitkeep   |   0
 dockerfiles/packaging/james.postinst|   6 +
 dockerfiles/packaging/james.rpm.postinst|   8 ++
 dockerfiles/packaging/james.rpm.postremove  |   7 +
 dockerfiles/packaging/james.rpm.postupgrade |   5 +
 dockerfiles/packaging/james.service |  34 +
 dockerfiles/packaging/package.sh|  61 
 .../etc/james/templates/cassandra.properties|   6 +
 .../package/etc/james/templates/dnsservice.xml  |  29 
 .../package/etc/james/templates/domainlist.xml  |  28 
 .../james/templates/elasticsearch.properties|  42 ++
 .../package/etc/james/templates/imapserver.xml  |  54 +++
 .../package/etc/james/templates/jmap.properties |  13 ++
 .../package/etc/james/templates/jmx.properties  |  28 
 .../package/etc/james/templates/jwt_publickey   |   3 +
 .../package/etc/james/templates/lmtpserver.xml  |  41 ++
 .../package/etc/james/templates/logback.xml |  30 
 .../etc/james/templates/mailetcontainer.xml | 144 +++
 .../etc/james/templates/mailrepositorystore.xml |  34 +
 .../etc/james/templates/managesieveserver.xml   |  65 +
 .../package/etc/james/templates/pop3server.xml  |  42 ++
 .../package/etc/james/templates/quota.xml   |  53 +++
 .../james/templates/recipientrewritetable.xml   |  26 
 .../package/etc/james/templates/smtpserver.xml  | 105 ++
 .../etc/james/templates/usersrepository.xml |  26 
 .../etc/james/templates/webadmin.properties |  41 ++
 dockerfiles/packaging/package/usr/lib/.gitkeep  |   0
 .../packaging/package/usr/share/james/.gitkeep  |   0
 .../packaging/package/var/lib/james/.gitkeep|   0
 .../packaging/package/var/log/james/.gitkeep|   0
 59 files changed, 963 insertions(+), 931 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/README.adoc
--
diff --git a/README.adoc b/README.adoc
index 3768040..321cff8 100644
--- a/README.adoc
+++ b/README.adoc
@@ -351,13 +351,13 @@ Where :
 - SHA1: is the given git SHA1 of the james-project repository to merge.
 - RESULTING_BRANCH: is the branch created when merging.
 
-=== Generating a debian package for James
+=== Generating a package for James
 
-You can generate a debian package for James by using the following process.
+You can generate a deb package and an RPM package for 

[1/2] james-project git commit: JAMES-2254 Introduce RPM packaging

2017-12-15 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master eeca3b563 -> a7959458f


http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/dockerfiles/packaging/package/etc/james/templates/managesieveserver.xml
--
diff --git 
a/dockerfiles/packaging/package/etc/james/templates/managesieveserver.xml 
b/dockerfiles/packaging/package/etc/james/templates/managesieveserver.xml
new file mode 100644
index 000..7b0b85a
--- /dev/null
+++ b/dockerfiles/packaging/package/etc/james/templates/managesieveserver.xml
@@ -0,0 +1,65 @@
+
+
+ 
+
+ 
+
+
+
+
+   
+
+ managesieveserver
+
+ 0.0.0.0:4190
+
+ 200
+
+ 
+   
+   file://conf/keystore
+   james72laBalle
+   org.bouncycastle.jce.provider.BouncyCastleProvider
+   
+   SunX509
+ 
+ 
+
+360
+
+
+0
+ 
+
+0
+0
+true
+  
+   
+
+
+
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/dockerfiles/packaging/package/etc/james/templates/pop3server.xml
--
diff --git a/dockerfiles/packaging/package/etc/james/templates/pop3server.xml 
b/dockerfiles/packaging/package/etc/james/templates/pop3server.xml
new file mode 100644
index 000..df8fbef
--- /dev/null
+++ b/dockerfiles/packaging/package/etc/james/templates/pop3server.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+pop3server
+0.0.0.0:110
+200
+
+
+file://conf/keystore
+james72laBalle
+
org.bouncycastle.jce.provider.BouncyCastleProvider
+
+1200
+0
+0
+
+
+
+
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/dockerfiles/packaging/package/etc/james/templates/quota.xml
--
diff --git a/dockerfiles/packaging/package/etc/james/templates/quota.xml 
b/dockerfiles/packaging/package/etc/james/templates/quota.xml
new file mode 100644
index 000..70162e0
--- /dev/null
+++ b/dockerfiles/packaging/package/etc/james/templates/quota.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+default
+
+
+cassandra
+
+
+cassandra
+
+
+store
+
+
+event
+
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/dockerfiles/packaging/package/etc/james/templates/recipientrewritetable.xml
--
diff --git 
a/dockerfiles/packaging/package/etc/james/templates/recipientrewritetable.xml 
b/dockerfiles/packaging/package/etc/james/templates/recipientrewritetable.xml
new file mode 100644
index 000..3d44578
--- /dev/null
+++ 
b/dockerfiles/packaging/package/etc/james/templates/recipientrewritetable.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+  true
+  10
+
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/a7959458/dockerfiles/packaging/package/etc/james/templates/smtpserver.xml
--
diff --git a/dockerfiles/packaging/package/etc/james/templates/smtpserver.xml 
b/dockerfiles/packaging/package/etc/james/templates/smtpserver.xml
new file mode 100644
index 000..bc609be
--- /dev/null
+++ b/dockerfiles/packaging/package/etc/james/templates/smtpserver.xml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+smtpserver-global
+0.0.0.0:25
+200
+
+file://conf/keystore
+james72laBalle
+
org.bouncycastle.jce.provider.BouncyCastleProvider
+SunX509
+
+360
+0
+0
+false
+0.0.0.0/0
+true
+0
+true
+JAMES Linagora's SMTP awesome Server
+
+
+
+
+
+
+smtpserver-TLS
+0.0.0.0:465
+200
+
+file://conf/keystore
+james72laBalle
+
org.bouncycastle.jce.provider.BouncyCastleProvider
+SunX509
+
+360
+0
+0
+
+true
+0.0.0.0/0
+
+false
+0
+true
+JAMES Linagora's SMTP awesome Server
+
+
+
+
+
+
+smtpserver-authenticated
+0.0.0.0:587
+200
+
+file://conf/keystore
+james72laBalle
+
org.bouncycastle.jce.provider.BouncyCastleProvider
+SunX509
+
+360
+0
+0
+
+true
+0.0.0.0/0
+
+false
+0
+true
+JAMES Linagora's SMTP awesome Server
+
+
+
+
+
+
+
+


[2/3] james-project git commit: MAILBOX-322 Generify Guice MailboxListener registration

2017-12-15 Thread aduprat
MAILBOX-322 Generify Guice MailboxListener registration


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/73e93336
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/73e93336
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/73e93336

Branch: refs/heads/master
Commit: 73e933361068c553e3f17eb0a7d3332b4b2d349c
Parents: af726bb
Author: benwa 
Authored: Thu Dec 14 10:04:45 2017 +0700
Committer: Antoine Duprat 
Committed: Fri Dec 15 16:45:42 2017 +0100

--
 .../modules/mailbox/DefaultEventModule.java | 49 
 .../java/org/apache/james/jmap/JMAPModule.java  | 32 ++---
 2 files changed, 52 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/73e93336/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
--
diff --git 
a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
 
b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
index 9bb03f8..3e7f303 100644
--- 
a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
+++ 
b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
@@ -19,13 +19,30 @@
 
 package org.apache.james.modules.mailbox;
 
+import java.util.List;
+import java.util.Set;
+
+import org.apache.james.lifecycle.api.Configurable;
+import org.apache.james.mailbox.MailboxListener;
+import org.apache.james.mailbox.MailboxManager;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener;
 import org.apache.james.mailbox.store.event.DelegatingMailboxListener;
 import org.apache.james.mailbox.store.event.EventDelivery;
 import org.apache.james.mailbox.store.event.SynchronousEventDelivery;
+import org.apache.james.modules.Names;
+import org.apache.james.utils.ConfigurationPerformer;
 
+import com.github.fge.lambdas.Throwing;
+import com.google.common.base.Throwables;
+import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
 import com.google.inject.Scopes;
+import com.google.inject.Singleton;
+import com.google.inject.multibindings.Multibinder;
+import com.google.inject.name.Named;
 
 public class DefaultEventModule extends AbstractModule {
 
@@ -36,5 +53,37 @@ public class DefaultEventModule extends AbstractModule {
 
 bind(SynchronousEventDelivery.class).in(Scopes.SINGLETON);
 bind(EventDelivery.class).to(SynchronousEventDelivery.class);
+
+Multibinder.newSetBinder(binder(), 
ConfigurationPerformer.class).addBinding().to(ListenerRegistrationPerformer.class);
+Multibinder.newSetBinder(binder(), MailboxListener.class);
+}
+
+@Singleton
+public static class ListenerRegistrationPerformer implements 
ConfigurationPerformer {
+private final MailboxManager mailboxManager;
+private final Set listeners;
+
+@Inject
+public ListenerRegistrationPerformer(@Named(Names.MAILBOXMANAGER_NAME) 
MailboxManager mailboxManager,
+ Set listeners) {
+this.mailboxManager = mailboxManager;
+this.listeners = listeners;
+}
+
+@Override
+public void initModule() {
+try {
+MailboxSession systemSession = 
mailboxManager.createSystemSession("storeMailboxManager");
+listeners.forEach(Throwing.consumer(listener ->
+mailboxManager.addGlobalListener(listener, 
systemSession)));
+} catch (MailboxException e) {
+Throwables.propagate(e);
+}
+}
+
+@Override
+public List forClasses() {
+return ImmutableList.of();
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/73e93336/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
--
diff --git 
a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
 
b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
index 42a3d07..29adf98 100644
--- 
a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
+++ 
b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
@@ 

[3/3] james-project git commit: MAILBOX-322 Add logging upon mailbox read

2017-12-15 Thread aduprat
MAILBOX-322 Add logging upon mailbox read


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/eeca3b56
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/eeca3b56
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/eeca3b56

Branch: refs/heads/master
Commit: eeca3b563e32136bcffd05cab67bfcd1b32d17f2
Parents: dd2ef3a
Author: benwa 
Authored: Fri Dec 15 09:52:14 2017 +0700
Committer: Antoine Duprat 
Committed: Fri Dec 15 16:45:43 2017 +0100

--
 .../cassandra/mail/CassandraMailboxPathDAO.java | 44 ++--
 1 file changed, 40 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/eeca3b56/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
--
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
index f6eb674..8a06811 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
@@ -23,6 +23,7 @@ import static 
com.datastax.driver.core.querybuilder.QueryBuilder.bindMarker;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.insertInto;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
+import static org.apache.james.mailbox.cassandra.GhostMailbox.TYPE;
 import static 
org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.FIELDS;
 import static 
org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.MAILBOX_ID;
 import static 
org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.MAILBOX_NAME;
@@ -38,6 +39,7 @@ import javax.inject.Inject;
 import org.apache.james.backends.cassandra.init.CassandraTypesProvider;
 import org.apache.james.backends.cassandra.utils.CassandraAsyncExecutor;
 import org.apache.james.backends.cassandra.utils.CassandraUtils;
+import org.apache.james.mailbox.cassandra.GhostMailbox;
 import org.apache.james.mailbox.cassandra.ids.CassandraId;
 import org.apache.james.mailbox.cassandra.mail.utils.MailboxBaseTupleUtil;
 import org.apache.james.mailbox.cassandra.table.CassandraMailboxTable;
@@ -144,16 +146,50 @@ public class CassandraMailboxPathDAO {
 .setUDTValue(NAMESPACE_AND_USER, 
mailboxBaseTupleUtil.createMailboxBaseUDT(mailboxPath.getNamespace(), 
mailboxPath.getUser()))
 .setString(MAILBOX_NAME, mailboxPath.getName()))
 .thenApply(rowOptional ->
-rowOptional.map(row -> new CassandraIdAndPath(
-CassandraId.of(row.getUUID(MAILBOX_ID)),
-mailboxPath)));
+rowOptional.map(this::fromRowToCassandraIdAndPath))
+.thenApply(value -> logGhostMailbox(mailboxPath, value));
 }
 
 public CompletableFuture 
listUserMailboxes(String namespace, String user) {
 return cassandraAsyncExecutor.execute(
 selectAll.bind()
 .setUDTValue(NAMESPACE_AND_USER, 
mailboxBaseTupleUtil.createMailboxBaseUDT(namespace, user)))
-.thenApply(resultSet -> 
cassandraUtils.convertToStream(resultSet).map(this::fromRowToCassandraIdAndPath));
+.thenApply(resultSet -> cassandraUtils.convertToStream(resultSet)
+.map(this::fromRowToCassandraIdAndPath)
+.peek(this::logReadSuccess));
+}
+
+/**
+ * See https://issues.apache.org/jira/browse/MAILBOX-322 to read about the 
Ghost mailbox bug.
+ *
+ * A missed read on an existing mailbox is the cause of the ghost mailbox 
bug. Here we log missing reads. Successful
+ * reads and write operations are also added in order to allow audit in 
order to know if the mailbox existed.
+ */
+public Optional logGhostMailbox(MailboxPath 
mailboxPath, Optional value) {
+if (value.isPresent()) {
+CassandraIdAndPath cassandraIdAndPath = value.get();
+logReadSuccess(cassandraIdAndPath);
+} else {
+GhostMailbox.logger()
+.addField(GhostMailbox.MAILBOX_NAME, mailboxPath)
+.addField(TYPE, "readMiss")
+.log(logger -> logger.info("Read mailbox missed"));
+}
+return value;
+}
+
+/**
+ * See https://issues.apache.org/jira/browse/MAILBOX-322 to read about the 
Ghost mailbox bug.
+ *
+ * Read success 

[1/3] james-project git commit: MAILBOX-322 Add a Cassandra mailbox listener logger

2017-12-15 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master af726bbb9 -> eeca3b563


MAILBOX-322 Add a Cassandra mailbox listener logger

This will help diagnose Ghost mailbox bug. Note the possibility to filter per 
mailbox and per event type.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/dd2ef3aa
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/dd2ef3aa
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/dd2ef3aa

Branch: refs/heads/master
Commit: dd2ef3aa3f778e70bc60d8c69edca36e24c40dfd
Parents: 73e9333
Author: benwa 
Authored: Thu Dec 14 10:32:13 2017 +0700
Committer: Antoine Duprat 
Committed: Fri Dec 15 16:45:42 2017 +0100

--
 .../james/mailbox/cassandra/GhostMailbox.java   | 42 
 .../MailboxOperationLoggingListener.java| 72 
 .../modules/mailbox/CassandraMailboxModule.java |  5 ++
 3 files changed, 119 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/dd2ef3aa/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
--
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
new file mode 100644
index 000..b3bd17b
--- /dev/null
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
@@ -0,0 +1,42 @@
+/
+ * 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.mailbox.cassandra;
+
+import org.apache.james.util.MDCStructuredLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * See https://issues.apache.org/jira/browse/MAILBOX-322 for reading about the 
Ghost mailbox bug.
+ *
+ * This class intend to introduce a dedicated logger for the ghost mailbox bug.
+ */
+public class GhostMailbox {
+private static  final Logger LOGGER = 
LoggerFactory.getLogger(GhostMailbox.class);
+
+public static String MAILBOX_NAME = "mailboxName";
+public static String TYPE = "type";
+public static String MAILBOX_ID = "mailboxId";
+
+public static MDCStructuredLogger logger() {
+return MDCStructuredLogger.forLogger(LOGGER);
+}
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/dd2ef3aa/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
--
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
new file mode 100644
index 000..f0b7226
--- /dev/null
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
@@ -0,0 +1,72 @@
+/
+ * 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   *
+ *  *
+ *   

Build failed in Jenkins: hupa-trunk #383

2017-12-15 Thread Apache Jenkins Server
See 

Changes:

[dongxu] Remove 404 repository, add jboss repository for cobogw.

--
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-2 (ubuntu trusty) in workspace 

Updating http://svn.apache.org/repos/asf/james/hupa/trunk at revision 
'2017-12-15T11:00:11.584 +'
D README.txt
U pom.xml
A README.md
At revision 1818266

Parsing POMs
Established TCP socket on 46287
maven35-agent.jar already up to date
maven35-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[trunk] $ /home/jenkins/tools/java/latest1.6/bin/java -Xmx2g -Xms256m -cp 
/home/jenkins/jenkins-slave/maven35-agent.jar:/home/jenkins/tools/maven/latest3/boot/plexus-classworlds-2.5.2.jar:/home/jenkins/tools/maven/latest3/conf/logging
 jenkins.maven3.agent.Maven35Main /home/jenkins/tools/maven/latest3/ 
/home/jenkins/jenkins-slave/slave.jar 
/home/jenkins/jenkins-slave/maven35-interceptor.jar 
/home/jenkins/jenkins-slave/maven3-interceptor-commons.jar 46287
Exception in thread "main" java.lang.UnsupportedClassVersionError: 
jenkins/maven3/agent/Maven35Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: jenkins.maven3.agent.Maven35Main.  Program will 
exit.
ERROR: Failed to launch Maven. Exit code = 1
[Cobertura] Publishing Cobertura coverage report...


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r1818266 - /james/hupa/trunk/pom.xml

2017-12-15 Thread dongxu
Author: dongxu
Date: Fri Dec 15 10:58:43 2017
New Revision: 1818266

URL: http://svn.apache.org/viewvc?rev=1818266=rev
Log:
Remove 404 repository, add jboss repository for cobogw.

Modified:
james/hupa/trunk/pom.xml

Modified: james/hupa/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/james/hupa/trunk/pom.xml?rev=1818266=1818265=1818266=diff
==
--- james/hupa/trunk/pom.xml (original)
+++ james/hupa/trunk/pom.xml Fri Dec 15 10:58:43 2017
@@ -338,18 +338,8 @@
 http://repo1.maven.org/maven2/
 
 
-guice, gin, gwt-vl, gwt-incubator, gwt-dnd
-http://gwtquery-plugins.googlecode.com/svn/mavenrepo
-
-
-gwt-presenter
-GWT Presenter repository at googlecode
-http://gwt-presenter.googlecode.com/svn/maven2
-
-
-cobogw
-Cobogw repository at googlecode
-http://cobogw.googlecode.com/svn/maven2
+JBoss repository
+http://repository.jboss.org/nexus/content/groups/public/
 
 
sonatype



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



Build failed in Jenkins: hupa-trunk #382

2017-12-15 Thread Apache Jenkins Server
See 

Changes:

[dongxu] Remove readme.txt..

[dongxu] Update readme from txt to md.

--
[...truncated 36.75 KB...]
A 
shared/src/main/java/org/apache/hupa/shared/events/ReplyMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/IncreaseUnseenEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/DeleteMessageEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/LoginEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/DeleteClickEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/LogoutEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/LoadMessagesEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessageListRangeChangedEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ServerStatusEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/DeleteClickEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/AttachClickEventHandler.java
A shared/src/main/java/org/apache/hupa/shared/events/LoginEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ForwardMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ServerStatusEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/AttachClickEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/RefreshFoldersEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessageViewEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/FolderSelectionEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MailToEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ContactsUpdatedEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/RefreshMessagesEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/RefreshMessagesEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/DecreaseUnseenEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ShowRawEventHandler.java
A shared/src/main/java/org/apache/hupa/shared/events/ShowRawEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/AddressClickEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/NewMessageEventHandler.java
A shared/src/main/java/org/apache/hupa/shared/events/FlashEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/SendClickEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/NewMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/SessionExpireEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/SessionExpireEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/LoadMessagesEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessageListRangeChangedEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/IncreaseUnseenEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ForwardMessageEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/DeleteMessageEvent.java
A shared/src/main/java/org/apache/hupa/shared/events/LogoutEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MoveMessageEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/RefreshFoldersEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessagesReceivedEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/SentMessageEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessagesReceivedEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/SentMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/FolderSelectionEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/MessageViewEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ExpandMessageEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ExpandMessageEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/ContactsUpdatedEvent.java
A shared/src/main/java/org/apache/hupa/shared/events/MailToEvent.java
A 
shared/src/main/java/org/apache/hupa/shared/events/RefreshLabelListEventHandler.java
A 
shared/src/main/java/org/apache/hupa/shared/events/AddressClickEventHandler.java
A 

svn commit: r1818263 - /james/hupa/trunk/README.txt

2017-12-15 Thread dongxu
Author: dongxu
Date: Fri Dec 15 10:36:21 2017
New Revision: 1818263

URL: http://svn.apache.org/viewvc?rev=1818263=rev
Log:
Remove readme.txt..

Removed:
james/hupa/trunk/README.txt


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r1818262 - /james/hupa/trunk/README.md

2017-12-15 Thread dongxu
Author: dongxu
Date: Fri Dec 15 10:35:37 2017
New Revision: 1818262

URL: http://svn.apache.org/viewvc?rev=1818262=rev
Log:
Update readme from txt to md.

Added:
james/hupa/trunk/README.md

Added: james/hupa/trunk/README.md
URL: 
http://svn.apache.org/viewvc/james/hupa/trunk/README.md?rev=1818262=auto
==
--- james/hupa/trunk/README.md (added)
+++ james/hupa/trunk/README.md Fri Dec 15 10:35:37 2017
@@ -0,0 +1,48 @@
+
+## Introduction ##
+Hupa is a Rich IMAP-based Webmail application written in GWT.
+
+Hupa has been entirely written in java to be coherent with the language used 
in the James project.
+It has been a development reference using GWT good practices (MVP pattern and 
Unit testing)
+
+It is ready for reading, sending,  and managing messages and folders, but it 
still lacks of many features email clients nowadays have.
+
+## Bulding ##
+Hupa use maven2 as building tool. To build hupa download maven2 
(http://maven.apache.org), unpack maven2 and install it.
+After that change to hupa directory and execute the following cmd:
+$ mvn clean package
+
+## Configuring server side  
+Hupa uses a properties file to know the IMAP and SMTP servers configuration.
+There is an example configuration file in 
'hupa/src/main/webapp/WEB-INF/conf/config.properties'
+
+- You can set your configuration parameters in either of these files:
+  $HOME/.hupa/config.properties
+  /etc/default/hupa
+- Or in any other file if you start your application server with the parameter:
+  -Dhupa.config.file=full_path_to_your_properties_file
+
+# Running Hupa #
+Hupa comes packaged with a servlet-container, so once you have compiled the 
app just run:
+$ java -jar target/hupa-${version}.war
+
+Then point your browser to the url:
+http://localhost:8282
+
+If you prefer to use any other servlet container you can deploy the provided 
.war file in it.
+
+## Hupa and IMAP/SMTP servers  #
+Hupa is able to discover most of the imap/smtp configuration based on the 
email domain part.
+When you are prompted to login, type your email address and wait few seconds, 
if you click on the
+gear button you can see the configuration discovered by Hupa, you can modify 
it if it does not match
+your email provider configuration. Then type your inbox password and you will 
be logged into your
+email provider servers.
+
+Hupa is compatible with most email providers, gmail, yahoo, hotmail, outlook, 
exchange, james, etc.
+
+## Eclipse GWT Plugin notes 
+- Hupa uses maven to be built, before inporting the project, you shoul install 
m2eclipse
+and google plugins, then go to Import -> New maven project and select the 
modules:
+shared, mock, server, widgets, client and hupa.
+
+- To run hupa in hosted mode, select: Run as -> (Google) Web application.



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Closed] (JAMES-2258) The inlined attachment should consider as false when inlined but no CID

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/JAMES-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat closed JAMES-2258.
-

> The inlined attachment should consider as false when inlined but no CID
> ---
>
> Key: JAMES-2258
> URL: https://issues.apache.org/jira/browse/JAMES-2258
> Project: James Server
>  Issue Type: Improvement
>Reporter: Quynh Nguyen
>
> We have an inlined attachment but without CID so system should consider 
> that's not inlined attachment --> return inlined = false in this case



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Resolved] (JAMES-2258) The inlined attachment should consider as false when inlined but no CID

2017-12-15 Thread Antoine Duprat (JIRA)

 [ 
https://issues.apache.org/jira/browse/JAMES-2258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Antoine Duprat resolved JAMES-2258.
---
Resolution: Fixed

merged

> The inlined attachment should consider as false when inlined but no CID
> ---
>
> Key: JAMES-2258
> URL: https://issues.apache.org/jira/browse/JAMES-2258
> Project: James Server
>  Issue Type: Improvement
>Reporter: Quynh Nguyen
>
> We have an inlined attachment but without CID so system should consider 
> that's not inlined attachment --> return inlined = false in this case



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[1/3] james-project git commit: JAMES-2258 inline should be false in case of no Content-ID for inlined attachment

2017-12-15 Thread aduprat
Repository: james-project
Updated Branches:
  refs/heads/master 9d3bbbd31 -> af726bbb9


JAMES-2258 inline should be false in case of no Content-ID for inlined 
attachment


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e456bf7e
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e456bf7e
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e456bf7e

Branch: refs/heads/master
Commit: e456bf7e000c9f5dc05bfc4d1f689d0f34c5c06f
Parents: 8e9c667
Author: quynhn 
Authored: Wed Dec 13 17:51:31 2017 +0700
Committer: quynhn 
Committed: Wed Dec 13 17:51:31 2017 +0700

--
 .../james/mailbox/store/mail/model/impl/MessageParser.java   | 2 +-
 .../src/test/resources/cucumber/GetMessages.feature  | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/e456bf7e/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
--
diff --git 
a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
 
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
index d447b20..3331b7b 100644
--- 
a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
+++ 
b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/model/impl/MessageParser.java
@@ -130,7 +130,7 @@ public class MessageParser {
 Optional contentType = contentType(contentTypeField);
 Optional name = name(contentTypeField, 
contentDispositionField);
 Optional cid = cid(readHeader(entity, CONTENT_ID, 
ContentIdField.class));
-boolean isInline = isInline(readHeader(entity, CONTENT_DISPOSITION, 
ContentDispositionField.class));
+boolean isInline = isInline(readHeader(entity, CONTENT_DISPOSITION, 
ContentDispositionField.class)) && cid.isPresent();
 
 return MessageAttachment.builder()
 .attachment(Attachment.builder()

http://git-wip-us.apache.org/repos/asf/james-project/blob/e456bf7e/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
--
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
index 11dde7a..9d79b44 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
@@ -276,9 +276,9 @@ Feature: GetMessages method
 And the list of attachments of the message contains 1 attachments
 And the first attachment is:
   |key  | value |
-  |type |"application/pdf"   |
+  |type |"application/pdf"  |
   |cid  |null   |
-  |isInline |true  |
+  |isInline |false  |
 
   Scenario: Retrieving message with inline attachment and blank CID should 
convert that inlined attachment to normal attachment
 Given "al...@domain.tld" has a message "m1" in "INBOX" mailbox with inline 
attachment and blank CID
@@ -291,7 +291,7 @@ Feature: GetMessages method
 |key  | value|
 |type |"application/pdf" |
 |cid  |null  |
-|isInline |true  |
+|isInline |false |
 
   Scenario: Preview should be computed even when HTML body contains many tags 
without content
 Given "al...@domain.tld" has a message "m1" in "INBOX" mailbox with HTML 
body with many empty tags
@@ -407,4 +407,4 @@ Feature: GetMessages method
   |type |"application/octet-stream"|
   |cid  |null  |
   |name |"encrypted.asc"   |
-  |isInline |true  |
+  |isInline |false |


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[2/3] james-project git commit: JAMES-2258 Inlined attachment should consider as false when no Content-ID

2017-12-15 Thread aduprat
JAMES-2258 Inlined attachment should consider as false when no Content-ID


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/0028797d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/0028797d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/0028797d

Branch: refs/heads/master
Commit: 0028797d9362e2d334d706c90a89ea2425427909
Parents: e456bf7
Author: quynhn 
Authored: Fri Dec 15 10:04:48 2017 +0700
Committer: quynhn 
Committed: Fri Dec 15 10:04:48 2017 +0700

--
 .../cucumber/GetMessagesMethodStepdefs.java |  7 ++-
 .../test/resources/cucumber/GetMessages.feature | 14 +
 .../resources/eml/inlinedWithoutContentID.eml   | 60 
 3 files changed, 80 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/0028797d/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
--
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
index 0e51707..755b3ff 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
@@ -329,10 +329,15 @@ public class GetMessagesMethodStepdefs {
 }
 
 @Given("^\"([^\"]*)\" has a message \"([^\"]*)\" in the \"([^\"]*)\" 
mailbox with inlined attachments without content disposition$")
-public void test(String username, String messageName, String mailbox) 
throws Exception {
+public void appendMessageWithInlinedImageButNoContentDisposition(String 
username, String messageName, String mailbox) throws Exception {
 userStepdefs.execWithUser(username, () -> appendMessage(messageName, 
mailbox, "eml/inlinedWithoutContentDisposition.eml"));
 }
 
+@Given("^\"([^\"]*)\" has a message \"([^\"]*)\" in the \"([^\"]*)\" 
mailbox with inlined image without content ID$")
+public void appendMessageWithInlinedImageButNoContentID(String username, 
String messageName, String mailbox) throws Exception {
+userStepdefs.execWithUser(username, () -> appendMessage(messageName, 
mailbox, "eml/inlinedWithoutContentID.eml"));
+}
+
 @Given("^\"([^\"]*)\" has a message \"([^\"]*)\" in \"([^\"]*)\" mailbox 
with specific charset$")
 public void appendMessageWithSpecificCharset(String username, String 
messageName, String mailbox) throws Throwable {
 userStepdefs.execWithUser(username, () -> 
appendMessageWithSpecificCharset(messageName, mailbox));

http://git-wip-us.apache.org/repos/asf/james-project/blob/0028797d/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
--
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
index 9d79b44..cb4c951 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
@@ -408,3 +408,17 @@ Feature: GetMessages method
   |cid  |null  |
   |name |"encrypted.asc"   |
   |isInline |false |
+
+  Scenario: Retrieving message should be possible when message with inlined 
attachment but without content ID
+Given "al...@domain.tld" has a message "m1" in the "INBOX" mailbox with 
inlined image without content ID
+When "al...@domain.tld" ask for messages "m1"
+Then no error is returned
+And the list should contain 1 message
+And the hasAttachment of the message is "true"
+And the list of attachments of the message contains 1 attachments
+And the first attachment is:
+|key  | value|
+|type |"image/jpeg"  |
+

[3/3] james-project git commit: Merge remote-tracking branch 'quynhn/JAMES-2258'

2017-12-15 Thread aduprat
Merge remote-tracking branch 'quynhn/JAMES-2258'


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/af726bbb
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/af726bbb
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/af726bbb

Branch: refs/heads/master
Commit: af726bbb996dec5b7260a858dd8dab4be4878306
Parents: 9d3bbbd 0028797
Author: Antoine Duprat 
Authored: Fri Dec 15 11:06:45 2017 +0100
Committer: Antoine Duprat 
Committed: Fri Dec 15 11:06:45 2017 +0100

--
 .../store/mail/model/impl/MessageParser.java|  2 +-
 .../cucumber/GetMessagesMethodStepdefs.java |  7 ++-
 .../test/resources/cucumber/GetMessages.feature | 22 +--
 .../resources/eml/inlinedWithoutContentID.eml   | 60 
 4 files changed, 85 insertions(+), 6 deletions(-)
--



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] [Created] (JAMES-2262) Add more testing for SpamAssassin and documentation how to use SpamAssassin

2017-12-15 Thread Quynh Nguyen (JIRA)
Quynh Nguyen created JAMES-2262:
---

 Summary: Add more testing for SpamAssassin and documentation how 
to use SpamAssassin
 Key: JAMES-2262
 URL: https://issues.apache.org/jira/browse/JAMES-2262
 Project: James Server
  Issue Type: Test
Reporter: Quynh Nguyen


Provide an integration test showing that James works well with Spamassassin.
If needed add some documentation to explain how to integrate/configure them.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org