Mailhandler fails to delete mail
torgeirb - July 10, 2004 - 15:09
| Project: | Mailhandler |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
When I configure mailhandler to connect using pop3, retrieved mails are not deleted from the mailbox. I switched to IMAP, and emails were deleted as expected.
(I also noticed that although it correctly logged old mails as duplicates, it still created duplicate comments, so maybe a bug there somewhere)

#1
has anyone figured out a fix here? i will look into this soon, but i'd prefer to just commit a fix if one one exists.
#2
i fixed this by removing the feature for POP. POP messages are always deleted, regardless of that checkbox (documentation updated accordingly). currently committed for 4.5. will be applied for HEAD one of these days. i leave the issue open still.
#3
I just downloaded the 4.5 mailhandler module and noticed that it it reprocessed emails that were already read if the "Delete messages after they are processed?" option was unchecked. It looks to me as though there was a simple logic flaw in the code (that's been there for quite a while).
I agree with your decision to use this only on IMAP servers. Some POP3 servers support the read-but-don't-delete option, but they seem sketchy about letting you know what you've already seen, and many ISPs will delete upon reading them, like it or not.
This patch is against your recently updated 4.5 mailhandler code. Thanks, btw.
It's late and I'm tired, so please test this before committing. It appears to be working for me. I'm not even sure if this shouldn't be a separate issue, but it seems related enough.
#4
javanaut - if this patch still looks good to you when you are not tired, please commit it.
#5
committed. This, along with removing support for leaving POP mails undeleted should clear all of this up.
#6