You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by prabhu Mahendran <pr...@gmail.com> on 2016/09/21 04:25:45 UTC

Regarding ConsumeIMAP Processor.

Hi,

I am new to the NIFI. I have just use Consume IMAP Processor to retrieve
attachement from mail Server.

If i use it then i can able to download attachement but that document
having MIME type information with addition of EMail Data like below
screenshot.


I need to extract the exact data only but this data comes with some MIME
information.

Can anyone please help me to extract data only or remove the MIME
information from file?

Thanks,

Re: Regarding ConsumeIMAP Processor.

Posted by Andre <an...@fucs.org>.
Prabhu,

Thanks for sending this out.

This seems to be the outcome of a configurable setting on Microsoft Exchange

Have you tried contacting your Exchange Administrator and asks to change
your IMAP4 settings as documented here:

https://technet.microsoft.com/en-us/library/aa997869(v=exchg.150).aspx


?


On Thu, Sep 22, 2016 at 5:26 PM, prabhu Mahendran <pr...@gmail.com>
wrote:

> Andre,
>
> Thanks for your information.
>
> I have using combination of ConsumeIMAP, ExtractEmailHeaders,
> ExtractEmailAttachment processors to download the attachment from mail
> server.
>
> After successful parsing of ConsumeIMAP returns below data in screenshot
> to ExtractEmailHeaders:
>
>
>
> With addition of data,it contains some Base64 Encoded
> information(From,To,Date) .But my original data is"Hi,Hello,Welcome".
>
> In addition of this encoded information into ExtractEmailHeaders leads the
> "RFC 2822 Message Validation Failed" like below screenshot.Sender
> information enocoded , it is the root cause for the validation failed
> exception.
>
>
> Moreover i have found that jira task has been already created for my faced
> error in below link.
> https://issues.apache.org/jira/browse/NIFI-2709
>
> I need to download attachment with help of ConsumeIMAP/ConsumePOP3
> processor.
>
> In ExtractEmailHeaders i just set the default property "x-mail" for
> Additional Header list only.
>
> can i leave any other property in ExtractEmailHeaders which is needed for
> attachment downloaded?.
> or
> Is there is any other processor existing to download mail attachment?
> or
> How to remove the MIME information with addition of data?
>
> Thanks.
>
>
>
> On Wed, Sep 21, 2016 at 5:00 PM, Andre <an...@fucs.org> wrote:
>
>> Prabhu,
>>
>> The sample message you sent seems to be a multipart MIME message, so if
>> what you referring to use the part that shows
>>
>> HI\nHello\n\nWelcome
>>
>>
>> Then the ExtractEmailAttachments should be able to extract the contents
>> (it is an attachment, spitting out a flowfile containing the "Sample.txt"
>> attachment
>>
>> You would
>>
>> ConsumeIMAP (get the message from server -> ExtractEmailHeaders (get the
>> the From, Subject, To, etc from flowfile content and add as attributes ->
>> ExtractEmailAttachments (extract each individual attachment from the
>> flowfile).
>> At this stage you should produce a new flowfile containing Sample.txt
>> which seems to be the content you want?
>>
>> Would you also mind uploading the sample email you want to process into a
>> gist? May be easier to understand what you are trying to achieve.
>>
>> Cheers
>>
>>
>> On Wed, Sep 21, 2016 at 6:41 PM, prabhu Mahendran <
>> prabhuu161994@gmail.com> wrote:
>>
>>> Andre,
>>>
>>> Thanks for your help.
>>>
>>> I have already use those processors and it produces simple message+MIME
>>> information without RFC 2822 headers.
>>>
>>> Could you suggest any other processor to remove MIME information?
>>>
>>> Thanks,
>>>
>>>
>>>
>>> On Wed, Sep 21, 2016 at 10:57 AM, Andre <an...@fucs.org> wrote:
>>>
>>>> Prabhu,
>>>>
>>>>
>>>> Would ExtractEmailHeaders[1] and ExtractEmailAttachments[2] cover your
>>>> use case?
>>>>
>>>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>>>> .nifi.processors.email.ExtractEmailHeaders/index.html
>>>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>>>> .nifi.processors.email.ExtractEmailAttachments/index.html
>>>>
>>>> Cheers
>>>>
>>>>
>>>> On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <
>>>> prabhuu161994@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am new to the NIFI. I have just use Consume IMAP Processor to
>>>>> retrieve attachement from mail Server.
>>>>>
>>>>> If i use it then i can able to download attachement but that document
>>>>> having MIME type information with addition of EMail Data like below
>>>>> screenshot.
>>>>>
>>>>>
>>>>> I need to extract the exact data only but this data comes with some
>>>>> MIME information.
>>>>>
>>>>> Can anyone please help me to extract data only or remove the MIME
>>>>> information from file?
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Regarding ConsumeIMAP Processor.

Posted by prabhu Mahendran <pr...@gmail.com>.
Andre,

Thanks for your information.

I have using combination of ConsumeIMAP, ExtractEmailHeaders,
ExtractEmailAttachment processors to download the attachment from mail
server.

After successful parsing of ConsumeIMAP returns below data in screenshot to
ExtractEmailHeaders:



With addition of data,it contains some Base64 Encoded
information(From,To,Date) .But my original data is"Hi,Hello,Welcome".

In addition of this encoded information into ExtractEmailHeaders leads the
"RFC 2822 Message Validation Failed" like below screenshot.Sender
information enocoded , it is the root cause for the validation failed
exception.


Moreover i have found that jira task has been already created for my faced
error in below link.
https://issues.apache.org/jira/browse/NIFI-2709

I need to download attachment with help of ConsumeIMAP/ConsumePOP3
processor.

In ExtractEmailHeaders i just set the default property "x-mail" for
Additional Header list only.

can i leave any other property in ExtractEmailHeaders which is needed for
attachment downloaded?.
or
Is there is any other processor existing to download mail attachment?
or
How to remove the MIME information with addition of data?

Thanks.



On Wed, Sep 21, 2016 at 5:00 PM, Andre <an...@fucs.org> wrote:

> Prabhu,
>
> The sample message you sent seems to be a multipart MIME message, so if
> what you referring to use the part that shows
>
> HI\nHello\n\nWelcome
>
>
> Then the ExtractEmailAttachments should be able to extract the contents
> (it is an attachment, spitting out a flowfile containing the "Sample.txt"
> attachment
>
> You would
>
> ConsumeIMAP (get the message from server -> ExtractEmailHeaders (get the
> the From, Subject, To, etc from flowfile content and add as attributes ->
> ExtractEmailAttachments (extract each individual attachment from the
> flowfile).
> At this stage you should produce a new flowfile containing Sample.txt
> which seems to be the content you want?
>
> Would you also mind uploading the sample email you want to process into a
> gist? May be easier to understand what you are trying to achieve.
>
> Cheers
>
>
> On Wed, Sep 21, 2016 at 6:41 PM, prabhu Mahendran <prabhuu161994@gmail.com
> > wrote:
>
>> Andre,
>>
>> Thanks for your help.
>>
>> I have already use those processors and it produces simple message+MIME
>> information without RFC 2822 headers.
>>
>> Could you suggest any other processor to remove MIME information?
>>
>> Thanks,
>>
>>
>>
>> On Wed, Sep 21, 2016 at 10:57 AM, Andre <an...@fucs.org> wrote:
>>
>>> Prabhu,
>>>
>>>
>>> Would ExtractEmailHeaders[1] and ExtractEmailAttachments[2] cover your
>>> use case?
>>>
>>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>>> .nifi.processors.email.ExtractEmailHeaders/index.html
>>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>>> .nifi.processors.email.ExtractEmailAttachments/index.html
>>>
>>> Cheers
>>>
>>>
>>> On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <
>>> prabhuu161994@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am new to the NIFI. I have just use Consume IMAP Processor to
>>>> retrieve attachement from mail Server.
>>>>
>>>> If i use it then i can able to download attachement but that document
>>>> having MIME type information with addition of EMail Data like below
>>>> screenshot.
>>>>
>>>>
>>>> I need to extract the exact data only but this data comes with some
>>>> MIME information.
>>>>
>>>> Can anyone please help me to extract data only or remove the MIME
>>>> information from file?
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Re: Regarding ConsumeIMAP Processor.

Posted by Andre <an...@fucs.org>.
Prabhu,

The sample message you sent seems to be a multipart MIME message, so if
what you referring to use the part that shows

HI\nHello\n\nWelcome


Then the ExtractEmailAttachments should be able to extract the contents (it
is an attachment, spitting out a flowfile containing the "Sample.txt"
attachment

You would

ConsumeIMAP (get the message from server -> ExtractEmailHeaders (get the
the From, Subject, To, etc from flowfile content and add as attributes ->
ExtractEmailAttachments (extract each individual attachment from the
flowfile).
At this stage you should produce a new flowfile containing Sample.txt which
seems to be the content you want?

Would you also mind uploading the sample email you want to process into a
gist? May be easier to understand what you are trying to achieve.

Cheers


On Wed, Sep 21, 2016 at 6:41 PM, prabhu Mahendran <pr...@gmail.com>
wrote:

> Andre,
>
> Thanks for your help.
>
> I have already use those processors and it produces simple message+MIME
> information without RFC 2822 headers.
>
> Could you suggest any other processor to remove MIME information?
>
> Thanks,
>
>
>
> On Wed, Sep 21, 2016 at 10:57 AM, Andre <an...@fucs.org> wrote:
>
>> Prabhu,
>>
>>
>> Would ExtractEmailHeaders[1] and ExtractEmailAttachments[2] cover your
>> use case?
>>
>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>> .nifi.processors.email.ExtractEmailHeaders/index.html
>> https://nifi.apache.org/docs/nifi-docs/components/org.apache
>> .nifi.processors.email.ExtractEmailAttachments/index.html
>>
>> Cheers
>>
>>
>> On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <
>> prabhuu161994@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am new to the NIFI. I have just use Consume IMAP Processor to retrieve
>>> attachement from mail Server.
>>>
>>> If i use it then i can able to download attachement but that document
>>> having MIME type information with addition of EMail Data like below
>>> screenshot.
>>>
>>>
>>> I need to extract the exact data only but this data comes with some MIME
>>> information.
>>>
>>> Can anyone please help me to extract data only or remove the MIME
>>> information from file?
>>>
>>> Thanks,
>>>
>>>
>>>
>>>
>>>
>>>
>>
>

Re: Regarding ConsumeIMAP Processor.

Posted by prabhu Mahendran <pr...@gmail.com>.
Andre,

Thanks for your help.

I have already use those processors and it produces simple message+MIME
information without RFC 2822 headers.

Could you suggest any other processor to remove MIME information?

Thanks,



On Wed, Sep 21, 2016 at 10:57 AM, Andre <an...@fucs.org> wrote:

> Prabhu,
>
>
> Would ExtractEmailHeaders[1] and ExtractEmailAttachments[2] cover your use
> case?
>
> https://nifi.apache.org/docs/nifi-docs/components/org.
> apache.nifi.processors.email.ExtractEmailHeaders/index.html
> https://nifi.apache.org/docs/nifi-docs/components/org.
> apache.nifi.processors.email.ExtractEmailAttachments/index.html
>
> Cheers
>
>
> On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <prabhuu161994@gmail.com
> > wrote:
>
>> Hi,
>>
>> I am new to the NIFI. I have just use Consume IMAP Processor to retrieve
>> attachement from mail Server.
>>
>> If i use it then i can able to download attachement but that document
>> having MIME type information with addition of EMail Data like below
>> screenshot.
>>
>>
>> I need to extract the exact data only but this data comes with some MIME
>> information.
>>
>> Can anyone please help me to extract data only or remove the MIME
>> information from file?
>>
>> Thanks,
>>
>>
>>
>>
>>
>>
>

Re: Regarding ConsumeIMAP Processor.

Posted by Andre <an...@fucs.org>.
Prabhu,


Would ExtractEmailHeaders[1] and ExtractEmailAttachments[2] cover your use
case?

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.email.ExtractEmailHeaders/index.html
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.email.ExtractEmailAttachments/index.html

Cheers


On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <pr...@gmail.com>
wrote:

> Hi,
>
> I am new to the NIFI. I have just use Consume IMAP Processor to retrieve
> attachement from mail Server.
>
> If i use it then i can able to download attachement but that document
> having MIME type information with addition of EMail Data like below
> screenshot.
>
>
> I need to extract the exact data only but this data comes with some MIME
> information.
>
> Can anyone please help me to extract data only or remove the MIME
> information from file?
>
> Thanks,
>
>
>
>
>
>

Re: Regarding ConsumeIMAP Processor.

Posted by Andre <an...@fucs.org>.
Prabhu,

There's a PR on github with a possible solution to this issue:

Can you try running that code and let us know if it solves your problem?

Also, be mindful of compiling NiFi using 'mvn -DskipTests=true clean
install'

Best regards

On Wed, Sep 21, 2016 at 2:25 PM, prabhu Mahendran <pr...@gmail.com>
wrote:

> Hi,
>
> I am new to the NIFI. I have just use Consume IMAP Processor to retrieve
> attachement from mail Server.
>
> If i use it then i can able to download attachement but that document
> having MIME type information with addition of EMail Data like below
> screenshot.
>
>
> I need to extract the exact data only but this data comes with some MIME
> information.
>
> Can anyone please help me to extract data only or remove the MIME
> information from file?
>
> Thanks,
>
>
>
>
>
>