projects/sievemgr

changeset 22:fc5e6970a0d5 tip

Add support for specifying an authorization identity on the command line
author Guido Berhoerster <guido+sievemgr@berhoerster.name>
date Wed Feb 17 07:50:55 2021 +0100 (4 months ago)
parents ad5f548e3b10
children
files cmd/sievemgr/activate.go cmd/sievemgr/checkspace.go cmd/sievemgr/common.go cmd/sievemgr/delete.go cmd/sievemgr/doc.go cmd/sievemgr/docstr.go cmd/sievemgr/edit.go cmd/sievemgr/get.go cmd/sievemgr/info.go cmd/sievemgr/list.go cmd/sievemgr/main.go cmd/sievemgr/put.go cmd/sievemgr/rename.go
line diff
     1.1 --- a/cmd/sievemgr/activate.go	Wed Feb 03 13:49:51 2021 +0100
     1.2 +++ b/cmd/sievemgr/activate.go	Wed Feb 17 07:50:55 2021 +0100
     1.3 @@ -23,7 +23,9 @@
     1.4  
     1.5  func init() {
     1.6  	cmdActivate.Flag.StringVar(&acctName, "a", "", "Select the account")
     1.7 +	cmdActivate.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     1.8  	cmdDeactivate.Flag.StringVar(&acctName, "a", "", "Select the account")
     1.9 +	cmdDeactivate.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
    1.10  }
    1.11  
    1.12  var cmdActivate = &command{
     2.1 --- a/cmd/sievemgr/checkspace.go	Wed Feb 03 13:49:51 2021 +0100
     2.2 +++ b/cmd/sievemgr/checkspace.go	Wed Feb 17 07:50:55 2021 +0100
     2.3 @@ -30,6 +30,7 @@
     2.4  
     2.5  func init() {
     2.6  	cmdCheckSpace.Flag.StringVar(&acctName, "a", "", "Select the account")
     2.7 +	cmdCheckSpace.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     2.8  }
     2.9  
    2.10  var cmdCheckSpace = &command{
     3.1 --- a/cmd/sievemgr/common.go	Wed Feb 03 13:49:51 2021 +0100
     3.2 +++ b/cmd/sievemgr/common.go	Wed Feb 17 07:50:55 2021 +0100
     3.3 @@ -129,7 +129,7 @@
     3.4  		}
     3.5  	}
     3.6  
     3.7 -	auth := managesieve.PlainAuth("", acct.User, acct.Password, acct.Host)
     3.8 +	auth := managesieve.PlainAuth(authzID, acct.User, acct.Password, acct.Host)
     3.9  	if err := c.Authenticate(auth); err != nil {
    3.10  		return nil, fmt.Errorf("failed to authenticate user %s: %s",
    3.11  			acct.User, err)
     4.1 --- a/cmd/sievemgr/delete.go	Wed Feb 03 13:49:51 2021 +0100
     4.2 +++ b/cmd/sievemgr/delete.go	Wed Feb 17 07:50:55 2021 +0100
     4.3 @@ -23,6 +23,7 @@
     4.4  
     4.5  func init() {
     4.6  	cmdDelete.Flag.StringVar(&acctName, "a", "", "Select the account")
     4.7 +	cmdDelete.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     4.8  }
     4.9  
    4.10  var cmdDelete = &command{
     5.1 --- a/cmd/sievemgr/doc.go	Wed Feb 03 13:49:51 2021 +0100
     5.2 +++ b/cmd/sievemgr/doc.go	Wed Feb 17 07:50:55 2021 +0100
     5.3 @@ -3,17 +3,17 @@
     5.4  
     5.5  Usage:
     5.6  
     5.7 -	sievemgr [-f config] info [-a account]
     5.8 -	sievemgr [-f config] list [-a account]
     5.9 -	sievemgr [-f config] get [-a account] script
    5.10 -	sievemgr [-f config] put [-a account] script [file]
    5.11 -	sievemgr [-f config] activate [-a account] script
    5.12 -	sievemgr [-f config] deactivate [-a account]
    5.13 -	sievemgr [-f config] delete [-a account] script
    5.14 -	sievemgr [-f config] check [-a account] [file]
    5.15 -	sievemgr [-f config] checkspace [-a account] script [file]
    5.16 -	sievemgr [-f config] rename [-a account] old new
    5.17 -	sievemgr [-f config] edit [-a account] script
    5.18 +	sievemgr [-f config] info [-A authzid] [-a account]
    5.19 +	sievemgr [-f config] list [-A authzid] [-a account]
    5.20 +	sievemgr [-f config] get [-A authzid] [-a account] script
    5.21 +	sievemgr [-f config] put [-A authzid] [-a account] script [file]
    5.22 +	sievemgr [-f config] activate [-A authzid] [-a account] script
    5.23 +	sievemgr [-f config] deactivate [-A authzid] [-a account]
    5.24 +	sievemgr [-f config] delete [-A authzid] [-a account] script
    5.25 +	sievemgr [-f config] check [-A authzid] [-a account] [file]
    5.26 +	sievemgr [-f config] checkspace [-A authzid] [-a account] script [file]
    5.27 +	sievemgr [-f config] rename [-A authzid] [-a account] old new
    5.28 +	sievemgr [-f config] edit [-A authzid] [-a account] script
    5.29  	sievemgr [-f config] man
    5.30  
    5.31  Description:
    5.32 @@ -109,60 +109,64 @@
    5.33  
    5.34  Common Options:
    5.35  
    5.36 +	-A authzid
    5.37 +		Specify the authorization identity to assume if permitted by
    5.38 +		the given account credentials.
    5.39 +
    5.40  	-a account
    5.41  		Select account from the configuration file.
    5.42  
    5.43  Subcommands:
    5.44  
    5.45 -	sievemgr [-f config] info [-a account]
    5.46 +	sievemgr [-f config] info [-A authzid] [-a account]
    5.47  
    5.48  Displays information about the ManageSieve server. This includes conformance to
    5.49  RFC 5804, support for TLS connections, supported extensions, available SASL
    5.50  authentication mechanisms, and supported notification methods.
    5.51  
    5.52 -	sievemgr [-f config] list [-a account]
    5.53 +	sievemgr [-f config] list [-A authzid] [-a account]
    5.54  
    5.55  Lists all scripts on the server and indicate which of the is the currently
    5.56  active script.
    5.57  
    5.58 -	sievemgr [-f config] get [-a account] script
    5.59 +	sievemgr [-f config] get [-A authzid] [-a account] script
    5.60  
    5.61  Fetch the contents of script from the server.
    5.62  
    5.63 -	sievemgr [-f config] put [-a account] script [file]
    5.64 +	sievemgr [-f config] put [-A authzid] [-a account] script [file]
    5.65  
    5.66  Submit file under the name script to the server.  If file is not specified,
    5.67  read the script from standard input.  The server will reject a script if it is
    5.68  invalid or a storage quota is exceeded.
    5.69  
    5.70 -	sievemgr [-f config] activate [-a account] script
    5.71 +	sievemgr [-f config] activate [-A authzid] [-a account] script
    5.72  
    5.73  Set script as the active script on the server.
    5.74  
    5.75 -	sievemgr [-f config] deactivate [-a account]
    5.76 +	sievemgr [-f config] deactivate [-A authzid] [-a account]
    5.77  
    5.78  Deactivate the currently active script on the server.
    5.79  
    5.80 -	sievemgr [-f config] delete [-a account] script
    5.81 +	sievemgr [-f config] delete [-A authzid] [-a account] script
    5.82  
    5.83  Delete script from the server.
    5.84  
    5.85 -	sievemgr [-f config] check [-a account] [file]
    5.86 +	sievemgr [-f config] check [-A authzid] [-a account] [file]
    5.87  
    5.88  Check if file is a valid sieve script.  If file is not specified, read the
    5.89  script from standard input.
    5.90  
    5.91 -	sievemgr [-f config] checkspace [-a account] script [file]
    5.92 +	sievemgr [-f config] checkspace [-A authzid] [-a account] script [file]
    5.93  
    5.94  Check if the script in file can be stored on the server without exceeding the
    5.95  storage quota.  If script already exists the server will take overwriting it
    5.96  into account.  If file is not specified, read the script from standard input.
    5.97  
    5.98 -	sievemgr [-f config] rename [-a account] old new
    5.99 +	sievemgr [-f config] rename [-A authzid] [-a account] old new
   5.100  
   5.101  Rename the script old to new.
   5.102  
   5.103 -	sievemgr [-f config] edit [-a account] script
   5.104 +	sievemgr [-f config] edit [-A authzid] [-a account] script
   5.105  
   5.106  Retrieve a copy of script and start the editor referred to in the $EDITOR
   5.107  environment variable.  If the local copy has not been modified or the editor
     6.1 --- a/cmd/sievemgr/docstr.go	Wed Feb 03 13:49:51 2021 +0100
     6.2 +++ b/cmd/sievemgr/docstr.go	Wed Feb 17 07:50:55 2021 +0100
     6.3 @@ -2,4 +2,4 @@
     6.4  
     6.5  package main
     6.6  
     6.7 -const docText = "The sievemgr command is a ManageSieve client.\n\nUsage:\n\n    sievemgr [-f config] info [-a account]\n    sievemgr [-f config] list [-a account]\n    sievemgr [-f config] get [-a account] script\n    sievemgr [-f config] put [-a account] script [file]\n    sievemgr [-f config] activate [-a account] script\n    sievemgr [-f config] deactivate [-a account]\n    sievemgr [-f config] delete [-a account] script\n    sievemgr [-f config] check [-a account] [file]\n    sievemgr [-f config] checkspace [-a account] script [file]\n    sievemgr [-f config] rename [-a account] old new\n    sievemgr [-f config] edit [-a account] script\n    sievemgr [-f config] man\n    sievemgr [-f config] version\n\nDescription:\n\nsievemgr is a client for managing Sieve scripts on remote servers via the\nManageSieve Protocol (RFC 5804). Given valid credentials, sievemgr can be\ninvoked non-interactively in order to retrieve a list of all script scripts,\nretrieve the scripts themselves, publish scripts on a server, or delete them.\nFurthermore, it can be used to change the active script and to display\ninformation about the server.\n\nThe ManageSieve server may either be referred to by a domain name or by its IP\naddress or hostname and optionally the port. If only a domain name was\nspecified a DNS service lookup is performed in order to determine the hostname\nand port of the ManageSieve server. In case no service record exists or no\nport was specified sievemgr will fall back to port 4190.\n\nsievemgr only supports authentication using the SASL PLAIN mechanism and\nrequires support for TLS-encrypted connections via the STARTTLS command when\nconnecting to a server other than localhost.\n\nConfiguration File:\n\nIf a configuration file is not explicitly specified using the -f option\nsievemgr will open the default configuration file in a platform-dependent\nlocation:\n\n    * on Unix either $XDG_CONFIG_HOME/sievemegr/sievemgr.conf if\n      XDG_CONFIG_HOME is set or $HOME/.config/sievemegr/sievemgr.conf\n    * on Darwin $HOME/Library/Application Support/sievemegr/sievemgr.conf\n    * on Windows %APPDATA%\\sievemgr\\sievemgr.conf\n\nThe owner of the file must match the effective user and the permissions of the\nfile must be set to disallow access by group or others.\n\nTokens in the configuration file are seperated by spaces, tabs, and newlines\nand there are three types of tokens: identifiers, strings, and numbers.\nIdentifiers consist of the letters a-z and A-Z, numbers of 0-9. Strings are\nenclosed in double quotes, literal double quotes can be escaped with a\nbackslash and a literal backslash is escaped with another backslash.\n\nThe following tokens are recognized:\n\n    account \"name\"\n    \tDefine an account which is referred to by name. The account\n    \tdefinition ends when another account token is encountered or at\n    \tthe end of the file.\n\n    default\n    \tSet this as the default account.\n\n    host \"name\"\n    \tSpecify the host- or domainname of the ManageSieve server.\n\n    port number\n    \tSpecifiy the port number of the ManageSieve server.  If left\n    \tout and the host token refers to a domainname, sievmgr will\n    \tquery DNS for a SRV record for a ManageSieve service associated\n    \twith the domain and fall back to port 4190.\n\n    user \"name\"\n    \tSet the username of the account.\n\n    pass \"password\"\n    \tSet the password of the account.\n\n    insecure\n    \tOptionally specify that verification of the certificate\n    \tpresented by the server when making a TLS connection should be\n    \tskipped.  This renders the connection insecure and should only\n    \tbe used for testing purposes.\n\nGlobal Options:\n\n    -f config\n    \tSet the name of the configuration file to config.\n\nCommon Options:\n\n    -a account\n    \tSelect account from the configuration file.\n\nSubcommands:\n\n    sievemgr [-f config] info [-a account]\n\nDisplays information about the ManageSieve server. This includes conformance\nto RFC 5804, support for TLS connections, supported extensions, available SASL\nauthentication mechanisms, and supported notification methods.\n\n    sievemgr [-f config] list [-a account]\n\nLists all scripts on the server and indicate which of the is the currently\nactive script.\n\n    sievemgr [-f config] get [-a account] script\n\nFetch the contents of script from the server.\n\n    sievemgr [-f config] put [-a account] script [file]\n\nSubmit file under the name script to the server. If file is not specified,\nread the script from standard input. The server will reject a script if it is\ninvalid or a storage quota is exceeded.\n\n    sievemgr [-f config] activate [-a account] script\n\nSet script as the active script on the server.\n\n    sievemgr [-f config] deactivate [-a account]\n\nDeactivate the currently active script on the server.\n\n    sievemgr [-f config] delete [-a account] script\n\nDelete script from the server.\n\n    sievemgr [-f config] check [-a account] [file]\n\nCheck if file is a valid sieve script. If file is not specified, read the\nscript from standard input.\n\n    sievemgr [-f config] checkspace [-a account] script [file]\n\nCheck if the script in file can be stored on the server without exceeding the\nstorage quota. If script already exists the server will take overwriting it\ninto account. If file is not specified, read the script from standard input.\n\n    sievemgr [-f config] rename [-a account] old new\n\nRename the script old to new.\n\n    sievemgr [-f config] edit [-a account] script\n\nRetrieve a copy of script and start the editor referred to in the $EDITOR\nenvironment variable. If the local copy has not been modified or the editor\nexits with a non-zero exit status the local copy of script will not be\nsubmitted to the server. In case of errors the local copy of the script will\nbe preserved.\n\n    sievemgr [-f config] man\n\nDisplay the user manual.\n\n    sievemgr [-f config] version\n\nShow version information and exit.\n"
     6.8 \ No newline at end of file
     6.9 +const docText = "The sievemgr command is a ManageSieve client.\n\nUsage:\n\n    sievemgr [-f config] info [-A authzid] [-a account]\n    sievemgr [-f config] list [-A authzid] [-a account]\n    sievemgr [-f config] get [-A authzid] [-a account] script\n    sievemgr [-f config] put [-A authzid] [-a account] script [file]\n    sievemgr [-f config] activate [-A authzid] [-a account] script\n    sievemgr [-f config] deactivate [-A authzid] [-a account]\n    sievemgr [-f config] delete [-A authzid] [-a account] script\n    sievemgr [-f config] check [-A authzid] [-a account] [file]\n    sievemgr [-f config] checkspace [-A authzid] [-a account] script [file]\n    sievemgr [-f config] rename [-A authzid] [-a account] old new\n    sievemgr [-f config] edit [-A authzid] [-a account] script\n    sievemgr [-f config] man\n\nDescription:\n\nsievemgr is a client for managing Sieve scripts on remote servers via the\nManageSieve Protocol (RFC 5804). Given valid credentials, sievemgr can be\ninvoked non-interactively in order to retrieve a list of all script scripts,\nretrieve the scripts themselves, publish scripts on a server, or delete them.\nFurthermore, it can be used to change the active script and to display\ninformation about the server.\n\nThe ManageSieve server may either be referred to by a domain name or by its IP\naddress or hostname and optionally the port. If only a domain name was\nspecified a DNS service lookup is performed in order to determine the hostname\nand port of the ManageSieve server. In case no service record exists or no\nport was specified sievemgr will fall back to port 4190.\n\nsievemgr only supports authentication using the SASL PLAIN mechanism and\nrequires support for TLS-encrypted connections via the STARTTLS command when\nconnecting to a server other than localhost.\n\nConfiguration File:\n\nIf a configuration file is not explicitly specified using the -f option\nsievemgr will open the default configuration file in a platform-dependent\nlocation:\n\n    * on Unix either $XDG_CONFIG_HOME/sievemegr/sievemgr.conf if\n      XDG_CONFIG_HOME is set or $HOME/.config/sievemegr/sievemgr.conf\n    * on Darwin $HOME/Library/Application Support/sievemegr/sievemgr.conf\n    * on Windows %APPDATA%\\sievemgr\\sievemgr.conf\n\nThe owner of the file must match the effective user and the permissions of the\nfile must be set to disallow access by group or others.\n\nTokens in the configuration file are seperated by spaces, tabs, and newlines\nand there are three types of tokens: identifiers, strings, and numbers.\nIdentifiers consist of the letters a-z and A-Z, numbers of 0-9. Strings are\nenclosed in double quotes, literal double quotes can be escaped with a\nbackslash and a literal backslash is escaped with another backslash.\n\nThe following tokens are recognized:\n\n    account \"name\"\n    \tDefine an account which is referred to by name. The account\n    \tdefinition ends when another account token is encountered or at\n    \tthe end of the file.\n\n    default\n    \tSet this as the default account.\n\n    host \"name\"\n    \tSpecify the host- or domainname of the ManageSieve server.\n\n    port number\n    \tSpecifiy the port number of the ManageSieve server.  If left\n    \tout and the host token refers to a domainname, sievmgr will\n    \tquery DNS for a SRV record for a ManageSieve service associated\n    \twith the domain and fall back to port 4190.\n\n    user \"name\"\n    \tSet the username of the account.\n\n    pass \"password\"\n    \tSet the password of the account.\n\n    insecure\n    \tOptionally specify that verification of the certificate\n    \tpresented by the server when making a TLS connection should be\n    \tskipped.  This renders the connection insecure and should only\n    \tbe used for testing purposes.\n\nAn example configuration with two accounts is provided below:\n\n    account \"work\" host \"mail.example.com\" port 2000 user \"foo\"\n    account \"private\" default host \"example.net\" user \"baz\" pass \"qux\"\n\nThe first account must be explicitly referred to by its name \"work\". sievemgr\nwill directly connect to the host \"mail.example.com\" using the non-standard\nport 2000 since both host and port are given. The user will be prompted for\nthe account password before authentication is performed with the username\n\"foo\".\n\nThe second account is the default account, host and port name of the server\nwill be determined by looking up the corresponding SRV record associated with\nthe domain \"example.net\". Authentication will be performed non-interactively\nwith the username \"baz\" and password \"qux\".\n\nGlobal Options:\n\n    -f config\n    \tSet the name of the configuration file to config.\n\nCommon Options:\n\n    -A authzid\n    \tSpecify the authorization identity to assume if permitted by\n    \tthe given account credentials.\n\n    -a account\n    \tSelect account from the configuration file.\n\nSubcommands:\n\n    sievemgr [-f config] info [-A authzid] [-a account]\n\nDisplays information about the ManageSieve server. This includes conformance\nto RFC 5804, support for TLS connections, supported extensions, available SASL\nauthentication mechanisms, and supported notification methods.\n\n    sievemgr [-f config] list [-A authzid] [-a account]\n\nLists all scripts on the server and indicate which of the is the currently\nactive script.\n\n    sievemgr [-f config] get [-A authzid] [-a account] script\n\nFetch the contents of script from the server.\n\n    sievemgr [-f config] put [-A authzid] [-a account] script [file]\n\nSubmit file under the name script to the server. If file is not specified,\nread the script from standard input. The server will reject a script if it is\ninvalid or a storage quota is exceeded.\n\n    sievemgr [-f config] activate [-A authzid] [-a account] script\n\nSet script as the active script on the server.\n\n    sievemgr [-f config] deactivate [-A authzid] [-a account]\n\nDeactivate the currently active script on the server.\n\n    sievemgr [-f config] delete [-A authzid] [-a account] script\n\nDelete script from the server.\n\n    sievemgr [-f config] check [-A authzid] [-a account] [file]\n\nCheck if file is a valid sieve script. If file is not specified, read the\nscript from standard input.\n\n    sievemgr [-f config] checkspace [-A authzid] [-a account] script [file]\n\nCheck if the script in file can be stored on the server without exceeding the\nstorage quota. If script already exists the server will take overwriting it\ninto account. If file is not specified, read the script from standard input.\n\n    sievemgr [-f config] rename [-A authzid] [-a account] old new\n\nRename the script old to new.\n\n    sievemgr [-f config] edit [-A authzid] [-a account] script\n\nRetrieve a copy of script and start the editor referred to in the $EDITOR\nenvironment variable. If the local copy has not been modified or the editor\nexits with a non-zero exit status the local copy of script will not be\nsubmitted to the server. In case of errors the local copy of the script will\nbe preserved.\n\n    sievemgr [-f config] man\n\nDisplay the user manual.\n"
    6.10 \ No newline at end of file
     7.1 --- a/cmd/sievemgr/edit.go	Wed Feb 03 13:49:51 2021 +0100
     7.2 +++ b/cmd/sievemgr/edit.go	Wed Feb 17 07:50:55 2021 +0100
     7.3 @@ -38,6 +38,7 @@
     7.4  
     7.5  func init() {
     7.6  	cmdEdit.Flag.StringVar(&acctName, "a", "", "Select the account")
     7.7 +	cmdEdit.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     7.8  }
     7.9  
    7.10  var cmdEdit = &command{
     8.1 --- a/cmd/sievemgr/get.go	Wed Feb 03 13:49:51 2021 +0100
     8.2 +++ b/cmd/sievemgr/get.go	Wed Feb 17 07:50:55 2021 +0100
     8.3 @@ -27,6 +27,7 @@
     8.4  
     8.5  func init() {
     8.6  	cmdGet.Flag.StringVar(&acctName, "a", "", "Select the account")
     8.7 +	cmdGet.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     8.8  }
     8.9  
    8.10  var cmdGet = &command{
     9.1 --- a/cmd/sievemgr/info.go	Wed Feb 03 13:49:51 2021 +0100
     9.2 +++ b/cmd/sievemgr/info.go	Wed Feb 17 07:50:55 2021 +0100
     9.3 @@ -31,6 +31,7 @@
     9.4  
     9.5  func init() {
     9.6  	cmdInfo.Flag.StringVar(&acctName, "a", "", "Select the account")
     9.7 +	cmdInfo.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
     9.8  }
     9.9  
    9.10  var cmdInfo = &command{
    9.11 @@ -77,7 +78,7 @@
    9.12  	}
    9.13  	saslMechs := c.SASLMechanisms()
    9.14  
    9.15 -	auth := managesieve.PlainAuth("", acct.User, acct.Password, acct.Host)
    9.16 +	auth := managesieve.PlainAuth(authzID, acct.User, acct.Password, acct.Host)
    9.17  	if err := c.Authenticate(auth); err != nil {
    9.18  		return fmt.Errorf("failed to authenticate user %s: %s",
    9.19  			acct.User, err)
    10.1 --- a/cmd/sievemgr/list.go	Wed Feb 03 13:49:51 2021 +0100
    10.2 +++ b/cmd/sievemgr/list.go	Wed Feb 17 07:50:55 2021 +0100
    10.3 @@ -27,6 +27,7 @@
    10.4  
    10.5  func init() {
    10.6  	cmdList.Flag.StringVar(&acctName, "a", "", "Select the account")
    10.7 +	cmdList.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
    10.8  }
    10.9  
   10.10  var cmdList = &command{
    11.1 --- a/cmd/sievemgr/main.go	Wed Feb 03 13:49:51 2021 +0100
    11.2 +++ b/cmd/sievemgr/main.go	Wed Feb 17 07:50:55 2021 +0100
    11.3 @@ -48,6 +48,7 @@
    11.4  var (
    11.5  	confFilename   string
    11.6  	acctName       string
    11.7 +	authzID        string
    11.8  )
    11.9  
   11.10  var conf config.Configuration
    12.1 --- a/cmd/sievemgr/put.go	Wed Feb 03 13:49:51 2021 +0100
    12.2 +++ b/cmd/sievemgr/put.go	Wed Feb 17 07:50:55 2021 +0100
    12.3 @@ -31,7 +31,9 @@
    12.4  
    12.5  func init() {
    12.6  	cmdPut.Flag.StringVar(&acctName, "a", "", "Select the account")
    12.7 +	cmdPut.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
    12.8  	cmdCheck.Flag.StringVar(&acctName, "a", "", "Select the account")
    12.9 +	cmdCheck.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
   12.10  }
   12.11  
   12.12  var cmdPut = &command{
    13.1 --- a/cmd/sievemgr/rename.go	Wed Feb 03 13:49:51 2021 +0100
    13.2 +++ b/cmd/sievemgr/rename.go	Wed Feb 17 07:50:55 2021 +0100
    13.3 @@ -23,6 +23,7 @@
    13.4  
    13.5  func init() {
    13.6  	cmdRename.Flag.StringVar(&acctName, "a", "", "Select the account")
    13.7 +	cmdRename.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity")
    13.8  }
    13.9  
   13.10  var cmdRename = &command{