Browse Source

namespace support (I think!)

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
main
Erik Hollensbe 8 months ago
parent
commit
980c8df7df
  1. 7
      sink.go

7
sink.go

@ -74,6 +74,11 @@ func main() {
Aliases: []string{"n"},
Usage: "Don't verify TLS certificates",
},
&cli.StringFlag{
Name: "namespace",
Aliases: []string{"ns", "N"},
Usage: "If non-empty, prepend this to the name of each mailbox, including INBOX",
},
}
app.Action = run
@ -133,7 +138,7 @@ func run(ctx *cli.Context) error {
mailboxes := make(chan *imap.MailboxInfo)
done := make(chan error, 1)
go func() { done <- c.List("", "*", mailboxes) }()
go func() { done <- c.List(ctx.String("namespace"), "*", mailboxes) }()
mbs := []*imap.MailboxInfo{}
for mb := range mailboxes {

Loading…
Cancel
Save