{"record":{"id":"4db40cd53cdda4c6","repo":"Billionmail/BillionMail","slug":"postfix-billionmail-service-not-found","errorCode":null,"errorMessage":"postfix-billionmail service not found","messagePattern":"postfix-billionmail service not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/multi_ip_domain/config_manager.go","lineNumber":412,"sourceCode":"\t// Find the postfix-billionmail service section\n\tpostfixStartIdx := -1\n\tpostfixNetworksStartIdx := -1\n\tpostfixNetworksEndIdx := -1\n\n\tfor i, line := range lines {\n\t\tif strings.Contains(line, \"postfix-billionmail:\") {\n\t\t\tpostfixStartIdx = i\n\t\t} else if postfixStartIdx != -1 && strings.Contains(line, \"networks:\") {\n\t\t\tpostfixNetworksStartIdx = i\n\t\t} else if postfixNetworksStartIdx != -1 && strings.TrimSpace(line) != \"\" &&\n\t\t\t!strings.HasPrefix(line, \"        \") && !strings.HasPrefix(line, \"\\t\\t\") {\n\t\t\tpostfixNetworksEndIdx = i\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif postfixStartIdx == -1 {\n\t\treturn lines, fmt.Errorf(\"postfix-billionmail service not found\")\n\t}\n\n\t// Copy content up to the postfix networks section\n\tif postfixNetworksStartIdx != -1 {\n\t\tresult = append(result, lines[:postfixNetworksStartIdx+1]...)\n\t} else {\n\t\t// If there is no networks configuration, it needs to be added\n\t\treturn lines, fmt.Errorf(\"postfix-billionmail networks section not found\")\n\t}\n\n\t// Add default billionmail-network configuration with fixed IP\n\tresult = append(result, \"        billionmail-network:\")\n\tresult = append(result, \"          aliases:\")\n\tresult = append(result, \"            - postfix\")\n\tresult = append(result, \"          ipv4_address: 172.66.1.100\")\n\n\t// Add custom network configurations\n\tfor _, cfg := range configs {","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/multi_ip_domain/config_manager.go#L394-L430","documentation":"Raised in modifyPostfixNetworksText when scanning the docker-compose.yml lines finds no line containing 'postfix-billionmail:', meaning the compose file does not define the expected Postfix service block. The function cannot locate the section whose networks list it must rewrite, so the multi-IP network reconfiguration of the compose file aborts.","triggerScenarios":"Thrown at core/internal/service/multi_ip_domain/config_manager.go:412 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the docker-compose.yml actually deployed and confirm the Postfix service is named 'postfix-billionmail'","Restore the service block from the reference compose file shipped with BillionMail","If the service was intentionally renamed, update modifyPostfixNetworksText to match the new service key","Verify the correct compose file path is being passed to modifyDockerComposeText"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fc36c76c050c3775c5e899faf7403cf0262d2744","analyzedAt":"2026-09-05T21:28:54.019Z","contentChangedAt":"2026-09-05T21:28:54.019Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}