Skip to content

Commit

Permalink
cli/ctl: Add --no-specialuse flag for imap-acct create
Browse files Browse the repository at this point in the history
  • Loading branch information
foxcpp committed Jan 28, 2025
1 parent 69b434f commit 06fd524
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/cli/ctl/imapacct.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ creates a set of default folder (mailboxes) with special-use attribute set.`,
EnvVars: []string{"MADDY_CFGBLOCK"},
Value: "local_mailboxes",
},
&cli.BoolFlag{
Name: "no-specialuse",
Usage: "Do not create special-use folders",
Value: false,
},
&cli.StringFlag{
Name: "sent-name",
Usage: "Name of special mailbox for sent messages, use empty string to not create any",
Expand Down Expand Up @@ -235,6 +240,10 @@ func imapAcctCreate(be module.Storage, ctx *cli.Context) error {
fmt.Fprintf(os.Stderr, "Note: Storage backend does not support SPECIAL-USE IMAP extension")
}

if ctx.Bool("no-specialuse") {
return nil
}

createMbox := func(name, specialUseAttr string) error {
if suu == nil {
return act.CreateMailbox(name)
Expand Down

0 comments on commit 06fd524

Please sign in to comment.