Skip to content

Commit 06fd524

Browse files
committed
cli/ctl: Add --no-specialuse flag for imap-acct create
1 parent 69b434f commit 06fd524

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/cli/ctl/imapacct.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ creates a set of default folder (mailboxes) with special-use attribute set.`,
8181
EnvVars: []string{"MADDY_CFGBLOCK"},
8282
Value: "local_mailboxes",
8383
},
84+
&cli.BoolFlag{
85+
Name: "no-specialuse",
86+
Usage: "Do not create special-use folders",
87+
Value: false,
88+
},
8489
&cli.StringFlag{
8590
Name: "sent-name",
8691
Usage: "Name of special mailbox for sent messages, use empty string to not create any",
@@ -235,6 +240,10 @@ func imapAcctCreate(be module.Storage, ctx *cli.Context) error {
235240
fmt.Fprintf(os.Stderr, "Note: Storage backend does not support SPECIAL-USE IMAP extension")
236241
}
237242

243+
if ctx.Bool("no-specialuse") {
244+
return nil
245+
}
246+
238247
createMbox := func(name, specialUseAttr string) error {
239248
if suu == nil {
240249
return act.CreateMailbox(name)

0 commit comments

Comments
 (0)