package mail import ( "errors" "github.com/carlosframework/platform/internal/release" ) // ConsoleMailApp is the referrer the console's own sending domain hangs off // in the ops account (internal/console/consolemail.go). It is not a real app: // the console claims the domain under this name so that no app's estate // owns it. The console refuses to create or rename an app onto it, and the // release walks here refuse to tear its domain down, so an app that reaches // the name some other way still cannot take the console's identity with it. const ConsoleMailApp = "console-mail" // ErrConsoleMailReserved is RemoveDomain's refusal of the console's own // sending domain: the ops account's ConsoleMailApp referrer, or a claim that // referrer made. var ErrConsoleMailReserved = errors.New("mail: the console's own sending domain cannot be removed") // isConsoleMail reports whether acct/app is the console's own referrer. func isConsoleMail(acct, app string) bool { return acct == release.OpsAccount && app == ConsoleMailApp }