[Popcon-developers] Bug#264593: marked as done (popularity-contest: it should be possible to configure user which invokes sendmail)

Debian Bug Tracking System owner@bugs.debian.org
Fri, 19 Nov 2004 08:18:12 -0800


Your message dated Fri, 19 Nov 2004 11:02:05 -0500
with message-id <E1CVBD3-0007hd-00@newraff.debian.org>
and subject line Bug#264593: fixed in popularity-contest 1.26
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 9 Aug 2004 14:58:03 +0000
>From firefly-mail@gmx.net Mon Aug 09 07:58:03 2004
Return-path: <firefly-mail@gmx.net>
Received: from moutng.kundenserver.de [212.227.126.183] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BuBb9-0003Ig-00; Mon, 09 Aug 2004 07:58:03 -0700
Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de)
	by moutng.kundenserver.de with esmtp (Exim 3.35 #1)
	id 1BuBb8-0002fs-00
	for submit@bugs.debian.org; Mon, 09 Aug 2004 16:58:02 +0200
Received: from [217.85.235.10] (helo=feynman.quark-gluon-plasma.xyz)
	by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-SHA:128)
	(Exim 3.35 #1)
	id 1BuBb7-0006uS-00; Mon, 09 Aug 2004 16:58:02 +0200
Received: from martin by feynman.quark-gluon-plasma.xyz with local (Exim 4.34)
	id 1BuBb5-0001v3-7V; Mon, 09 Aug 2004 16:57:59 +0200
Content-Type: multipart/mixed; boundary="===============0145791431=="
MIME-Version: 1.0
From: Martin Dickopp <martin-deb@zero-based.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: popularity-contest: it should be possible to configure user which invokes
 sendmail
X-Mailer: reportbug 2.63
Date: Mon, 09 Aug 2004 16:57:59 +0200
Message-Id: <E1BuBb5-0001v3-7V@feynman.quark-gluon-plasma.xyz>
X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:c3841196b540e7dd969eca865a159296
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============0145791431==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: popularity-contest
Version: 1.23
Severity: wishlist
Tags: patch

Hi,

I think it is reasonable to configure the MTA so that "root" cannot
send mail to the outside world.  Therefore, I would like to be able
to configure a user as which popcon invokes the MTA.  A patch to add
this functionality is included.

Best regards,
Martin


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.7-3
Locale: LANG=C, LC_CTYPE=de_DE@euro

Versions of packages popularity-contest depends on:
ii  debconf                       1.4.30     Debian configuration management sy
ii  dpkg                          1.10.23    Package maintenance system for Deb
ii  exim4-daemon-light [mail-tran 4.34-4     Lightweight version of the Exim (v

--===============0145791431==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="popcon.diff"

diff -ur popularity-contest-1.23.orig/FAQ popularity-contest-1.23/FAQ
--- popularity-contest-1.23.orig/FAQ	2004-05-14 14:44:53.000000000 +0200
+++ popularity-contest-1.23/FAQ	2004-08-09 14:56:48.000000000 +0200
@@ -42,7 +42,9 @@
 
 A) popularity-contest send the report as root but the email address of the root
    user was not configured properly. With exim, you can add an entry for root
-   in /etc/email-addresses with a suitable address.
+   in /etc/email-addresses with a suitable address. Alternatively, you can
+   specify another user to send the report as by setting MAILUSER in
+   /etc/popularity-contest.conf.
 
    A better fix would be to change popcon.debian.org to not reject emails with
    invalid sender domain in the first place, but it is out of our reach for the
diff -ur popularity-contest-1.23.orig/debian/cron.weekly popularity-contest-1.23/debian/cron.weekly
--- popularity-contest-1.23.orig/debian/cron.weekly	2004-02-10 12:56:26.000000000 +0100
+++ popularity-contest-1.23/debian/cron.weekly	2004-08-09 16:31:07.000000000 +0200
@@ -7,6 +7,7 @@
 
 unset MAILFROM
 unset MAILTO
+unset MAILUSER
 unset MY_HOSTID
 unset PARTICIPATE
 
@@ -41,9 +42,17 @@
 do_sendmail()
 {
 	if [ -n "$MAILFROM" ]; then
-		sendmail -oi -f "$MAILFROM" "$MAILTO"
+		if [ -n "$MAILUSER" ] && [ "$MAILUSER" != root ]; then
+			HOME=/tmp su "$MAILUSER" -s /bin/sh -c "/usr/sbin/sendmail -oi -f \"$MAILFROM\" \"$MAILTO\""
+		else
+			sendmail -oi -f "$MAILFROM" "$MAILTO"
+		fi
 	else
-		sendmail -oi "$MAILTO"
+		if [ -n "$MAILUSER" ] && [ "$MAILUSER" != root ]; then
+			HOME=/tmp su "$MAILUSER" -s /bin/sh -c "/usr/sbin/sendmail -oi \"$MAILTO\""
+		else
+			sendmail -oi "$MAILTO"
+		fi
 	fi
 }
 
diff -ur popularity-contest-1.23.orig/default.conf popularity-contest-1.23/default.conf
--- popularity-contest-1.23.orig/default.conf	2004-01-26 21:59:18.000000000 +0100
+++ popularity-contest-1.23/default.conf	2004-08-09 14:54:25.000000000 +0200
@@ -28,6 +28,11 @@
 #
 #MAILFROM="root@example.org"
 
+# If MAILUSER is set, the MTA is invoked as the specified user;
+# otherwise it is invoked as root.
+#
+#MAILUSER="username"
+
 # MY_HOSTID is a secret number that the popularity-contest receiver
 # uses to keep track of your submissions.  Whenever you send in a
 # new entry, it overwrites the last one that had the same HOSTID.

--===============0145791431==--

---------------------------------------
Received: (at 264593-close) by bugs.debian.org; 19 Nov 2004 16:08:02 +0000
>From katie@ftp-master.debian.org Fri Nov 19 08:08:02 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CVBIo-0005rI-00; Fri, 19 Nov 2004 08:08:02 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1CVBD3-0007hd-00; Fri, 19 Nov 2004 11:02:05 -0500
From: Bill Allombert <ballombe@debian.org>
To: 264593-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#264593: fixed in popularity-contest 1.26
Message-Id: <E1CVBD3-0007hd-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Fri, 19 Nov 2004 11:02:05 -0500
Delivered-To: 264593-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: popularity-contest
Source-Version: 1.26

We believe that the bug you reported is fixed in the latest version of
popularity-contest, which is due to be installed in the Debian FTP archive:

popularity-contest_1.26.dsc
  to pool/main/p/popularity-contest/popularity-contest_1.26.dsc
popularity-contest_1.26.tar.gz
  to pool/main/p/popularity-contest/popularity-contest_1.26.tar.gz
popularity-contest_1.26_all.deb
  to pool/main/p/popularity-contest/popularity-contest_1.26_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 264593@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bill Allombert <ballombe@debian.org> (supplier of updated popularity-contest package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 29 Oct 2004 10:20:28 +0200
Source: popularity-contest
Binary: popularity-contest
Architecture: source all
Version: 1.26
Distribution: unstable
Urgency: low
Maintainer: Popularity Contest Developers <popcon-developers@lists.alioth.debian.org>
Changed-By: Bill Allombert <ballombe@debian.org>
Description: 
 popularity-contest - Vote for your favourite packages automatically
Closes: 264593 265360
Changes: 
 popularity-contest (1.26) unstable; urgency=low
 .
   * popcon.pl: Accomodate with kfreebsd-gnu new URL.
              + Add popcon release stats.
   * popcon-stat.pl: Unclutter the graph.
                   + Generate the popcon release graph.
   * FAQ: Document how to not send popcon email by root. Closes: #264593
          Thanks Martin Dickopp.
        + Document when popularity-contest run and recommends anacron.
          Thanks Martin Rasp.
   * debian/control: Suggests: anacron.
   * Remove regexp to catch .pyc files since there are not in packages.
     Closes: #265360. Thanks Martin v. Loewis.
Files: 
 170a0ceba54270a651605e806d9b71a1 654 misc optional popularity-contest_1.26.dsc
 9d5663f45b6c94546a45afebc709bf8d 49404 misc optional popularity-contest_1.26.tar.gz
 4991e02f43468f96a596ba5b51a1200c 44146 misc optional popularity-contest_1.26_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBng3DeDPs8bVESBURAiIRAJ9jjOXfEMBWWS4i0RMwFxfcm6+tbACdGIlj
rNx9qrRJgHA5wHybGp1Zc8c=
=QC8G
-----END PGP SIGNATURE-----