Billionmail/BillionMail · error
missing 'services' section in docker-compose.yml
Error message
missing 'services' section in docker-compose.yml
What it means
Type assertion guard in rebuildPostfixServiceNetworks1: the decoded docker-compose config map lacks a 'services' entry castable to map[string]interface{}. The compose YAML is missing or malformed at the top level, so there is no services table in which to find the Postfix service.
Source
Thrown at core/internal/service/multi_ip_domain/config_manager.go:612
"subnet": subnet,
"gateway": gateway,
},
}
}
customNet["ipam"] = ipamConfig
networks[networkName] = customNet
}
return nil
}
// rebuildPostfixServiceNetworks Rebuild network configuration for Postfix service
func (m *ConfigManager) rebuildPostfixServiceNetworks1(dockerConfig map[string]interface{}, configs []map[string]interface{}) error {
services, ok := dockerConfig["services"].(map[string]interface{})
if !ok {
return fmt.Errorf("missing 'services' section in docker-compose.yml")
}
postfixService, ok := services["postfix-billionmail"].(map[string]interface{})
if !ok {
return fmt.Errorf("Postfix service 'postfix-billionmail' configuration does not exist")
}
// Create a new network mapping, starting with the default network
newNetworks := map[string]interface{}{
"billionmail-network": map[string]interface{}{
"aliases": []string{"postfix"},
},
}
// Add all active custom networks
for _, config := range configs {
networkName := gconv.String(config["network_name"])
postfixIP := gconv.String(config["postfix_ip"])
alias := gconv.String(config["aliases"])View on GitHub (pinned to fc36c76c05)
Solutions
- Check that the loaded docker-compose.yml contains a top-level 'services:' mapping
- Re-fetch or regenerate the compose file from the canonical BillionMail template
- Validate the YAML with docker compose config before running network rebuild operations
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at core/internal/service/multi_ip_domain/config_manager.go:612 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/0c09d8e9faf076a7.
Report an issue: GitHub.