Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-3976

ConsumePOP3 and ConsumeIMAP do NOT delete messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.3.0
    • Extensions
    • None

    Description

      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:

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

      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:

      receiver.setShouldDeleteMessages(boolean)
      

      To specify whether it should delete fetched messages or not.

      Attachments

        Issue Links

          Activity

            People

              ijokarumawak Koji Kawamura
              ijokarumawak Koji Kawamura
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: