CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • IMAP messages are DELETE'd but never EXPUNGE'd
Pages: [1]

Author Topic: IMAP messages are DELETE'd but never EXPUNGE'd  (Read 1303 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
IMAP messages are DELETE'd but never EXPUNGE'd
January 07, 2011, 04:24:29 am
I note that ezcMailImapTransport::delete() is called, but ezcMailImapTransport::expunge() never is.

This means that when EmailProcessor.php processes a message in the INBOX, and moves it to the 'processed' folder, the original remains in the INBOX (marked as deleted).

Should the EmailProcessor expunge files it deletes?
What are the side-effects? (eg, I assume that folder is only used by EmailProcessor)
How are people handling this? (my INBOX has over 4,000 deleted messages just chewing up space)

Ken

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: IMAP messages are DELETE'd but never EXPUNGE'd
January 07, 2011, 05:03:20 am
Good point, should be expunged IMO.

Piotr, what do you think ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: IMAP messages are DELETE'd but never EXPUNGE'd
January 10, 2011, 05:52:04 am
Thanks for catching this, Ken. We should definitely expunge them (although deleting them seems to have worked for me, at least in the past with Gmail). Filed CRM-7356 to track this.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: IMAP messages are DELETE'd but never EXPUNGE'd
January 10, 2011, 10:30:02 pm
Thanks, Piotr!

It is possible to run cron jobs that expunge deleted files but I was hoping to avoid that. Gmail seem to move all deleted emails to Trash so perhaps there is no need to expunge in that context.

Ken

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: IMAP messages are DELETE'd but never EXPUNGE'd
January 18, 2011, 09:25:53 am
I fixed that in r31862 to expunge every MAIL_BATCH_SIZE processed (50 by default), which seems like a nice trade-off between doing it too often and being left with unexpunged messages on errors.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: IMAP messages are DELETE'd but never EXPUNGE'd
January 20, 2011, 10:34:38 pm
Thanks, Piotr! You are a rock-star,

Ken

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • IMAP messages are DELETE'd but never EXPUNGE'd

This forum was archived on 2017-11-26.