From mkb@wi4d22.informatik.uni-wuerzburg.de  Fri Jul 26 09:52:39 2002
Return-Path: <mkb@wi4d22.informatik.uni-wuerzburg.de>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7249737B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Jul 2002 09:52:39 -0700 (PDT)
Received: from reiher.informatik.uni-wuerzburg.de (wi4d22.informatik.uni-wuerzburg.de [132.187.101.122])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D26D443E42
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 26 Jul 2002 09:52:38 -0700 (PDT)
	(envelope-from mkb@wi4d22.informatik.uni-wuerzburg.de)
Received: by reiher.informatik.uni-wuerzburg.de (Postfix, from userid 1001)
	id 738BAAF11; Fri, 26 Jul 2002 18:52:37 +0200 (CEST)
Message-Id: <20020726165237.738BAAF11@reiher.informatik.uni-wuerzburg.de>
Date: Fri, 26 Jul 2002 18:52:37 +0200 (CEST)
From: Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
Reply-To: Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /etc/periodic/daily/440.status-mailq assumes sendmail
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41012
>Category:       bin
>Synopsis:       /etc/periodic/daily/440.status-mailq assumes sendmail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 26 10:00:03 PDT 2002
>Closed-Date:    Tue Jun 29 13:15:14 GMT 2004
>Last-Modified:  Tue Jun 29 13:15:14 GMT 2004
>Originator:     Matthias Buelow
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD reiher.informatik.uni-wuerzburg.de 4.6-STABLE FreeBSD 4.6-STABLE #0: Sun Jul 7 02:24:38 CEST 2002 mkb@reiher.informatik.uni-wuerzburg.de:/usr/src/sys/compile/REIHER i386

>Description:

The 440.status-mailq daily periodic script seems to assume sendmail
is being used as the mta.
I've got postfix running (from ports) and /usr/bin/mailq is routed
via mailer.conf to the postfix "sendmail" binary, which doesn't
support the following (quoted from script):

...
                    rc=$(case "$daily_status_mailq_shorten" in
                        [Yy][Ee][Ss])
                            mailq -Ac |
                                perl -ne  'print if /^\s+\S+@/' |
...

which prints:


Mail in submit queue:
mailq: illegal option -- A
mailq: fatal: usage: mailq [options]


>How-To-Repeat:
>Fix:

Make the system scripts not assume that sendmail is being used.

>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: Matthias Buelow <mkb@informatik.uni-wuerzburg.de>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/41012: /etc/periodic/daily/440.status-mailq assumes sendmail
Date: Mon, 29 Jul 2002 10:29:48 +0300

 On Fri, Jul 26, 2002 at 06:52:37PM +0200, Matthias Buelow wrote:
 > 
 > >Number:         41012
 > >Category:       bin
 > >Synopsis:       /etc/periodic/daily/440.status-mailq assumes sendmail
 > >Originator:     Matthias Buelow
 > >Release:        FreeBSD 4.6-STABLE i386
 > >Organization:
 > >Environment:
 > System: FreeBSD reiher.informatik.uni-wuerzburg.de 4.6-STABLE FreeBSD 4.6-STABLE #0: Sun Jul 7 02:24:38 CEST 2002 mkb@reiher.informatik.uni-wuerzburg.de:/usr/src/sys/compile/REIHER i386
 > 
 > >Description:
 > 
 > The 440.status-mailq daily periodic script seems to assume sendmail
 > is being used as the mta.
 > I've got postfix running (from ports) and /usr/bin/mailq is routed
 > via mailer.conf to the postfix "sendmail" binary, which doesn't
 > support the following (quoted from script):
 > 
 > ...
 >                     rc=$(case "$daily_status_mailq_shorten" in
 >                         [Yy][Ee][Ss])
 >                             mailq -Ac |
 >                                 perl -ne  'print if /^\s+\S+@/' |
 [snip]
 > Make the system scripts not assume that sendmail is being used.
 
 I believe that it would not be feasible, if at all possible, for the
 system periodic scripts to support the correct syntax for various
 mailers' commands.  An easy workaround would be for you to set
 'daily_status_mailq_enable="NO"' in your /etc/periodic.conf file (it
 might not yet exist, you may have to create it), then copy the system
 script to a different location and either use it as a local daily script
 (as indicated by the daily_local variable in the periodic.conf file), or
 create a different local daily script which invokes that.
 
 You can find a list of all the variables used to control periodic(8)'s
 behavior in the /etc/defaults/periodic.conf file; just as with
 /etc/defaults/rc.conf, you are *not* supposed to modify that file
 directly, rather redefine all variables that you wish to override in the
 /etc/periodic.conf file.
 
 G'luck,
 Peter
 
 -- 
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 This sentence claims to be an Epimenides paradox, but it is lying.

From: "Kim Scarborough" <sluggo@unknown.nu>
To: <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: bin/41012: /etc/periodic/daily/440.status-mailq assumes sendmail
Date: Tue, 13 Aug 2002 11:56:08 -0500

 > I believe that it would not be feasible, if at all possible, for the
 > system periodic scripts to support the correct syntax for various
 > mailers' commands.
 
 Perhaps not, but surely something like this could be added to
 /etc/defaults/periodic.conf:
 
 daily_submit_queuerun_flags=-Ac
 
 Then admins could override it without having to turn it off completely.
 
 
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: gshapiro 
Responsible-Changed-When: Sat Feb 8 11:04:54 PST 2003 
Responsible-Changed-Why:  
Give to the periodic script maintainer.  However, I will comment that I 
believe the solution given by Peter Pentchev is the correct solution. 
I don't think Kim Scarborough's solution will be useful as removing 
those -Ac flags would just duplicate the mailq command done for the 
normal mail queue in that script (before the client mqueue mailq). 
That would just result in the same mailq output being shown twice. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41012 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Tue Jun 29 13:09:04 GMT 2004 
State-Changed-Why:  
I agree with the suggestions in this PR that it's unfeasible to try to 
support more than one mailer.  As sendmail is the system supported mailer, 
the daily scripts use that.  If another mailer is used instead, then the 
user should really implement their own periodic scripts. 

In fact, I'd suggest that installing such a port should also install 
periodic scripts for use with FreeBSD - an interesting exercise for 
the probably already overworked port maintainers!!! 

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