Bug 29972

Summary: Re: mailwrapper invokes sendmail when resources are tight
Product: Base System Reporter: Giorgos Keramidas <keramida>
Component: binAssignee: GNATS administrator <gnats-admin>
Status: Closed FIXED    
Severity: Affects Only Me CC: FreeBSD-gnats-submit
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   

Description Giorgos Keramidas 2001-08-23 05:30:00 UTC
 From: Peter Pentchev <roam@orbitel.bg>
 Subject: Re: misc/25218: mailwrapper invokes sendmail when resources are tight
 Date: Fri, 6 Apr 2001 15:20:46 +0300
 
 > Mmmm here's an updated patch, which also removes the now-unused
 > default MTA define from pathnames.h (hint given by the submitter
 > in private e-mail).
 
 This patch failed to apply to my -CURRENT sources CVSup'ed today.
 I have made and tested today a new version of it.
 
 But, instead of chasing mailwrapper's sources in an endless
 patch-update-patch loop, I think we should have some comments on the
 suggestion of this PR from people in -CURRENT.
 
 The question still remains.  Do we *want* mailwrapper to invoke
 /usr/libexec/sendmail/sendmail if it fails to open mailer.conf?  If
 yes, this PR should be closed.  If no, the patch be tested by some
 more people and eventually be committed?
 
 					-giorgos
 
 
 ---- patch begins here --------------------------------------------
 
 Index: mailwrapper.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/mailwrapper/mailwrapper.c,v
 retrieving revision 1.7
 diff -u -r1.7 mailwrapper.c
 --- mailwrapper.c	2001/08/09 06:20:18	1.7
 +++ mailwrapper.c	2001/08/23 04:01:49
 @@ -123,14 +123,11 @@
  		addarg(&al, argv[len], 0);
  
  	if ((config = fopen(_PATH_MAILERCONF, "r")) == NULL) {
 -		addarg(&al, NULL, 0);
  		openlog("mailwrapper", LOG_PID, LOG_MAIL);
 -		syslog(LOG_INFO, "can't open %s, using %s as default MTA",
 -		    _PATH_MAILERCONF, _PATH_DEFAULTMTA);
 +		syslog(LOG_INFO, "can't open %s", _PATH_MAILERCONF);
  		closelog();
 -		execve(_PATH_DEFAULTMTA, al.argv, envp);
  		freearg(&al, 0);
 -		err(1, "execing %s", _PATH_DEFAULTMTA);
 +		err(1, "opening %s", _PATH_MAILERCONF);
  		/*NOTREACHED*/
  	}
  
 Index: pathnames.h
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/mailwrapper/pathnames.h,v
 retrieving revision 1.3
 diff -u -r1.3 pathnames.h
 --- pathnames.h	2000/01/10 03:20:13	1.3
 +++ pathnames.h	2001/08/23 03:56:34
 @@ -32,4 +32,3 @@
   */
  
  #define _PATH_MAILERCONF	"/etc/mail/mailer.conf"
 -#define _PATH_DEFAULTMTA	"/usr/libexec/sendmail/sendmail"
Comment 1 dd freebsd_committer freebsd_triage 2001-08-28 13:21:32 UTC
State Changed
From-To: open->closed

not a new pr