]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
This patch adds new 'mail_program' configuration option in squid.conf.
authorserassio <>
Mon, 15 Aug 2005 00:43:40 +0000 (00:43 +0000)
committerserassio <>
Mon, 15 Aug 2005 00:43:40 +0000 (00:43 +0000)
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.

src/cf.data.pre
src/structs.h
src/tools.cc

index c61291b431c452424aec486ab83bdc3ef9844721..a05b570d43bf24dd7bcf6c966fefdcd9bca9ad89 100644 (file)
@@ -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
index f73d5f80fffe85aed45a404f7a120602c00a89a9..c8a52ae0bad9fa7dbcc416e625e9067e56563464 100644 (file)
@@ -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;
index 7f33a109b133be9457e10d6958cb75e346e6bc8b..3c67084a48007cd47411557daf88dce40d50a278 100644 (file)
@@ -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) */