IMAP filter and delete emails


Several applications access the same mailbox. My flow has to treat only some of the messages based on a value in the subject field of the email. The other messages must be left on the mailserver.

I set up an email port with an IMAP connection with the following parameters :

  • Global Service (optional) Fwk_Util:testEMAIL
  • Delete valid messages (IMAP only) Yes
  • Delete invalid messages (IMAP only) No

Based on the contents of the subject I generate or not an exception in the Fwk_Util:testEMAIL flow in order to simulate valid/invalid message.

Unfortunately the integration server will delete in both cases the message.

Do you know how can I filter and delete the incoming messages?



Any anyone implemented SPAM filter using flow service


15 years later, and we have a similar problem with the email port in IS 10.1 connecting to an Office365 IMAP server. When the service specified in ’Global Service (optional)’ encounters an error (i.e. flow exits with FAILURE) , IS still deletes the mail from the IMAP server.

Further, I see contradictory documentation between IS online help versus 10.1 Integration Server PDF Guide 10.1 – the online help says the email should not be deleted on service error. Online help says it should be.

I’ve opened a support incident