User Level Purge From SPAMBOX, IMAP FOLDERS, INBOX broken

cyPHunk

Verified User
Joined
Aug 25, 2006
Messages
15
Hi,

I hope that I am posting this in the right place.
Recently I have been trying to purge various accounts SPAMBOX Folders and Inboxes for some clients who have their email client to not delete mails from the server.

In the past it used to work! Now when I select Spambox and Purge From button. It reduces the size by a few megs. Furthermore, if I try it with Inbox or Imap Folders, it still either doesnt reduce the users mailbox at all OR it reduces it by a few megs only.

If I log into a clients mailbox via webmail and manually delete all of their mail from the Trash or Spam folder, then it reduces the size perfectly as seen in user level of DA.

I dont know what information you guys would need to help me?

Chris
 
while I'm at it... is there a shell script I can run to remove mails from users spamboxes or other imap folders?

Chris
 
see attachment
 

Attachments

  • screenshot - da pop3 purge.jpg
    screenshot - da pop3 purge.jpg
    50.8 KB · Views: 341
I believe there have been shell scripts writen and discussed in previous threads on these forums.

Are you using Maildir or mbox? Have you changed between them since the command works?

Are you using the latest version of DirectAdmin?

Jeff
 
Hello,

Note that the purge will remove the data from that folder's new and cur directories.

Dovecot also has other data for indexing and logging which could be what's showing the space. Check manually to see what it is:
Code:
cd /home/user/imap/domain.com/user/Maildir/.INBOX.spam
ls -la
du | sort -n
John
 
@John,

Does purge also delete the indexes for those directories? Whenever changes are made outside of IMAP to any mail in any Maildir directory, it's important to remove the index files; IMAP will rebuild them the first time the mailbox is accessed.

Jeff
 
Hello,

I went into the DA source to add code to remove the index files, but right in the spot where I would have added it, I had already written myself a note which had this link (2005):
http://www.dovecot.org/list/dovecot/2005-December/010550.html

I also googled a bit and found this more recent confirmation (2009):
http://www.dovecot.org/list/dovecot/2009-July/040896.html

So leaving the index there won't hurt anything. It will speed up the next load since the entire index won't need to be rebuilt. Dovecot will notice the change and update the index ...

However, if we do delete the index file, that would be less confusing, but would slowdown the next imap load since the entire index would have to be rebuilt (slower for thousands of emails).... mind you.. the emails would be deleted after the Purge button, so it wouldn't really matter much (depending on the deletion time frame selected).

I'm easy either way... I can add the code to remove the dovecot.index, dovecot.cache and dovecot.log files if we all agree it's simpler and less confusing.

Another option (to avoid some confusion) would be to add the "dovecot data" in the hover-over popup, so Users know what they're looking at.

John
 
Thanks for the links, John. I'm simply going by what I've had to do in the past when users found they couldn't access their emails. Those times deleting the indexes fixed the problem, but maybe there was something else happening.

I have found out that reubilding even fairly large indexes appears to be fast enough so I didn't notice it in any of the tests I did.

Jeff
 
Hello,

The "Purge From" does not work at all.
Is there a way to debug this?
grep'ed 'purge','rm' from DA and got only .html
What actually does the purging? There must be a script.

(pls don't ask monotonous questions such as "do you use Maildir or mbox..." or "did you search the forum?" or other non-factually-actually-problem-solving-questions)
 
There may or may not be a script; While DirectAdmin uses some scripts, the program itself is written in C++

I resume your point about monotonous questions is directed at me, since I asked these questions previously of another poster. So I won't. I must wonder a bit if it's fair that a poster with 16 posts presumes the questions asked by a poster with over 19,000 posts are unnecessary. Obviously they are to me, or I wouldn't wast time asking them.

Perhaps you can look at that html file and see what clicking on the button calls.

Jeff
 
pls don't take personally.
it was not intended for you, nor i see, nor i care who the poster is.
i read only messages;
i wrote it just in case because i saw a lot of threads where such "monotonous" questions are asked.

now back to the problem:
the question: is there a way to debug Purge function?
any hints
 
Please?

Are there no Directadmin creators here on forums somewhere who could tell about Purge Spam?

As far as i get is this:

Post string: purge=Purge+From&file=spambox&what=all&domain=domain.lt&action=delete
InternalText::init(user)
InternalText::init(user)
InternalText::init(command)
Command::doCommand(/CMD_EMAIL_POP)
InternalText::init(email)
Command::doCommand(/CMD_EMAIL_POP) : finished
Command::run: finished /CMD_EMAIL_POP
Send::sendData(/CMD_EMAIL_POP) sendNothing=0
Send::sendData: DONE. Sent: 179 bytes

But nothing gets deleted actually. (maybe spambox variable is defined not correctly? can't lookup code)

p.s. just remembered one thing, that before DA update it worked just fine. something changed that users should know?
 
Last edited:
Back
Top