You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2017/05/25 13:55:04 UTC

[jira] [Created] (NIFI-3976) ConsumePOP3 and ConsumeIMAP do NOT delete messages

Koji Kawamura created NIFI-3976:
-----------------------------------

             Summary: ConsumePOP3 and ConsumeIMAP do NOT delete messages
                 Key: NIFI-3976
                 URL: https://issues.apache.org/jira/browse/NIFI-3976
             Project: Apache NiFi
          Issue Type: Bug
          Components: Extensions
    Affects Versions: 1.0.0
            Reporter: Koji Kawamura
            Assignee: Koji Kawamura


Those processors have 'Delete Messages' property but even if user configured it to 'true' messages are not deleted from mail server.

AbstractEmailProcessor which is a superclass for both processors, has been using:

{code}
emailMessage.setFlag(Flags.Flag.DELETED, this.shouldSetDeleteFlag);
{code}

However, since we are using Spring mail, the underlying receiver does not close the inbox connection so messages are not deleted.

Instead, we should use:

{code}
receiver.setShouldDeleteMessages(boolean)
{code}

To specify whether it should delete fetched messages or not.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)