From: serassio <> Date: Mon, 15 Aug 2005 00:43:40 +0000 (+0000) Subject: This patch adds new 'mail_program' configuration option in squid.conf. X-Git-Tag: SQUID_3_0_PRE4~689 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d084bf205bb6543d130aa0001eeb5e57ca2e4c50;p=thirdparty%2Fsquid.git This patch adds new 'mail_program' configuration option in squid.conf. This option allow to specify the mailer program name that squid will use to send fatal reports by mail and related command line options. Forward port of Squid 2.5 changes. --- diff --git a/src/cf.data.pre b/src/cf.data.pre index c61291b431..a05b570d43 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.391 2005/06/05 23:29:02 hno Exp $ +# $Id: cf.data.pre,v 1.392 2005/08/14 18:43:40 serassio Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -2929,6 +2929,19 @@ DOC_START DOC_END +NAME: mail_program +TYPE: eol +DEFAULT: mail +LOC: Config.EmailProgram +DOC_START + Email program used to send mail if the cache dies. + The default is "mail". The specified program must complain + with the standard Unix mail syntax: + mail_program recipient < mailfile + Optional command line options can be specified. +DOC_END + + NAME: cache_effective_user TYPE: string DEFAULT: nobody diff --git a/src/structs.h b/src/structs.h index f73d5f80ff..c8a52ae0ba 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.520 2005/06/05 23:29:02 hno Exp $ + * $Id: structs.h,v 1.521 2005/08/14 18:43:41 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -383,6 +383,7 @@ struct _SquidConfig Log; char *adminEmail; + char *EmailProgram; char *effectiveUser; char *visible_appname_string; char *effectiveGroup; diff --git a/src/tools.cc b/src/tools.cc index 7f33a109b1..3c67084a48 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.257 2005/07/09 20:02:49 serassio Exp $ + * $Id: tools.cc,v 1.258 2005/08/14 18:43:41 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -128,7 +128,7 @@ mail_warranty(void) fclose(fp); - snprintf(command, 256, "mail %s < %s", Config.adminEmail, filename); + snprintf(command, 256, "%s %s < %s", Config.EmailProgram, Config.adminEmail, filename); system(command); /* XXX should avoid system(3) */