Changeset View
Changeset View
Standalone View
Standalone View
contrib/dma/conf.c
| Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | while (!feof(conf)) { | ||||
| else if (strcmp(word, "ALIASES") == 0 && data != NULL) | else if (strcmp(word, "ALIASES") == 0 && data != NULL) | ||||
| config.aliases = data; | config.aliases = data; | ||||
| else if (strcmp(word, "SPOOLDIR") == 0 && data != NULL) | else if (strcmp(word, "SPOOLDIR") == 0 && data != NULL) | ||||
| config.spooldir = data; | config.spooldir = data; | ||||
| else if (strcmp(word, "AUTHPATH") == 0 && data != NULL) | else if (strcmp(word, "AUTHPATH") == 0 && data != NULL) | ||||
| config.authpath= data; | config.authpath= data; | ||||
| else if (strcmp(word, "CERTFILE") == 0 && data != NULL) | else if (strcmp(word, "CERTFILE") == 0 && data != NULL) | ||||
| config.certfile = data; | config.certfile = data; | ||||
| else if (strcmp(word, "LMTP") == 0 && data == NULL) | |||||
| config.features |= LMTP; | |||||
| else if (strcmp(word, "MAILNAME") == 0 && data != NULL) | else if (strcmp(word, "MAILNAME") == 0 && data != NULL) | ||||
| config.mailname = data; | config.mailname = data; | ||||
| else if (strcmp(word, "MASQUERADE") == 0 && data != NULL) { | else if (strcmp(word, "MASQUERADE") == 0 && data != NULL) { | ||||
| char *user = NULL, *host = NULL; | char *user = NULL, *host = NULL; | ||||
| if (strrchr(data, '@')) { | if (strrchr(data, '@')) { | ||||
| host = strrchr(data, '@'); | host = strrchr(data, '@'); | ||||
| *host = 0; | *host = 0; | ||||
| host++; | host++; | ||||
| Show All 40 Lines | while (!feof(conf)) { | ||||
| else { | else { | ||||
| errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno); | errlogx(EX_CONFIG, "syntax error in %s:%d", config_path, lineno); | ||||
| /* NOTREACHED */ | /* NOTREACHED */ | ||||
| } | } | ||||
| } | } | ||||
| if ((config.features & NULLCLIENT) && config.smarthost == NULL) { | if ((config.features & NULLCLIENT) && config.smarthost == NULL) { | ||||
| errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path); | errlogx(EX_CONFIG, "%s: NULLCLIENT requires SMARTHOST", config_path); | ||||
| /* NOTREACHED */ | |||||
| } | |||||
| if ((config.features & LMTP) && (config.features & (TLS_OPP | STARTTLS | SECURETRANSFER))) { | |||||
| errlogx(EX_CONFIG, "%s: LMTP does not support TLS", config_path); | |||||
| /* NOTREACHED */ | /* NOTREACHED */ | ||||
| } | } | ||||
| fclose(conf); | fclose(conf); | ||||
| } | } | ||||