func (n *mbNaming) Decode(v string) error {
	switch strings.ToLower(v) {
	case "local":
		*n = LocalNaming
	case "full":
		*n = FullNaming
	case "domain":
		*n = DomainNaming
	default:
		return fmt.Errorf("Unknown MailboxNaming strategy: %q", v)
	}
	return nil
}
Decode a naming strategy from string.
package config
import (
	"fmt"
	"log"
	"os"
	"strings"
	"text/tabwriter"
	"time"
	"github.com/inbucket/inbucket/pkg/stringutil"
	"github.com/kelseyhightower/envconfig"
)
const (
	prefix      = "inbucket"
	tableFormat = `Inbucket is configured via the environment. The following environment variables
can be used:
KEY	DEFAULT	DESCRIPTION
{{range .}}{{usage_key .}}	{{usage_default .}}	{{usage_description .}}
{{end}}`
)
var (
	Version = ""
	BuildDate = ""
)
type mbNaming int
const (
	UnknownNaming mbNaming = iota
	LocalNaming
	FullNaming
	DomainNaming
)