[jira] [Created] (JAMES-2263) onMailetException doesn't work even the default onMailetException="error"

2017-12-17 Thread Taro App (JIRA)
Taro App created JAMES-2263:
---

 Summary: onMailetException doesn't work even the default 
onMailetException="error"
 Key: JAMES-2263
 URL: https://issues.apache.org/jira/browse/JAMES-2263
 Project: James Server
  Issue Type: Bug
  Components: Matchers/Mailets (bundled), SpoolManager & Processors
Affects Versions: 3.0.0-beta5
Reporter: Taro App


Tested with 3.0.1. When a mailet raises an exception, the message is not sent 
to the processor specified with onMailetException. Only 
onMailetException="ignore" works. Other values don't work, the even the default 
onMailetException="error". Instead the message is somehow processed 7 times and 
then discarded.

See org.apache.james.mailetcontainer.impl.camel.CamelProcessor.java:106, the 
exception and the onMailetException value is passed to 
ProcessorUtil.handleException, which then re-throw the exception. The re-thrown 
exception is never catched and the mail object is discard at 
org.apache.james.mailetcontainer.impl.JamesMailSpooler.java:183.




--
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] [Comment Edited] (JAMES-2263) onMailetException doesn't work even the default onMailetException="error"

2017-12-17 Thread Tellier Benoit (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294561#comment-16294561
 ] 

Tellier Benoit edited comment on JAMES-2263 at 12/18/17 6:42 AM:
-

I am not familiar either with that part of the code.

I will have a look at this `onMailetException`. I also believe the default 
behaviour should be to continue the processing of this email on top of the 
`error` processor (if not already the case). Using a processor here allow 
composability (you can discard, bounce, store the message, maybe target a 
reprocessing, etc...) I will have a look.

Thanks for raising that concern.


was (Author: btellier):
I am not familiar either with that part of the code.

I will have a look at this `onMailetException`. I also believe the default 
behaviour should be to continue the processing of this email on top of the 
`error` processor (if not already the case). I will have a look.

Thanks for raising that concern.

> onMailetException doesn't work even the default onMailetException="error"
> -
>
> Key: JAMES-2263
> URL: https://issues.apache.org/jira/browse/JAMES-2263
> Project: James Server
>  Issue Type: Bug
>  Components: Matchers/Mailets (bundled), SpoolManager & Processors
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>
> Tested with 3.0.1. When a mailet raises an exception, the message is not sent 
> to the processor specified with onMailetException. Only 
> onMailetException="ignore" works. Other values don't work, the even the 
> default onMailetException="error". Instead the message is somehow processed 7 
> times and then discarded.
> See org.apache.james.mailetcontainer.impl.camel.CamelProcessor.java:106, the 
> exception and the onMailetException value is passed to 
> ProcessorUtil.handleException, which then re-throw the exception. The 
> re-thrown exception is never catched and the mail object is discard at 
> org.apache.james.mailetcontainer.impl.JamesMailSpooler.java:183.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294585#comment-16294585
 ] 

ASF GitHub Bot commented on JAMES-2253:
---

Github user chibenwa commented on a diff in the pull request:

https://github.com/apache/james-project/pull/88#discussion_r157411809
  
--- Diff: 
mailet/standard/src/main/java/org/apache/james/transport/mailets/AddFooter.java 
---
@@ -94,11 +94,18 @@ private boolean attachFooter(MimePart part) throws 
MessagingException, IOExcepti
 if (part.isMimeType("multipart/mixed")
 || part.isMimeType("multipart/related")) {
 MimeMultipart multipart = (MimeMultipart) part.getContent();
-return attachFooterToFirstPart(multipart);
+boolean added = attachFooterToFirstPart(multipart);
+if (added) {
+   part.setContent(multipart);
+}
+return added;
 
 } else if (part.isMimeType("multipart/alternative")) {
 MimeMultipart multipart = (MimeMultipart) part.getContent();
-return attachFooterToAllSubparts(multipart);
+boolean added = attachFooterToAllSubparts(multipart);
+if (added) {
+   part.setContent(multipart);
+}
--- End diff --

I guess you forgot the `return added` stuff here...

That would cause `multipart/alternative` to not be well handled anymore...

By the way forgetting this return breaks tests.


> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294590#comment-16294590
 ] 

ASF GitHub Bot commented on JAMES-2253:
---

Github user chibenwa commented on the issue:

https://github.com/apache/james-project/pull/88
  
I will duplicate the PR for unit testing, and handle further remarks. If 
interrested follow this [soon to be provided] link.

Thanks again for this contribution.

Best regard,

Benoit Tellier


> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread Taro App (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294550#comment-16294550
 ] 

Taro App commented on JAMES-2253:
-

Created the PR: https://github.com/apache/james-project/pull/88

> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



--
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] [Commented] (JAMES-2260) RemoteDelivery mailet delayTime parse issue

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294568#comment-16294568
 ] 

ASF GitHub Bot commented on JAMES-2260:
---

GitHub user apptaro opened a pull request:

https://github.com/apache/james-project/pull/89

Fix for JAMES-2260



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apptaro/james-project JAMES-2260

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/james-project/pull/89.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #89


commit 271d243da7cf01b2bbff2385d3828199af449177
Author: apptaro 
Date:   2017-12-18T06:46:22Z

Fix for JAMES-2260




> RemoteDelivery mailet delayTime parse issue
> ---
>
> Key: JAMES-2260
> URL: https://issues.apache.org/jira/browse/JAMES-2260
> Project: James Server
>  Issue Type: Bug
>  Components: Remote Delivery
>Affects Versions: 3.0.0-beta5, master
>Reporter: Taro App
>Priority: Minor
> Attachments: Delay.patch, DelayTest.java.patch, 
> DelaysAndMaxRetry.patch, DelaysAndMaxRetryTest.java.patch
>
>
> This works:
> {code:xml}
> 3* 5 minutes,3* 15 minutes,23* 1 hour
> {code}
> But these don't work:
> {code:xml}
> 3* 5 minutes, 3* 15 minutes, 23* 1 hour
> 3 * 5 minutes,3 * 15 minutes,23 * 1 hour
> 3 * 5 minutes, 3 * 15 minutes, 23 * 1 hour
> {code}
> Notice the spaces. The last one is usually what people would write.



--
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] [Commented] (JAMES-2260) RemoteDelivery mailet delayTime parse issue

2017-12-17 Thread Taro App (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294569#comment-16294569
 ] 

Taro App commented on JAMES-2260:
-

Created PR: https://github.com/apache/james-project/pull/89

> RemoteDelivery mailet delayTime parse issue
> ---
>
> Key: JAMES-2260
> URL: https://issues.apache.org/jira/browse/JAMES-2260
> Project: James Server
>  Issue Type: Bug
>  Components: Remote Delivery
>Affects Versions: 3.0.0-beta5, master
>Reporter: Taro App
>Priority: Minor
> Attachments: Delay.patch, DelayTest.java.patch, 
> DelaysAndMaxRetry.patch, DelaysAndMaxRetryTest.java.patch
>
>
> This works:
> {code:xml}
> 3* 5 minutes,3* 15 minutes,23* 1 hour
> {code}
> But these don't work:
> {code:xml}
> 3* 5 minutes, 3* 15 minutes, 23* 1 hour
> 3 * 5 minutes,3 * 15 minutes,23 * 1 hour
> 3 * 5 minutes, 3 * 15 minutes, 23 * 1 hour
> {code}
> Notice the spaces. The last one is usually what people would write.



--
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] [Commented] (JAMES-2265) Use instead of in mailetcontainer.xml

2017-12-17 Thread Taro App (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294584#comment-16294584
 ] 

Taro App commented on JAMES-2265:
-

Created the PR: https://github.com/apache/james-project/pull/90

> Use  instead of  in mailetcontainer.xml
> 
>
> Key: JAMES-2265
> URL: https://issues.apache.org/jira/browse/JAMES-2265
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>Priority: Minor
>
> There is a typo in mailetcontainer-template.xml. Use  instead of 
>  to specify the outgoing queue name for RemoteDelivery mailet.



--
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] [Commented] (JAMES-2265) Use instead of in mailetcontainer.xml

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294578#comment-16294578
 ] 

ASF GitHub Bot commented on JAMES-2265:
---

GitHub user apptaro opened a pull request:

https://github.com/apache/james-project/pull/90

Fix for JAMES-2265



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apptaro/james-project JAMES-2265

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/james-project/pull/90.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #90


commit a109c5fab3be2d46088ecd6a69b815dd1145393b
Author: apptaro 
Date:   2017-12-18T07:07:26Z

Fix for JAMES-2265




> Use  instead of  in mailetcontainer.xml
> 
>
> Key: JAMES-2265
> URL: https://issues.apache.org/jira/browse/JAMES-2265
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>Priority: Minor
>
> There is a typo in mailetcontainer-template.xml. Use  instead of 
>  to specify the outgoing queue name for RemoteDelivery mailet.



--
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] [Commented] (JAMES-2265) Use instead of in mailetcontainer.xml

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294592#comment-16294592
 ] 

ASF GitHub Bot commented on JAMES-2265:
---

Github user apptaro commented on the issue:

https://github.com/apache/james-project/pull/90
  
Hi, thank you very much!


> Use  instead of  in mailetcontainer.xml
> 
>
> Key: JAMES-2265
> URL: https://issues.apache.org/jira/browse/JAMES-2265
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>Priority: Minor
>
> There is a typo in mailetcontainer-template.xml. Use  instead of 
>  to specify the outgoing queue name for RemoteDelivery mailet.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294594#comment-16294594
 ] 

ASF GitHub Bot commented on JAMES-2253:
---

Github user chibenwa commented on the issue:

https://github.com/apache/james-project/pull/88
  
You are very welcome.

Might you have any question / need any support using the James server, feel 
free to ask us using the mailing list or the gitter channel.


> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294549#comment-16294549
 ] 

ASF GitHub Bot commented on JAMES-2253:
---

GitHub user apptaro opened a pull request:

https://github.com/apache/james-project/pull/88

Fix for JAMES-2253



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apptaro/james-project JAMES-2253

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/james-project/pull/88.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #88


commit 8fdadb05822af91dbb0bca64ecaa3ba24ef58fc6
Author: apptaro 
Date:   2017-12-18T06:20:18Z

Fix for JAMES-2253




> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



--
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-2259) IMAP search for MODSEQ is broken

2017-12-17 Thread Tellier Benoit (JIRA)

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

Tellier Benoit resolved JAMES-2259.
---
Resolution: Fixed

https://github.com/linagora/james-project/pull/1192 solved the issue

> IMAP search for MODSEQ is broken
> 
>
> Key: JAMES-2259
> URL: https://issues.apache.org/jira/browse/JAMES-2259
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: master
>Reporter: Tellier Benoit
>  Labels: community, easy-fix
> Fix For: master
>
>
> As reported by https://github.com/pedrohm in 
> https://github.com/apache/james-project/pull/86 , the IMAP parsing layer 
> interprets the ModSeq criterion as a flag criterion, leading to invalid 
> searches.
> We also missed some integration tests. They are impossible to write with MPT 
> without assumptions concerning the modseq.
> We can at the minimum ensure no modseq is returns for a very high modseq 
> value.



--
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-2259) IMAP search for MODSEQ is broken

2017-12-17 Thread Tellier Benoit (JIRA)

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

Tellier Benoit closed JAMES-2259.
-

> IMAP search for MODSEQ is broken
> 
>
> Key: JAMES-2259
> URL: https://issues.apache.org/jira/browse/JAMES-2259
> Project: James Server
>  Issue Type: Bug
>  Components: IMAPServer
>Affects Versions: master
>Reporter: Tellier Benoit
>  Labels: community, easy-fix
> Fix For: master
>
>
> As reported by https://github.com/pedrohm in 
> https://github.com/apache/james-project/pull/86 , the IMAP parsing layer 
> interprets the ModSeq criterion as a flag criterion, leading to invalid 
> searches.
> We also missed some integration tests. They are impossible to write with MPT 
> without assumptions concerning the modseq.
> We can at the minimum ensure no modseq is returns for a very high modseq 
> value.



--
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] [Commented] (JAMES-2263) onMailetException doesn't work even the default onMailetException="error"

2017-12-17 Thread Tellier Benoit (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294561#comment-16294561
 ] 

Tellier Benoit commented on JAMES-2263:
---

I am not familiar either with that part of the code.

I will have a look at this `onMailetException`. I also believe the default 
behaviour should be to continue the processing of this email on top of the 
`error` processor (if not already the case). I will have a look.

Thanks for raising that concern.

> onMailetException doesn't work even the default onMailetException="error"
> -
>
> Key: JAMES-2263
> URL: https://issues.apache.org/jira/browse/JAMES-2263
> Project: James Server
>  Issue Type: Bug
>  Components: Matchers/Mailets (bundled), SpoolManager & Processors
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>
> Tested with 3.0.1. When a mailet raises an exception, the message is not sent 
> to the processor specified with onMailetException. Only 
> onMailetException="ignore" works. Other values don't work, the even the 
> default onMailetException="error". Instead the message is somehow processed 7 
> times and then discarded.
> See org.apache.james.mailetcontainer.impl.camel.CamelProcessor.java:106, the 
> exception and the onMailetException value is passed to 
> ProcessorUtil.handleException, which then re-throw the exception. The 
> re-thrown exception is never catched and the mail object is discard at 
> org.apache.james.mailetcontainer.impl.JamesMailSpooler.java:183.



--
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] [Created] (JAMES-2265) Use instead of in mailetcontainer.xml

2017-12-17 Thread Taro App (JIRA)
Taro App created JAMES-2265:
---

 Summary: Use  instead of  in 
mailetcontainer.xml
 Key: JAMES-2265
 URL: https://issues.apache.org/jira/browse/JAMES-2265
 Project: James Server
  Issue Type: Bug
Affects Versions: 3.0.0-beta5
Reporter: Taro App
Priority: Minor


There is a typo in mailetcontainer-template.xml. Use  instead of 
 to specify the outgoing queue name for RemoteDelivery mailet.



--
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] [Commented] (JAMES-2263) onMailetException doesn't work even the default onMailetException="error"

2017-12-17 Thread Taro App (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294543#comment-16294543
 ] 

Taro App commented on JAMES-2263:
-

See the fix proposed for JAMES-1473. With the same fix, this issue would be 
resolved, but it will make two tests fail. I wonder if those tests are wrong. 
If I get advice on this, I would make changes on the codes and the tests.

> onMailetException doesn't work even the default onMailetException="error"
> -
>
> Key: JAMES-2263
> URL: https://issues.apache.org/jira/browse/JAMES-2263
> Project: James Server
>  Issue Type: Bug
>  Components: Matchers/Mailets (bundled), SpoolManager & Processors
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>
> Tested with 3.0.1. When a mailet raises an exception, the message is not sent 
> to the processor specified with onMailetException. Only 
> onMailetException="ignore" works. Other values don't work, the even the 
> default onMailetException="error". Instead the message is somehow processed 7 
> times and then discarded.
> See org.apache.james.mailetcontainer.impl.camel.CamelProcessor.java:106, the 
> exception and the onMailetException value is passed to 
> ProcessorUtil.handleException, which then re-throw the exception. The 
> re-thrown exception is never catched and the mail object is discard at 
> org.apache.james.mailetcontainer.impl.JamesMailSpooler.java:183.



--
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] [Commented] (JAMES-2263) onMailetException doesn't work even the default onMailetException="error"

2017-12-17 Thread Tellier Benoit (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294570#comment-16294570
 ] 

Tellier Benoit commented on JAMES-2263:
---

Ok, after a quick glance at the code:

 - 1. I believe the exception should not be re-thrown in 
ProcessorUtil::handleException
 - 2. We should rely in the mailetConfig parameters and not a possible 
implementation (that might be why you get no effect)
 - 3. We should handle **all** exceptions so that Runtime are well handled.
 - 4. we need to ensure *only logging* errors generated by *error* processor.

> onMailetException doesn't work even the default onMailetException="error"
> -
>
> Key: JAMES-2263
> URL: https://issues.apache.org/jira/browse/JAMES-2263
> Project: James Server
>  Issue Type: Bug
>  Components: Matchers/Mailets (bundled), SpoolManager & Processors
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
>
> Tested with 3.0.1. When a mailet raises an exception, the message is not sent 
> to the processor specified with onMailetException. Only 
> onMailetException="ignore" works. Other values don't work, the even the 
> default onMailetException="error". Instead the message is somehow processed 7 
> times and then discarded.
> See org.apache.james.mailetcontainer.impl.camel.CamelProcessor.java:106, the 
> exception and the onMailetException value is passed to 
> ProcessorUtil.handleException, which then re-throw the exception. The 
> re-thrown exception is never catched and the mail object is discard at 
> org.apache.james.mailetcontainer.impl.JamesMailSpooler.java:183.



--
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/3] james-project git commit: JAMES-2259 Correct search key for modseq in IMAP protocol

2017-12-17 Thread btellier
JAMES-2259 Correct search key for modseq in IMAP protocol


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

Branch: refs/heads/master
Commit: 452e1a1a84348d35d7443bc725e407573e1bacfa
Parents: 1695b0a
Author: Pedro Henrique Lopes Martins 
Authored: Thu Dec 14 11:10:24 2017 +
Committer: benwa 
Committed: Mon Dec 18 13:16:21 2017 +0700

--
 .../apache/james/imap/api/message/request/SearchKey.java| 4 ++--
 .../james/imap/api/message/request/SearchKeyTest.java   | 9 +
 2 files changed, 11 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/452e1a1a/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
--
diff --git 
a/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
 
b/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
index 810817a..a476a5d 100644
--- 
a/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
+++ 
b/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
@@ -330,7 +330,7 @@ public final class SearchKey {
 }
 
 public static SearchKey buildModSeq(long modSeq) {
-return new SearchKey(TYPE_ANSWERED, null, null, 0, null, null, null, 
null, -1, modSeq);
+return new SearchKey(TYPE_MODSEQ, null, null, 0, null, null, null, 
null, -1, modSeq);
 }
 private final int type;
 
@@ -496,4 +496,4 @@ public final class SearchKey {
 .add("keys", Optional.ofNullable(keys).map(ImmutableList::copyOf))
 .toString();
 }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/452e1a1a/protocols/imap/src/test/java/org/apache/james/imap/api/message/request/SearchKeyTest.java
--
diff --git 
a/protocols/imap/src/test/java/org/apache/james/imap/api/message/request/SearchKeyTest.java
 
b/protocols/imap/src/test/java/org/apache/james/imap/api/message/request/SearchKeyTest.java
index 6ea9da7..9630f7b 100644
--- 
a/protocols/imap/src/test/java/org/apache/james/imap/api/message/request/SearchKeyTest.java
+++ 
b/protocols/imap/src/test/java/org/apache/james/imap/api/message/request/SearchKeyTest.java
@@ -19,6 +19,8 @@
 
 package org.apache.james.imap.api.message.request;
 
+import static org.assertj.core.api.Assertions.assertThat;
+
 import org.junit.Test;
 
 import nl.jqno.equalsverifier.EqualsVerifier;
@@ -29,4 +31,11 @@ public class SearchKeyTest {
 EqualsVerifier.forClass(SearchKey.class)
 .verify();
 }
+
+@Test
+public void modSeqSearchKeyShouldBeOfTypeModSeq() {
+SearchKey searchKey = SearchKey.buildModSeq(36);
+
+assertThat(searchKey.getType()).isEqualTo(SearchKey.TYPE_MODSEQ);
+}
 }
\ No newline at end of file


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



[3/3] james-project git commit: JAMES-2259 SearchKey should match bean contract

2017-12-17 Thread btellier
JAMES-2259 SearchKey should match bean contract


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

Branch: refs/heads/master
Commit: 1695b0a2a75161fa043f8158c7bc71d22a4d3c6f
Parents: a795945
Author: benwa 
Authored: Fri Dec 15 10:46:08 2017 +0700
Committer: benwa 
Committed: Mon Dec 18 13:16:21 2017 +0700

--
 .../imap/api/message/request/SearchKey.java | 75 ++--
 .../imap/api/message/request/SearchKeyTest.java | 32 +
 2 files changed, 54 insertions(+), 53 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/1695b0a2/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
--
diff --git 
a/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
 
b/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
index 374efba..810817a 100644
--- 
a/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
+++ 
b/protocols/imap/src/main/java/org/apache/james/imap/api/message/request/SearchKey.java
@@ -22,6 +22,7 @@ package org.apache.james.imap.api.message.request;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 import java.util.Optional;
 
 import org.apache.james.imap.api.message.IdRange;
@@ -455,62 +456,30 @@ public final class SearchKey {
 public long getModSeq() {
 return modSeq;
 }
-/**
- * @see java.lang.Object#hashCode()
- */
-public int hashCode() {
-final int PRIME = 31;
-int result = 1;
-result = PRIME * result + ((date == null) ? 0 : date.hashCode());
-result = PRIME * result + ((name == null) ? 0 : name.hashCode());
-if (sequence != null) {
-result = PRIME * result + sequence.length;
+
+@Override
+public final boolean equals(Object o) {
+if (o instanceof SearchKey) {
+SearchKey searchKey = (SearchKey) o;
+
+return Objects.equals(this.type, searchKey.type)
+&& Objects.equals(this.size, searchKey.size)
+&& Objects.equals(this.seconds, searchKey.seconds)
+&& Objects.equals(this.modSeq, searchKey.modSeq)
+&& Objects.equals(this.date, searchKey.date)
+&& Objects.equals(this.keys, searchKey.keys)
+&& Objects.equals(this.name, searchKey.name)
+&& Objects.equals(this.value, searchKey.value)
+&& Arrays.equals(this.sequence, searchKey.sequence)
+&& Arrays.equals(this.uids, searchKey.uids);
 }
-result = PRIME * result + (int) (size ^ (size >>> 32));
-result = PRIME * result + ((keys == null) ? 0 : keys.hashCode());
-result = PRIME * result + type;
-result = PRIME * result + ((value == null) ? 0 : value.hashCode());
-return result;
+return false;
 }
 
-/**
- * @see java.lang.Object#equals(java.lang.Object)
- */
-public boolean equals(Object obj) {
-if (this == obj)
-return true;
-if (obj == null)
-return false;
-if (getClass() != obj.getClass())
-return false;
-final SearchKey other = (SearchKey) obj;
-if (date == null) {
-if (other.date != null)
-return false;
-} else if (!date.equals(other.date))
-return false;
-if (name == null) {
-if (other.name != null)
-return false;
-} else if (!name.equals(other.name))
-return false;
-if (!Arrays.equals(sequence, other.sequence))
-return false;
-if (size != other.size)
-return false;
-if (keys == null) {
-if (other.keys != null)
-return false;
-} else if (!keys.equals(other.keys))
-return false;
-if (type != other.type)
-return false;
-if (value == null) {
-if (other.value != null)
-return false;
-} else if (!value.equals(other.value))
-return false;
-return true;
+@Override
+public final int hashCode() {
+return Objects.hash(type, date, keys, size, name, value,
+Arrays.hashCode(sequence), Arrays.hashCode(uids), seconds, modSeq);
 }
 
 @Override


[1/3] james-project git commit: JAMES-2259 Add minimal integration test regarding MODSEQ search

2017-12-17 Thread btellier
Repository: james-project
Updated Branches:
  refs/heads/master a7959458f -> 8d5c53b12


JAMES-2259 Add minimal integration test regarding MODSEQ search

These tests are hard to write with MPT as we can not access the MODSEQ value. 
Hence I believe a minimum strategy can be adopted:

 - Pick a very high modseq
 - Ensure nothing is returned.


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

Branch: refs/heads/master
Commit: 8d5c53b123a3e6e1248d42052a042b4ba01f1ec9
Parents: 452e1a1
Author: benwa 
Authored: Fri Dec 15 11:07:06 2017 +0700
Committer: benwa 
Committed: Mon Dec 18 13:16:21 2017 +0700

--
 .../org/apache/james/imap/scripts/SearchAtoms.test   | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/james-project/blob/8d5c53b1/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchAtoms.test
--
diff --git 
a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchAtoms.test
 
b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchAtoms.test
index 1ce099c..99374eb 100644
--- 
a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchAtoms.test
+++ 
b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchAtoms.test
@@ -1916,5 +1916,12 @@ S: A148 OK SEARCH completed\.
 C: A149 SEARCH UNSEEN
 S: \* SEARCH 3 4 8 9 13 14 18 19
 S: A149 OK SEARCH completed\.
-C: A150 DELETE testmailbox
-S: A150 OK DELETE completed\.
+
+C: A150 SEARCH MODSEQ 15
+S: \* OK \[HIGHESTMODSEQ .*\] Highest
+S: \* SEARCH
+S: A150 OK SEARCH completed\.
+# We expect no modseq to be over 1500, hence we expect an empty result.
+
+C: A151 DELETE testmailbox
+S: A151 OK DELETE completed\.


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



[jira] [Created] (JAMES-2264) Remove the heavy usage of profiles in maven

2017-12-17 Thread Matthieu Baechler (JIRA)
Matthieu Baechler created JAMES-2264:


 Summary: Remove the heavy usage of profiles in maven
 Key: JAMES-2264
 URL: https://issues.apache.org/jira/browse/JAMES-2264
 Project: James Server
  Issue Type: Improvement
  Components: Build System
Reporter: Matthieu Baechler


Maven profiles have been used to disable some part of the build and more 
specifically to disable tests running in wrong environments.
There's no good reason to disable build of any module.
For test disabling, using Assume is much more powerful : you can disable tests 
based on system capability.
Removing profiles make the build simpler and faster, two very desirable 
attributes of a build system.



--
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] [Commented] (JAMES-2253) addFooter mailet doesn't work for multipart mail

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/JAMES-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16294591#comment-16294591
 ] 

ASF GitHub Bot commented on JAMES-2253:
---

Github user apptaro commented on the issue:

https://github.com/apache/james-project/pull/88
  
Hi, thank you for incorporating my fix!


> addFooter mailet doesn't work for multipart mail
> 
>
> Key: JAMES-2253
> URL: https://issues.apache.org/jira/browse/JAMES-2253
> Project: James Server
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta5
>Reporter: Taro App
> Attachments: AddFooter.patch
>
>
> The addFooter mailet doesn't work for multipart mail, though It works for 
> text mail. (Tested with 3.0.1.)
> The addFooterTest ends successfully but the mailet doesn't work on the real 
> James server.
> The addFooterTest uses javax.mail.internet.MimeMessage, but the real mailet 
> uses org.apache.james.server.core.MimeMessageCopyOnWriteProxy which extends 
> MimeMessage.



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



Re: Git Repos

2017-12-17 Thread dongxu
Hi guys,

Can I apply to move james-hupa to git and then continue to maintain
the project?

On Sun, Jul 3, 2016 at 5:17 PM, Eric Charles  wrote:
>>> What about http://james.apache.org/contribute.html where we could also
>>> introduce the different repositories and explain the overall
>>> architecture of the James project and how we accept pull requests from
>>> github.
>>>
>>> Any thoughts?
>>
>>
>> The website needs a lot of love. Thank you for taking your time to go
>> through all these tasks that need to be done.
>>
>
> This can be followed on JAMES-1789 (consolidate documentation) and
> INFRA-12204 (Migrate James website from svnpubsub to the git workflow)
>
>
> -
> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
> For additional commands, e-mail: server-dev-h...@james.apache.org
>

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