Page 1 of 1

zmprov OUT of maintenance mode

Posted: Fri Sep 13, 2019 10:00 pm
by silverstr8p
I see that I can use

Code: Select all

zmprov ma joe@domain.com zimbraAccountStatus maintenance


To put an account into maintenance, how do I change back to working normally from the command line?

Re: zmprov OUT of maintenance mode

Posted: Fri Sep 13, 2019 11:03 pm
by JDunphy
silverstr8p wrote:I see that I can use

Code: Select all

zmprov ma joe@domain.com zimbraAccountStatus maintenance


To put an account into maintenance, how do I change back to working normally from the command line?

active is the normal state

Code: Select all

# su - zimbra
% zmprov ga joe@domain.com zimbraAccountStatus
zimbraAccountStatus: active
% zmprov ma joe@domain.com zimbraAccountStatus maintenance
% zmprov ga joe@domain.com zimbraAccountStatus
zimbraAccountStatus: maintenance
% zmprov ma joe@domain.com zimbraAccountStatus active
% zmprov ga joe@domain.com zimbraAccountStatus
zimbraAccountStatus: active

Re: zmprov OUT of maintenance mode

Posted: Sat Sep 14, 2019 10:10 am
by L. Mark Stone
And for any zmprov variable, you can get the allowed values and other information by getting a description of the attribute:

Code: Select all

zmprov desc -a zimbraAccountStatus


Hope that helps,
Mark

Re: zmprov OUT of maintenance mode

Posted: Sat Sep 14, 2019 2:02 pm
by JDunphy
Thanks for sharing Mark,

I looked at the source code for this answer which took quite a bit longer to see than your suggestion. I didn't realize the states for zimbraAccountStatus were so well documented. I need to remember to zmprov describe first also!

Code: Select all

# su - zimbra
% zmprov desc -a zimbraAccountStatus
zimbraAccountStatus
    account status. active - active lockout - no login until lockout
    duration is over, mail delivery OK. locked - no login, mail delivery
    OK. maintenance - no login, no delivery(lmtp server returns 4.x.x
    Persistent Transient Failure). pending - no login, no delivery(lmtp
    server returns 5.x.x Permanent Failure), Account behavior is like
    closed, except that when the status is being set to pending, account
    addresses are not removed from distribution lists. The use case is for
    hosted. New account creation based on invites that are not completed
    until user accepts TOS on account creation confirmation page. closed -
    no login, no delivery(lmtp server returns 5.x.x Permanent Failure),
    all addresses (account main email and all aliases) of the account are
    removed from all distribution lists.

               type : enum
              value : active,maintenance,locked,closed,lockout,pending
           callback : AccountStatus
          immutable : false
        cardinality : single
         requiredIn : account
         optionalIn :
              flags : domainAdminModifiable
           defaults :
                min :
                max :
                 id : 2
    requiresRestart :
              since :
    deprecatedSince :

Re: zmprov OUT of maintenance mode

Posted: Sun Sep 15, 2019 10:18 am
by L. Mark Stone
There’s a similar information mechanism for localconfig variables too, e.g.:

Code: Select all

zmlocalconfig -i ldap_url


Hope that helps,
Mark

Re: zmprov OUT of maintenance mode

Posted: Mon Sep 16, 2019 7:38 pm
by silverstr8p
Thanks for this. While trying to run these commands I got an error that makes me think the SSL is expired?

Code: Select all

./zmprov ma user@somedomain.com zimbraAccountStatus active
ERROR: zclient.IO_ERROR (invoke sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed, server: localhost) (cause: javax.net.ssl.SSLHandshakeException sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed)

So I guess I have to figure out how to update that from the command line, since the admin email account is the one that's set to maintenance :/