1. MailhandlerParser's parse function is not purging messages which are authenticated. The $class->purge_message call is missing.
2. MailhandlerPhpImapRetrieve's purge_message function also has a small bug.

-          imap_delete($result, $i, FT_UID);
+        imap_delete($result, $message['imap_uid'], FT_UID);

Patch to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pereljon’s picture

FileSize
1.62 KB

Patch attached.

pereljon’s picture

FileSize
2.21 KB

Here's patch with git meta-data. Still new to git!

pereljon’s picture

Status: Needs review » Needs work

Think the patch needs a little work still. If multiple emails are submitted at once it looks like only one is processed. Will confirm.

pereljon’s picture

Status: Active » Needs review

Never mind. Looks like the patch works after all.

Dane Powell’s picture

Title: Authenticated messages are not being purged/deleted after they are parsed. » Authenticated messages not being purged
Status: Needs work » Fixed

Thanks for the catch and patch, fixed in both branches:
http://drupalcode.org/project/mailhandler.git/commit/ddadf95
http://drupalcode.org/project/mailhandler.git/commit/161646f

Sorry for all of the critical bugs in these releases. I'll try to add a test to make sure the purge function gets called.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.