[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-08 Thread mattyb149
Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/710
  
+1 LGTM, ran tests and verified comments were incorporated, merging to 
master


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-07 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
@mattyb149 your comments are addressed in the last commit. Thanks for 
reviewing 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-05 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
@mattyb149 all the suggested changes have been addressed in the last 
commit. I've also included in the additional documentation sample configuration 
for GMail, so you can use it to play around/test.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-05 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
@mattyb149 I was just trying to reproduce the issue with the hanging thread 
you described above in relation to ConsumePop3, but I can't. Are you sure that 
what you saw is related to this processor or NiFo in general?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-04 Thread mattyb149
Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/710
  
I ran ConsumePop3 against GMail but hadn't seen your comment on all the 
dynamic properties that need to be set. I started and stopped the processor, 
but there is a thread continuing to run. Stopped NiFi but the thread kept 
going, had to be killed after 20 seconds. Maybe there's a timeout that can be 
set? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-04 Thread mattyb149
Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/710
  
+1 to the "Additional Details" file for all the dynamic properties, etc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-08-01 Thread trixpan
Github user trixpan commented on the issue:

https://github.com/apache/nifi/pull/710
  
@olegz, seems like an option. How about adding an additional help file 
withbthe basics of what you already found? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-25 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
@trixpan I can't say I am in favor of it given the fact that JavaMail 
Properties is a distinct part of Java Mail API and there are quite a number of 
them, so the question is how do you choose which once are more essential then 
others and what should their default values be if exposed as top level 
properties of a Processor? These are all tough questions to answer especially 
in the early stages of the processor development when we didn't really have a 
chance to analyze how it's been used and what are the common suggestions from 
users. 

So what I would propose is to add a note to CapabilityDescription that 
"additional JavaMail properties should be set as Dynamic Properties". What do 
you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread trixpan
Github user trixpan commented on the issue:

https://github.com/apache/nifi/pull/710
  
@olegz what about using the same strategy as PutEmail where the user can 
configure the socket on runtime?


https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutEmail.java#L122


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
One advise though is that there are additional JavaMail properties that one 
may need to provide to accomodate specific servers. For example in Gmail you 
need to specify 
```mail.pop3.socketFactory.class=javax.net.ssl.SSLSocketFactory``` and possibly 
few more (depending on your server settings). Those should be set as Dynamic 
properties since there is no common set. One property you should definitely set 
to get more info as to what is happening is ```mail.debug=true```. That will 
spit out all kinds of protocol messages which could explain what is going on.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
Digging into the source code for it looks like something is out of 
compliance with POP3 protocol
```java
if (line.startsWith("+OK"))
r.ok = true;
else if (line.startsWith("-ERR"))
r.ok = false;
else
throw new IOException("Unexpected response: " + line);
int i;
```
So, it appears that the received message is not really compliant with POP3, 
but will dig some more in the AM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread trixpan
Github user trixpan commented on the issue:

https://github.com/apache/nifi/pull/710
  
@olegz agreed. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread olegz
Github user olegz commented on the issue:

https://github.com/apache/nifi/pull/710
  
@trixpan Well, I am not sure what that is (will be looking) and how 
reliable mailtrap.io is for such testing giving it's description "Fake smtp 
testing server. Dummy smtp email testing". I've tested it with few real servers 
(gmail, yahoo etc) and all is good. I am not dismissing that there may be a 
problem but let's make sure we are not chasing some dummy error in mailtrap.io. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-24 Thread trixpan
Github user trixpan commented on the issue:

https://github.com/apache/nifi/pull/710
  
Getting errors when trying to use mailtrap.io for POP3 testing:

```
2016-07-25 10:37:27,706 ERROR [Timer-Driven Process Thread-6] 
o.a.nifi.processors.email.ConsumePOP3
org.apache.nifi.processor.exception.ProcessException: Failed to receive 
messages from Email server: [javax.mail.Mes
sagingException - error getting size
at 
org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcess
or.java:311) ~[na:na]
at 
org.apache.nifi.processors.email.AbstractEmailProcessor.receiveMessage(AbstractEmailProcessor.java:373)
~[na:na]
at 
org.apache.nifi.processors.email.AbstractEmailProcessor.onTrigger(AbstractEmailProcessor.java:182)
 ~[na:
na]
at 
org.apache.nifi.processors.email.ConsumePOP3.onTrigger(ConsumePOP3.java:31) 
~[na:na]
at 
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
 ~[nifi-api-1.0.0-SNAPSH
OT.jar:1.0.0-SNAPSHOT]
at 
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1077)
 [nifi-framew
ork-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at 
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136)
[nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at 
org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
 [
nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at 
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:1
23) [nifi-framework-core-1.0.0-SNAPSHOT.jar:1.0.0-SNAPSHOT]
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[na:1.8.0_91]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[na:1.8.0_91]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecu
tor.java:180) [na:1.8.0_91]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.jav
a:294) [na:1.8.0_91]
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
[na:1.8.0_91]
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: javax.mail.MessagingException: error getting size
at com.sun.mail.pop3.POP3Message.getSize(POP3Message.java:145) 
~[mail-1.4.7.jar:1.4.7]
at javax.mail.internet.MimeMessage.(MimeMessage.java:238) 
~[mail-1.4.7.jar:1.4.7]
at 
org.springframework.integration.mail.AbstractMailReceiver$IntegrationMimeMessage.(AbstractMailRece
iver.java:557) ~[na:na]
at 
org.springframework.integration.mail.AbstractMailReceiver$IntegrationMimeMessage.(AbstractMailRece
iver.java:552) ~[na:na]
at 
org.springframework.integration.mail.AbstractMailReceiver.postProcessFilteredMessages(AbstractMailReceiv
er.java:415) ~[na:na]
at 
org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:342)
 ~[na:na
]
at 
org.apache.nifi.processors.email.AbstractEmailProcessor.fillMessageQueueIfNecessary(AbstractEmailProcess
or.java:306) ~[na:na]
... 15 common frames omitted
Caused by: java.io.IOException: Unexpected response: 1 95
at com.sun.mail.pop3.Protocol.readResponse(Protocol.java:752) 
~[mail-1.4.7.jar:1.4.7]
at com.sun.mail.pop3.Protocol.simpleCommand(Protocol.java:692) 
~[mail-1.4.7.jar:1.4.7]
at com.sun.mail.pop3.Protocol.list(Protocol.java:391) 
~[mail-1.4.7.jar:1.4.7]
at com.sun.mail.pop3.POP3Message.getSize(POP3Message.java:138) 
~[mail-1.4.7.jar:1.4.7]
... 21 common frames omitted

```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] nifi issue #710: NIFI-1148 added IMAP/POP3 support

2016-07-23 Thread trixpan
Github user trixpan commented on the issue:

https://github.com/apache/nifi/pull/710
  
@olegz 

I am not experienced enough in JAVA to vouch the quality of the code but I 
appreciate the simplicity of this processor. 

Except for the small comments (and the action item on my side to validate 
my suspicion around RETR / DELE ) the work is looking great.

Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---