]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Remove the quotes around the MailUtility command to allow the user to call a script...
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:36:49 +0000 (12:36 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 18 Sep 2010 12:36:49 +0000 (12:36 +0000)
email.c
sarg.conf

diff --git a/email.c b/email.c
index 4392e6443bb8eaaf7cacaf8242ed7aacf1bc5839..43514a52327f582e2a9238327a0063d807499759 100644 (file)
--- a/email.c
+++ b/email.c
@@ -258,7 +258,7 @@ int geramail(const char *dirname, int debug, const char *outdir, const char *ema
       while(fgets(warea,sizeof(warea),fp_top3)!=NULL)
          fputs(warea,stdout);
     } else {
-      snprintf(warea,sizeof(warea),"\"%s\" -s \"SARG %s, %s\" \"%s\" <\"%s\"",MailUtility,_("Report"),asctime(local),email,top3);
+      snprintf(warea,sizeof(warea),"%s -s \"SARG %s, %s\" \"%s\" <\"%s\"",MailUtility,_("Report"),asctime(local),email,top3);
       cstatus=system(warea);
       if (!WIFEXITED(cstatus) || WEXITSTATUS(cstatus)) {
          debuga(_("command return status %d\n"),WEXITSTATUS(cstatus));
index e9bce01aeee3c496af8fd8bdcf575ff7ddc63f8d..0c05e41793029250ef60616aa0f3b3ef7bcd074b 100644 (file)
--- a/sarg.conf
+++ b/sarg.conf
 #
 #use_comma no
 
-# TAG: mail_utility mail|mailx
-#      Mail command to use to send reports via SMTP
+# TAG: mail_utility
+#      Mail command to use to send reports via SMTP. Sarg calls it like this:
+#         mail_utility -s "SARG report, date" "output_email" <"mail_content"
+#
+#      Therefore, it is possible to add more arguments to the command by specifying them
+#      here.
+#
+#      If you need too, you can use a shell script to process the content of /dev/stdin
+#      (/dev/stdin is the mail_content passed by sarg to the script) and call whatever
+#      command you like. It is not limited to mailing the report via SMTP.
+#
+#      Don't forget to quote the command if necessary (i.e. if the path contains
+#      characters that must be quoted).
 #
 #mail_utility mailx