zmprov deleteAccount

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
nirt
Advanced member
Advanced member
Posts: 82
Joined: Sat Sep 13, 2014 1:54 am

zmprov deleteAccount

Post by nirt »

Hi,

I'm try to make script to delete account from cli using
su - zimbra
zmprov deleteAccount user@domain.local
returns:
-l option is specified. Only the LDAP entry of the account will be deleted.
DB data of the account and associated blobs will not be deleted.

Continue? [Y]es, [N]o:


yes only delete ldap no data of mailbox, and no (no action executed)


our problem is seems taht doesn't delete because implies by default -l that I suspect that only delete ldap but not mysqwl, and mailbox account


checking https://wiki.zimbra.com/wiki/Zmprov
seems that command is correct but we don't know why executes -l also....

Any suggestion?

Thanks
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 582
Joined: Thu Jan 30, 2014 11:13 am
Contact:

Re: zmprov deleteAccount

Post by adrian.gibanel.btactic »

nirt wrote: Tue Sep 09, 2025 1:43 pm Hi,

I'm try to make script to delete account from cli using
su - zimbra
zmprov deleteAccount user@domain.local
returns:
-l option is specified. Only the LDAP entry of the account will be deleted.
DB data of the account and associated blobs will not be deleted.

Continue? [Y]es, [N]o:
Make sure to run it from the Mailbox node.
nirt
Advanced member
Advanced member
Posts: 82
Joined: Sat Sep 13, 2014 1:54 am

Re: zmprov deleteAccount

Post by nirt »

Yes, I'm running from a all in one server, any other situation to check is 8.8.15?
It is reqrried to run same mailbopx where is mailbox or any mailbox?

It is
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 582
Joined: Thu Jan 30, 2014 11:13 am
Contact:

Re: zmprov deleteAccount

Post by adrian.gibanel.btactic »

Your best bet is to run it from the mailbox node who has the account.

Maybe the system detects the account has never been used and thus is equivalent to an ldap request.
This makes sense if this is tied to an Active Directory Auto Provisioning with lazy mode.
ghen
Outstanding Member
Outstanding Member
Posts: 418
Joined: Thu May 12, 2016 1:56 pm
Location: Belgium

Re: zmprov deleteAccount

Post by ghen »

Apparantly it wants to send the zmprov request directly to LDAP (zmprov -l), instead of SOAP, which should be the default on a mailstore node.
Can you try with "zmprov -s localhost" ?
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 582
Joined: Thu Jan 30, 2014 11:13 am
Contact:

Re: zmprov deleteAccount

Post by adrian.gibanel.btactic »

What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailHost
return?

It should point to an actual Zimbra server (As you what you see in Administration Console. Configure. Servers. )

What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailTransport
return?

It should be an lmtp entry that points to an actual mailbox node server.

My point is that this problem probably only happens in this account for a very specific reason.

If it happens in all the accounts when you are a single server then it might mean that you have done something wrong in the past while installing or renaming your server.
nirt
Advanced member
Advanced member
Posts: 82
Joined: Sat Sep 13, 2014 1:54 am

Re: zmprov deleteAccount

Post by nirt »

ghen wrote: Tue Sep 09, 2025 8:02 pm Apparantly it wants to send the zmprov request directly to LDAP (zmprov -l), instead of SOAP, which should be the default on a mailstore node.
Can you try with "zmprov -s localhost" ?

exactly waht does it means -s localhost in a mutiserver environment, for example if you have 2 mailboes and 2 mtas, what will happen if you execute this from mailbox1 and some mailboces to delete are on store2?

Thanks
nirt
Advanced member
Advanced member
Posts: 82
Joined: Sat Sep 13, 2014 1:54 am

Re: zmprov deleteAccount

Post by nirt »

adrian.gibanel.btactic wrote: Wed Sep 10, 2025 8:01 am What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailHost
return?

--> returns zimbraMailHost: test.domain.local

It should point to an actual Zimbra server (As you what you see in Administration Console. Configure. Servers. )

What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailTransport
return?
--> returns zimbraMailTransport: lmtp:test.domain.local:7025
It should be an lmtp entry that points to an actual mailbox node server.

My point is that this problem probably only happens in this account for a very specific reason.

If it happens in all the accounts when you are a single server then it might mean that you have done something wrong in the past while installing or renaming your server.

This is test was made on a pre environment only 1 standalone server zimbraMailHost: test.domain.local
User avatar
adrian.gibanel.btactic
Outstanding Member
Outstanding Member
Posts: 582
Joined: Thu Jan 30, 2014 11:13 am
Contact:

Re: zmprov deleteAccount

Post by adrian.gibanel.btactic »

nirt wrote: Wed Sep 10, 2025 9:11 am
adrian.gibanel.btactic wrote: Wed Sep 10, 2025 8:01 am What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailHost
return?

--> returns zimbraMailHost: test.domain.local

It should point to an actual Zimbra server (As you what you see in Administration Console. Configure. Servers. )

What does

Code: Select all

zmprov getAccount account@domain.com zimbraMailTransport
return?
--> returns zimbraMailTransport: lmtp:test.domain.local:7025
It should be an lmtp entry that points to an actual mailbox node server.

My point is that this problem probably only happens in this account for a very specific reason.

If it happens in all the accounts when you are a single server then it might mean that you have done something wrong in the past while installing or renaming your server.

This is test was made on a pre environment only 1 standalone server zimbraMailHost: test.domain.local
Well, I have run out of ideas. Maybe it's test.domain.local not resolving to your server ip (Need to test with dig, not with ping), unsure.

Hopefully someone else can have a better idea but I'm quite sure there's something wrong in your setup.

Do you see anything in mailbox.log while you try to run those commands?
ghen
Outstanding Member
Outstanding Member
Posts: 418
Joined: Thu May 12, 2016 1:56 pm
Location: Belgium

Re: zmprov deleteAccount

Post by ghen »

nirt wrote: Wed Sep 10, 2025 9:08 am what will happen if you execute this from mailbox1 and some mailboces to delete are on store2?
That's not a problem, mailstore1 will proxy the SOAP requests to mailstore2. So you can target any mailbox on any mailstore server.

Only if you run zmprov on an LDAP server (which implies zmprov -l), it will remove only the LDAP object, without removing actual mailbox content.
Post Reply