diff options
-rw-r--r-- | data/example_new.conf | 11 | ||||
-rw-r--r-- | include/extern.h | 2 | ||||
-rw-r--r-- | src/config.c | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index dff8b7644..154683c80 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -246,6 +246,17 @@ mail * It should really exist. */ sendfrom = "services@localhost.net" + + /* + * If set, SENDPASS will be restricted to IRC operators. This directive is + * optional. + * + * WARNING: If you choose to not enable this option, you should limit the + * number of processes that the services user can have at a time (you can + * create a special user for this; remember to NEVER launch Services as + * root). + */ + restrictmail = yes } /* diff --git a/include/extern.h b/include/extern.h index 1b1d8a75d..9ff543839 100644 --- a/include/extern.h +++ b/include/extern.h @@ -313,7 +313,7 @@ E int HostNumber; E bool UseMail; E char *SendMailPath; E char *SendFrom; -E int RestrictMail; +E bool RestrictMail; E int MailDelay; E int DontQuoteAddresses; diff --git a/src/config.c b/src/config.c index 03edb963a..0709f92a7 100644 --- a/src/config.c +++ b/src/config.c @@ -108,7 +108,7 @@ int NewsCount; bool UseMail; char *SendMailPath; char *SendFrom; -int RestrictMail; +bool RestrictMail; int MailDelay; int DontQuoteAddresses; @@ -665,6 +665,7 @@ int ServerConfig::Read(bool bail) {"mail", "usemail", "no", new ValueContainerBool(&UseMail), DT_BOOLEAN, ValidateEmailReg}, {"mail", "sendmailpath", "", new ValueContainerChar(&SendMailPath), DT_CHARPTR, ValidateMail}, {"mail", "sendfrom", "", new ValueContainerChar(&SendFrom), DT_CHARPTR, ValidateMail}, + {"mail", "restrictmail", "no", new ValueContainerBool(&RestrictMail), DT_BOOLEAN, NoValidation}, {"chanserv", "nick", "ChanServ", new ValueContainerChar(&s_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"chanserv", "description", "Channel Registration Service", new ValueContainerChar(&desc_ChanServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"chanserv", "database", "chan.db", new ValueContainerChar(&ChanDBName), DT_CHARPTR, ValidateNotEmpty}, @@ -1361,7 +1362,6 @@ Directive directives[] = { {"RemoteServer3", {{PARAM_STRING, 0, &RemoteServer3}, {PARAM_PORT, 0, &RemotePort3}, {PARAM_STRING, 0, &RemotePassword3}}}, - {"RestrictMail", {{PARAM_SET, PARAM_RELOAD, &RestrictMail}}}, {"RestrictOperNicks", {{PARAM_SET, PARAM_RELOAD, &RestrictOperNicks}}}, {"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}}, {"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}}, |