Billionmail/BillionMail · error

specified user not valid

Error message

specified user not valid

What it means

Guard in RetrieveMountpointByUser: user.Lookup succeeded, but the resolved account's HomeDir does not contain '/home/', so the function's assumption that users live under a /home/<user> layout is violated (e.g. a system account with /var, /root, or /srv home). It rejects the username rather than guessing a mountpoint.

Source

Thrown at core/internal/service/public/common.go:1377

	s := g.Server(consts.DEFAULT_SERVER_NAME)
	if s != nil {
		s.Shutdown()
		s.Start()
	}
}

// Retrieve mountpoint by user
func RetrieveMountpointByUser(username string) (mountpoint string, err error) {
	// Get user home directory
	userInfo, err := user.Lookup(username)
	if err != nil {
		return
	}

	// Get home directory
	homepath := userInfo.HomeDir
	if !strings.Contains(homepath, "/home/") {
		err = errors.New("specified user not valid")
		return
	}

	// Use /home/ to split home directory, take the first part as mountpoint
	mountpoint = strings.Split(homepath, "/home/")[0]

	if mountpoint == "" {
		mountpoint = "/"
	}

	if !FileExists(mountpoint) {
		err = errors.New("mountpoint not exists")
		return
	}

	return
}

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Verify the username passed in is a real tenant account, not a system user like root or www-data
  2. Check /etc/passwd for the account's home directory layout
  3. Restructure mountpoint derivation to not depend on the /home/ convention
  4. Pass an explicit mountpoint instead of deriving it from the username
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/internal/service/public/common.go:1377 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05). Data as JSON: /api/errors/50568507baeeac12. Report an issue: GitHub.