changeset 154:b2a4f839affd noffle

[svn] Use sendmail instead of mail
author enz
date Tue, 05 Dec 2000 19:30:50 +0000
parents 945501c95a4e
children 22b81617d427
files src/Makefile.in src/fetch.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/Makefile.in	Fri Oct 27 13:35:51 2000 +0100
+++ b/src/Makefile.in	Tue Dec 05 19:30:50 2000 +0000
@@ -63,10 +63,9 @@
 CC = @CC@
 CONFIGFILE = @CONFIGFILE@
 DOCDIR = @DOCDIR@
-MAILPROG = @MAILPROG@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
-SORTPROG = @SORTPROG@
+SENDMAILPROG = @SENDMAILPROG@
 SPOOLDIR = @SPOOLDIR@
 VERSION = @VERSION@
 
--- a/src/fetch.c	Fri Oct 27 13:35:51 2000 +0100
+++ b/src/fetch.c	Tue Dec 05 19:30:50 2000 +0000
@@ -1,7 +1,7 @@
 /*
   fetch.c
 
-  $Id: fetch.c 207 2000-09-10 12:29:52Z enz $
+  $Id: fetch.c 235 2000-12-05 19:30:50Z enz $
 */
 
 #if HAVE_CONFIG_H
@@ -262,8 +262,7 @@
     sig_t lastHandler;
 
     Log_err( "Return article to '%s' by mail", sender );
-    snprintf( cmd, MAXCHAR, "mail -s '[ NOFFLE: Posting failed ]' '%s'",
-              sender );
+    snprintf( cmd, MAXCHAR, "%s -t -oi", SENDMAILPROG);
     lastHandler = signal( SIGPIPE, SIG_IGN );
     f = popen( cmd, "w" );
     if ( f == NULL )
@@ -271,6 +270,9 @@
     else
     {
         fprintf( f,
+                 "To: %s\n"
+                 "Subject: [ NOFFLE: Posting failed ]\n"
+                 "\n"
                  "\t[ NOFFLE: POSTING OF ARTICLE FAILED ]\n"
                  "\n"
                  "\t[ The posting of your article failed. ]\n"
@@ -282,6 +284,7 @@
                  "\n"
                  "%s"
                  ".\n",
+                 sender,
                  reason, article );
         ret = pclose( f );
         if ( ret != EXIT_SUCCESS )