mirror of
https://github.com/directorz/mailfull-go.git
synced 2025-12-17 17:47:04 +00:00
Disable to delete postmaster #14
This commit is contained in:
@@ -59,6 +59,11 @@ func (c *UserDelCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
if userName == "postmaster" {
|
||||
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] Cannot delete postmaster.\n")
|
||||
return 1
|
||||
}
|
||||
|
||||
if err := repo.UserRemove(domainName, userName); err != nil {
|
||||
fmt.Fprintf(c.UI.ErrorWriter, "[ERR] %v\n", err)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user