pgp: add options auto-sign & opportunistic-encrypt
Add account level config options for auto-sign and opportunistic encryption. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Koni Marti <koni.marti@gmail.com>
This commit is contained in:
parent
5c5158b3c1
commit
bb400c7d88
3 changed files with 29 additions and 1 deletions
config
|
@ -104,7 +104,11 @@ type AccountConfig struct {
|
|||
SignatureCmd string
|
||||
EnableFoldersSort bool `ini:"enable-folders-sort"`
|
||||
FoldersSort []string `ini:"folders-sort" delim:","`
|
||||
PgpKeyId string `ini:"pgp-key-id"`
|
||||
|
||||
// PGP Config
|
||||
PgpKeyId string `ini:"pgp-key-id"`
|
||||
PgpAutoSign bool `ini:"pgp-auto-sign"`
|
||||
PgpOpportunisticEncrypt bool `ini:"pgp-opportunistic-encrypt"`
|
||||
}
|
||||
|
||||
type BindingConfig struct {
|
||||
|
@ -251,6 +255,10 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
|
|||
account.EnableFoldersSort, _ = strconv.ParseBool(val)
|
||||
} else if key == "pgp-key-id" {
|
||||
account.PgpKeyId = val
|
||||
} else if key == "pgp-auto-sign" {
|
||||
account.PgpAutoSign, _ = strconv.ParseBool(val)
|
||||
} else if key == "pgp-opportunistic-encrypt" {
|
||||
account.PgpOpportunisticEncrypt, _ = strconv.ParseBool(val)
|
||||
} else if key != "name" {
|
||||
account.Params[key] = val
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue