From eikemeier@fillmore-labs.com  Thu Sep  4 13:55:36 2003
Return-Path: <eikemeier@fillmore-labs.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id E0E7516A4BF; Thu,  4 Sep 2003 13:55:35 -0700 (PDT)
Received: from mx2.fillmore-labs.com (lima.fillmore-labs.com [62.138.193.83])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id D01EF43FBD; Thu,  4 Sep 2003 13:55:34 -0700 (PDT)
	(envelope-from eikemeier@fillmore-labs.com)
Received: from p5080bd4d.dip.t-dialin.net
	([80.128.189.77] helo=fillmore-labs.com ident=08elo0c54cbj6sto)
	by mx2.fillmore-labs.com with asmtp (TLSv1:AES256-SHA:256)
	(Exim 4.22)
	id 19v18d-000HeC-5C; Thu, 04 Sep 2003 22:55:31 +0200
Message-Id: <3F57A6C0.2030208@fillmore-labs.com>
Date: Thu, 04 Sep 2003 22:55:28 +0200
From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc: "Simon L. Nielsen" <simon@nitro.dk>,
	Tom Rhodes <trhodes@FreeBSD.org>,
	Sheldon Hearn <sheldonh@FreeBSD.org>
Subject: [PATCH] sysinstall: adapt exim settings to rc.subr(8) usage

>Number:         56458
>Category:       bin
>Synopsis:       [PATCH] sysinstall: adapt exim settings to rc.subr(8) usage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 04 14:00:38 PDT 2003
>Closed-Date:    Mon Sep 22 10:49:00 PDT 2003
>Last-Modified:  Mon Sep 22 10:49:00 PDT 2003
>Originator:     Oliver Eikemeier
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 5.1-CURRENT

>Description:
Tweak some of the settings done by sysinstall in
  Configure > Networking > Mail > Exim

This is a followup to PR ports/56450:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=56450
but works with earlier exim packages too.

- add 'enable_exim="YES"' to rc.conf(5)
- exim now has a default configure file in the package
- disable some more scripts that use sendmail specific parameters
- tweak mailer.conf(5) substitution
- use 'N' flag for newsyslog(8)

Thanks to all who have worked on bringing support for alternative MTAs to FreeBSD.

>How-To-Repeat:
>Fix:

--- sysinstall.patch begins here ---
--- src/usr.sbin/sysinstall/config.c.orig	Fri Aug 22 11:56:54 2003
+++ src/usr.sbin/sysinstall/config.c	Thu Sep  4 22:17:44 2003
@@ -1201,14 +1201,7 @@
     }
 
     variable_set2(VAR_SENDMAIL_ENABLE, "NONE", 1);
-
-    if(file_readable("/usr/local/etc/exim/configure.default") &&
-	!file_readable("/usr/local/etc/exim/configure")) {
-	if(vsystem("cp /usr/local/etc/exim/configure.default /usr/local/etc/exim/configure"))
-	    msgConfirm("An error occurred while coping the exim configuration file.\n"
-		       "Please check if exim is working after you have completed this\n"
-		       "installation.\n");
-    }
+    variable_set2("exim_enable", "YES", 1);
 
     /* Update periodic.conf */
     perconf = fopen("/etc/periodic.conf", "a");
@@ -1221,7 +1214,10 @@
 		   "fix this.");
     } else {
 	fprintf(perconf, "# --- Generated by sysinstall ---\n");
+	fprintf(perconf, "daily_clean_hoststat_enable=\"NO\"\n");
 	fprintf(perconf, "daily_status_include_submit_mailq=\"NO\"\n");
+	fprintf(perconf, "daily_status_mail_rejects_enable=\"NO\"\n");
+	fprintf(perconf, "daily_submit_queuerun=\"NO\"\n");
 	fclose(perconf);
     }
 
@@ -1240,8 +1236,10 @@
 	fprintf(mailerconf, "#\n");
 	fprintf(mailerconf, "sendmail	/usr/local/sbin/exim\n");
 	fprintf(mailerconf, "send-mail	/usr/local/sbin/exim\n");
-	fprintf(mailerconf, "mailq		/usr/local/sbin/exim -bp\n");
-	fprintf(mailerconf, "newaliases	/usr/bin/true\n");
+	fprintf(mailerconf, "mailq		/usr/local/sbin/exim\n");
+	fprintf(mailerconf, "newaliases	/usr/local/sbin/exim -bi\n");
+	fprintf(mailerconf, "hoststat	/usr/bin/true\n");
+	fprintf(mailerconf, "purgestat	/usr/bin/true\n");
 	fclose(mailerconf);
     }
 
@@ -1255,8 +1253,8 @@
 		   "rotate the logfiles.");
     } else {
 	fprintf(newsyslogconf, "# --- Generated by sysinstall ---\n");
-	fprintf(newsyslogconf, "/var/log/exim/mainlog	mailnull:mail	640  7	   *	@T00  Z\n");
-	fprintf(newsyslogconf, "/var/log/exim/rejectlog	mailnull:mail	640  7	   *	@T00  Z\n");
+	fprintf(newsyslogconf, "/var/log/exim/mainlog	mailnull:mail	640  7	   *	@T00  ZN\n");
+	fprintf(newsyslogconf, "/var/log/exim/rejectlog	mailnull:mail	640  7	   *	@T00  ZN\n");
 	fclose(newsyslogconf);
     }
 
--- sysinstall.patch ends here ---


>Release-Note:
>Audit-Trail:

From: "Simon L. Nielsen" <simon@FreeBSD.org>
To: Oliver Eikemeier <eikemeier@fillmore-labs.com>
Cc: FreeBSD-gnats-submit@FreeBSD.org,
	Sheldon Hearn <sheldonh@FreeBSD.org>,
	Tom Rhodes <trhodes@FreeBSD.org>
Subject: Re: bin/56458: [PATCH] sysinstall: adapt exim settings to rc.subr(8) usage
Date: Thu, 4 Sep 2003 23:26:24 +0200

 --uXxzq0nDebZQVNAZ
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On 2003.09.04 22:55:28 +0200, Oliver Eikemeier wrote:
 > - add 'enable_exim=3D"YES"' to rc.conf(5)
 > - exim now has a default configure file in the package
 > - disable some more scripts that use sendmail specific parameters
 > - tweak mailer.conf(5) substitution
 > - use 'N' flag for newsyslog(8)
 
 I don't use exim, so I can't comment on whether the changes with regards
 to exim options are correct, but otherwise the patch looks good to me.
 
 > Thanks to all who have worked on bringing support for alternative MTAs
 > to FreeBSD.
 
 Nice to know that someone likes it :-).
 
 > >Fix:
 >=20
 > --- sysinstall.patch begins here ---
 > --- src/usr.sbin/sysinstall/config.c.orig	Fri Aug 22 11:56:54 2003
 > +++ src/usr.sbin/sysinstall/config.c	Thu Sep  4 22:17:44 2003
 > @@ -1201,14 +1201,7 @@
 >      }
 > =20
 >      variable_set2(VAR_SENDMAIL_ENABLE, "NONE", 1);
 > -
 > -    if(file_readable("/usr/local/etc/exim/configure.default") &&
 > -	!file_readable("/usr/local/etc/exim/configure")) {
 > -	if(vsystem("cp /usr/local/etc/exim/configure.default /usr/local/etc/exi=
 m/configure"))
 > -	    msgConfirm("An error occurred while coping the exim configuration f=
 ile.\n"
 > -		       "Please check if exim is working after you have completed this\=
 n"
 > -		       "installation.\n");
 > -    }
 > +    variable_set2("exim_enable", "YES", 1);
 
 This was one of the "hacks" that I wasn't too happy about.  Nice to see
 it go away :-).
 
 --=20
 Simon L. Nielsen
 FreeBSD Documentation Team
 
 --uXxzq0nDebZQVNAZ
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.3 (FreeBSD)
 
 iD8DBQE/V63+h9pcDSc1mlERAuqAAKCPaKySQH034Q7tDU96skzFHj0NXQCglub3
 CekHUyRkAY7P+H0Eh23mRpw=
 =aDUE
 -----END PGP SIGNATURE-----
 
 --uXxzq0nDebZQVNAZ--

From: Sheldon Hearn <sheldonh@starjuice.net>
To: Tom Rhodes <trhodes@FreeBSD.org>
Cc: Oliver Eikemeier <eikemeier@fillmore-labs.com>,
	FreeBSD-gnats-submit@FreeBSD.org, "Simon L. Nielsen" <simon@nitro.dk>
Subject: Re: bin/56458: [PATCH] sysinstall: adapt exim settings to rc.subr(8) usage
Date: Wed, 10 Sep 2003 15:52:11 +0200

 On (2003/09/04 16:24), Tom Rhodes wrote:
 
 > > This is a followup to PR ports/56450:
 > >   http://www.freebsd.org/cgi/query-pr.cgi?pr=56450
 > > but works with earlier exim packages too.
 > 
 > You're welcome, from this end anyways.  I'll look over this and
 > hopefully commit soon.  Thanks for the submission!
 
 Tom, I've committed ports/56450, so you're good to go with this one.
 
 Ciao,
 Sheldon.

From: Tom Rhodes <trhodes@FreeBSD.org>
To: Sheldon Hearn <sheldonh@starjuice.net>
Cc: Oliver Eikemeier <eikemeier@fillmore-labs.com>,
	FreeBSD-gnats-submit@FreeBSD.org, "Simon L. Nielsen" <simon@nitro.dk>
Subject: Re: bin/56458: [PATCH] sysinstall: adapt exim settings to
 rc.subr(8) usage
Date: Wed, 10 Sep 2003 16:13:22 -0400

 On Wed, 10 Sep 2003 15:52:11 +0200
 Sheldon Hearn <sheldonh@starjuice.net> wrote:
 
 > On (2003/09/04 16:24), Tom Rhodes wrote:
 > 
 > > > This is a followup to PR ports/56450:
 > > >   http://www.freebsd.org/cgi/query-pr.cgi?pr=56450
 > > > but works with earlier exim packages too.
 > > 
 > > You're welcome, from this end anyways.  I'll look over this and
 > > hopefully commit soon.  Thanks for the submission!
 > 
 > Tom, I've committed ports/56450, so you're good to go with this one.
 > 
 > Ciao,
 > Sheldon.
 > 
 
 Just committed.  I did a test build first as must be done before any
 commit.  Thanks for the submission Oliver!
 
 -- 
 Tom Rhodes
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Wed Sep 10 14:25:21 PDT 2003 
State-Changed-Why:  
Assign to me.  Committed to CURRENT, I'll MFC soon.  Thanks for the submission! 


Responsible-Changed-From-To: freebsd-bugs->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Wed Sep 10 14:25:21 PDT 2003 
Responsible-Changed-Why:  
Assign to me.  Committed to CURRENT, I'll MFC soon.  Thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56458 

From: Oliver Eikemeier <eikemeier@fillmore-labs.com>
To: Tom Rhodes <trhodes@FreeBSD.org>
Cc: Sheldon Hearn <sheldonh@starjuice.net>,
	FreeBSD-gnats-submit@FreeBSD.org, "Simon L. Nielsen" <simon@nitro.dk>
Subject: Re: bin/56458: [PATCH] sysinstall: adapt exim settings to rc.subr(8)
 usage
Date: Wed, 10 Sep 2003 23:20:58 +0200

 Tom Rhodes wrote:
 
 > On Wed, 10 Sep 2003 15:52:11 +0200
 > Sheldon Hearn <sheldonh@starjuice.net> wrote:
 >
 >>On (2003/09/04 16:24), Tom Rhodes wrote:
 >>
 >>>>This is a followup to PR ports/56450:
 >>>>  http://www.freebsd.org/cgi/query-pr.cgi?pr=56450
 >>>>but works with earlier exim packages too.
 >>>
 >>>You're welcome, from this end anyways.  I'll look over this and
 >>>hopefully commit soon.  Thanks for the submission!
 >>
 >>Tom, I've committed ports/56450, so you're good to go with this one.
 >>
 >>Ciao,
 >>Sheldon.
 >
 > Just committed.  I did a test build first as must be done before any
 > commit.  Thanks for the submission Oliver!
 
 Thanks to you all for your work! The way was already paved for me, I only
 had to plant some flowers along the roadside.
 
 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Mon Sep 22 10:48:16 PDT 2003 
State-Changed-Why:  
MFC of the sysinstall(8) MTA code is complete.  Thanks for the submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=56458 
>Unformatted:
