delete all mail from all mailboxes

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

delete all mail from all mailboxes

Post by LezM » 2008-05-08 14:09

Hi

I am new here and new to hmail, can someone please assist in pointing me to the easisest way to del all mail from all mailboxes. I am setting up a backup server that extracts mail from my live box, but I don't want to accumilate these mails on the backup server.

Appreciate your help! - LezM

User avatar
mattg
Moderator
Moderator
Posts: 20837
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: delete all mail from all mailboxes

Post by mattg » 2008-05-08 14:39

Test this idea first, but...

Un-install hmailserver, delete the C:\program files\hmailserver\data\ directory, reinstall hmailserver.
Settings and .ini should be untouched. With a new installation you can then restore a backup, but only restore domains and accounts and settings not messages.

Matt
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: delete all mail from all mailboxes

Post by Kaan1983 » 2008-05-08 15:24

I'd write a script getting messageIDs from DB and deleting via API one by one

LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

Re: delete all mail from all mailboxes

Post by LezM » 2008-05-08 15:50

mattg wrote:Test this idea first, but...

Un-install hmailserver, delete the C:\program files\hmailserver\data\ directory, reinstall hmailserver.
Settings and .ini should be untouched. With a new installation you can then restore a backup, but only restore domains and accounts and settings not messages.

Matt
Thanks, Matt - tried this but it still holds "mailbox size" in memory!

LezM

LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

Re: delete all mail from all mailboxes

Post by LezM » 2008-05-08 15:51

Kaan1983 wrote:I'd write a script getting messageIDs from DB and deleting via API one by one
This will be too time consuming - to many email accounts!

LezM

minsik
Normal user
Normal user
Posts: 92
Joined: 2006-08-03 13:08
Location: South Australia

Re: delete all mail from all mailboxes

Post by minsik » 2008-05-09 00:57

LezM wrote:
mattg wrote:Test this idea first, but...

Un-install hmailserver, delete the C:\program files\hmailserver\data\ directory, reinstall hmailserver.
Settings and .ini should be untouched. With a new installation you can then restore a backup, but only restore domains and accounts and settings not messages.

Matt
Thanks, Matt - tried this but it still holds "mailbox size" in memory!

LezM

do you need to run the dbsyncronise program in the

C:\Program Files\hMailServer\Addons\DataDirectorySynchronizer ?
Windows XP
hmailserver (latest beta allways) (except db versions)
test config, trying to convince the boss to use hmail!
ASSP - front end SPam killer

LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

Re: delete all mail from all mailboxes

Post by LezM » 2008-05-09 11:32

Tried running it, but it still does not clear the mailbox size - report reads"skipped...mailbox that has mail

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: delete all mail from all mailboxes

Post by Kaan1983 » 2008-05-09 13:51

LezM wrote:
Kaan1983 wrote:I'd write a script getting messageIDs from DB and deleting via API one by one
This will be too time consuming - to many email accounts!

LezM
You'd be done by now. :|

LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

Re: delete all mail from all mailboxes

Post by LezM » 2008-05-09 17:53

:) Yep, but I am setting up a backup server...this will continuosly fetch mail from my main server, just as a backup. The reason for deleting emails is so that I can delete them about once a week, so if there is a need to run the backup server, there will not be a huge lot in the mailboxes. Makes sense?

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: delete all mail from all mailboxes

Post by Kaan1983 » 2008-05-09 22:50

I'd still go for coding :) (and a stored procedure)

LezM
Normal user
Normal user
Posts: 45
Joined: 2008-05-08 11:32

Re: delete all mail from all mailboxes

Post by LezM » 2008-05-10 10:37

But Hmail has this feature in v4.4 ...as shown in the search index, where you can delete all undelivered mail, but this feature does not show any emails in que, although there are mails in the mailboxes! and selecting "clear" que does nothing!

Post Reply