Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-2011, 06:30 AM
Senior Member
 
Posts: 54
Default Deleting account from cli does not delete mailbox?

Hi folks,

Today I deleted some accounts using zmprov da account@domain command.

Account was removed, but it seems that the associated mailbox is still on disk, as i get error messages from mailboxpurge task:

Code:
2011-01-06 15:33:49,398 WARN  [MailboxPurge] [mid=7;] mailbox - no account found in directory for mailbox 7 (was expecting 313562d2-ae6d-4434-8cc5-24d62e49cdfc)
2011-01-06 15:33:49,398 WARN  [MailboxPurge] [mid=7;] purge - Unable to purge mailbox 7
com.zimbra.cs.account.AccountServiceException: no such account: 313562d2-ae6d-4434-8cc5-24d62e49cdfc
ExceptionId:MailboxPurge:1294324429398:2abc3de9bcb87189
Code:account.NO_SUCH_ACCOUNT
        at com.zimbra.cs.account.AccountServiceException.NO_SUCH_ACCOUNT(AccountServiceException.java:177)
        at com.zimbra.cs.mailbox.Mailbox.getAccount(Mailbox.java:522)
        at com.zimbra.cs.mailbox.PurgeThread.run(PurgeThread.java:147)
Is there any CLI command to properly remove mailbox by its ID, or was there any parameter to use with zmprov da command to delete mailbox on the fly?

Thanks for your answers.
Reply With Quote
  #2 (permalink)  
Old 03-05-2011, 10:39 AM
Elite Member
 
Posts: 296
Default

same here
Zibra NE 7.0.0
Code:
011-03-05 19:35:29,734 WARN  [ScheduledTask-1] [mid=7;] mailbox - no account found in directory for mailbox 7 (was expecting 15b931d2-2271-4cb4-8883-2ee2a65dce23)
2011-03-05 19:35:29,734 WARN  [ScheduledTask-1] [mid=7;] datasource - Scheduled DataSource import failed.
com.zimbra.cs.account.AccountServiceException: no such account: 15b931d2-2271-4cb4-8883-2ee2a65dce23
ExceptionId:ScheduledTask-1:1299350129734:36a8385fb95d1500
Code:account.NO_SUCH_ACCOUNT
        at com.zimbra.cs.account.AccountServiceException.NO_SUCH_ACCOUNT(AccountServiceException.java:178)
        at com.zimbra.cs.mailbox.Mailbox.getAccount(Mailbox.java:529)
        at com.zimbra.cs.mailbox.MailboxManager.getMailboxById(MailboxManager.java:474)
        at com.zimbra.cs.mailbox.MailboxManager.getMailboxById(MailboxManager.java:390)
        at com.zimbra.cs.datasource.DataSourceTask.call(DataSourceTask.java:66)
        at com.zimbra.cs.datasource.DataSourceTask.call(DataSourceTask.java:28)
        at com.zimbra.common.util.TaskScheduler$TaskRunner.call(TaskScheduler.java:67)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Reply With Quote
  #3 (permalink)  
Old 03-05-2011, 10:49 AM
Senior Member
 
Posts: 54
Default

Hi Maumar,
Seems that a restart of mailboxd fixes the problem.
Did you try ?
Reply With Quote
  #4 (permalink)  
Old 03-07-2011, 01:11 AM
Elite Member
 
Posts: 296
Default

thnx for suggestion.....
i just issue a
Code:
zmcontrol restart
but it didn't solve anything, sadly
Reply With Quote
  #5 (permalink)  
Old 12-28-2011, 11:28 PM
Starter Member
 
Posts: 1
Default

I have the same problem...
Reply With Quote
  #6 (permalink)  
Old 01-05-2012, 06:05 AM
New Member
 
Posts: 4
Default

Same problem in our environment with 7.1.1. Here is what I've discovered so far...

Our IDM solution is running the zmprov da on our main LDAP server which results in account removal but not removal of the mail. Tests running zmprov da on our mailbox servers instead of the LDAP server seem to remove both the account and the mail. The tests also reveal the zmprov da does not need to be run on the same mailbox server as the mailbox you are trying to removal. It only needs to be run on a mailbox server. Based on these findings we are going to adjust our IDM to run the zmprov da on one of our mailbox servers.

I'm still researching how to clean up the orphaned mailboxes.

Cheers
Chad
Reply With Quote
  #7 (permalink)  
Old 01-12-2012, 07:44 AM
New Member
 
Posts: 4
Default

Zimbra support provided a perl script called zmfindorphans.

In a nutshell... The script compares the zimbraIds from LDAP with those in MySQL. The Ids that exist in the database but not LDAP are orphaned so the script removes Id from the database and directory containing the mail.

Chad
Reply With Quote
  #8 (permalink)  
Old 02-02-2012, 11:32 PM
Elite Member
 
Posts: 296
Default

I have some NE and some OS zimbra installations.
Should I open a support ticket to have the script? or you can share freely it with us?
Reply With Quote
  #9 (permalink)  
Old 02-03-2012, 08:36 AM
New Member
 
Posts: 4
Default Orphan Cleanup Script

I pinged support and they said it was ok to share. Find attached.

Cheers
Chad
Attached Files
File Type: txt zmfindorphans.txt (5.5 KB, 33 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.