Mercurial > projects > sievemgr
diff cmd/sievemgr/info.go @ 22:fc5e6970a0d5 default tip
Add support for specifying an authorization identity on the command line
author | Guido Berhoerster <guido+sievemgr@berhoerster.name> |
---|---|
date | Wed, 17 Feb 2021 07:50:55 +0100 |
parents | d14d93d011d7 |
children |
line wrap: on
line diff
--- a/cmd/sievemgr/info.go Wed Feb 03 13:49:51 2021 +0100 +++ b/cmd/sievemgr/info.go Wed Feb 17 07:50:55 2021 +0100 @@ -31,6 +31,7 @@ func init() { cmdInfo.Flag.StringVar(&acctName, "a", "", "Select the account") + cmdInfo.Flag.StringVar(&authzID, "A", "", "Specify the authorization identity") } var cmdInfo = &command{ @@ -77,7 +78,7 @@ } saslMechs := c.SASLMechanisms() - auth := managesieve.PlainAuth("", acct.User, acct.Password, acct.Host) + auth := managesieve.PlainAuth(authzID, acct.User, acct.Password, acct.Host) if err := c.Authenticate(auth); err != nil { return fmt.Errorf("failed to authenticate user %s: %s", acct.User, err)