mirror of
https://github.com/anope/anope.git
synced 2026-07-09 01:43:12 +02:00
Added a config option that allows nix users to fork when sending mail, can drastically speed up mail sending on some boxes
This commit is contained in:
@@ -6,6 +6,7 @@ Anope Version 1.8 - SVN
|
||||
05/22 A Added an internal event called when a nick is ghosted [ #00]
|
||||
05/22 A Added an internal event called when a nick is recovered [ #00]
|
||||
05/23 A Added old nick parameter to EVENT_CHANGE_NICK [ #00]
|
||||
08/13 A Added forking for mail sending on supporting operating systems [ #00]
|
||||
04/15 F Fixed os_info to backup its database on Windows [ #00]
|
||||
04/15 F Fixed a potential crash in cs_clear ops when using UnrealIRCd [#1154]
|
||||
04/16 F Fixed missing TS6SID on FJOIN in inspircd12 [ #00]
|
||||
|
||||
@@ -2,6 +2,13 @@ Anope Version 1.8 - SVN
|
||||
-----------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# ForkForMail [OPTIONAL]
|
||||
#
|
||||
# When enabled, services will fork when sending mail, which means there is no
|
||||
# services lag from mail. This is only supported on operating systems that allow
|
||||
# the use of forking (eg, not Windows).
|
||||
#
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
|
||||
# DefSessionLimit <limit> [REQUIRED]
|
||||
|
||||
@@ -701,6 +701,15 @@ MailDelay 5m
|
||||
|
||||
#DontQuoteAddresses
|
||||
|
||||
# ForkForMail [OPTIONAL]
|
||||
#
|
||||
# When enabled, services will fork when sending mail, which means there is no
|
||||
# services lag from mail. This is only supported on operating systems that allow
|
||||
# the use of forking (eg, not Windows).
|
||||
#
|
||||
|
||||
#ForkForMail
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
# NickServ configuration
|
||||
|
||||
@@ -370,6 +370,7 @@ E char *SendFrom;
|
||||
E int RestrictMail;
|
||||
E int MailDelay;
|
||||
E int DontQuoteAddresses;
|
||||
E int ForkForMail;
|
||||
|
||||
E int NSDefFlags;
|
||||
E int NSDefLanguage;
|
||||
|
||||
@@ -127,6 +127,7 @@ char *SendFrom;
|
||||
int RestrictMail;
|
||||
int MailDelay;
|
||||
int DontQuoteAddresses;
|
||||
int ForkForMail;
|
||||
|
||||
static int NSDefNone;
|
||||
char *NSGuestNickPrefix;
|
||||
@@ -429,6 +430,7 @@ Directive directives[] = {
|
||||
{"DisableRaw", {{PARAM_SET, PARAM_RELOAD, &DisableRaw}}},
|
||||
{"DontQuoteAddresses",
|
||||
{{PARAM_SET, PARAM_RELOAD, &DontQuoteAddresses}}},
|
||||
{"ForkForMail", {{PARAM_SET, PARAM_RELOAD, &ForkForMail}}},
|
||||
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
|
||||
{"DefConLevel", {{PARAM_INT, PARAM_RELOAD, &DefConLevel}}},
|
||||
{"DefCon1", {{PARAM_INT, PARAM_RELOAD, &DefCon1}}},
|
||||
|
||||
+10
-1
@@ -175,6 +175,7 @@ MailInfo *MailMemoBegin(NickCore * nc)
|
||||
*/
|
||||
void MailEnd(MailInfo * mail)
|
||||
{
|
||||
int pid = -1;
|
||||
/* - param checking modified because we don't
|
||||
have an user sending this mail.
|
||||
Certus, 02.04.2004 */
|
||||
@@ -187,7 +188,15 @@ void MailEnd(MailInfo * mail)
|
||||
return;
|
||||
}
|
||||
|
||||
pclose(mail->pipe);
|
||||
#ifdef HAVE_FORK
|
||||
if (ForkForMail && !(pid = fork()))
|
||||
{
|
||||
pclose(mail->pipe);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
else if (pid < 0)
|
||||
#endif
|
||||
pclose(mail->pipe);
|
||||
|
||||
if (mail->sender) /* added sender check */
|
||||
mail->sender->lastmail = time(NULL);
|
||||
|
||||
+4
-5
@@ -8,13 +8,12 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="8"
|
||||
VERSION_PATCH="4"
|
||||
VERSION_EXTRA="-git"
|
||||
VERSION_BUILD="3023"
|
||||
VERSION_BUILD="3025"
|
||||
|
||||
# $Log$ # Changes since the 1.8.4 Release
|
||||
#Revision 3023 - Fixed minor wording error, and bumped version log from last
|
||||
commit
|
||||
#Revision 3022 - Removed \'s that appeared in kick message when BSGentleBWReason
|
||||
isn't used
|
||||
#Revision 3025 - Added in mail forking for operating systems that support it
|
||||
#Revision 3023 - Fixed minor wording error, and bumped version log from last commit
|
||||
#Revision 3022 - Removed \'s that appeared in kick message when BSGentleBWReason isn't used
|
||||
#Revision 3021 - Removed Example.confs DefSessionLimit's reference to accepting 0, it doesn't.
|
||||
#Revision 3020 - Fixed bug #1180 - Fixed tracking of internal clients when they change nicks on TS6 IRCds
|
||||
#Revision 3019 - Properly track users hosts when a user is -x and has a vhost via chghost
|
||||
|
||||
Reference in New Issue
Block a user