Your message dated Fri, 18 Aug 2006 17:24:49 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Fixed in 1.03
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)

--- Begin Message ---
Package: nullmailer
Version: 1.00RC7-20
Severity: normal
Tags: patch

Mail from cron gets an envelope sender address of "unknown" because it
doesn't set $LOGNAME or $USER in the environment.  This patch fixes it by
having nullmailer-inject try getpwnam() for the name if the environment
variables aren't set.

diff -r -X /home/roderick/.diff-exclude -u 
nullmailer-1.00RC7/doc/nullmailer-inject.1 nullmailer/doc/nullmailer-inject.1
--- nullmailer-1.00RC7/doc/nullmailer-inject.1  2002-12-23 12:43:57.000000000 
-0500
+++ nullmailer/doc/nullmailer-inject.1  2003-10-30 11:15:36.000000000 -0500
@@ -182,9 +182,10 @@
 .BR USER ,
 or
 .BR LOGNAME ,
-whichever comes first or
+whichever comes first.  If none of the above are set the name is taken
+from the password file, or set to
 .I unknown
-if none of the above are set.
+if that fails.
 
 The host name is set by the canonicalized value of
 .BR NULLMAILER_HOST ,
diff -r -X /home/roderick/.diff-exclude -u nullmailer-1.00RC7/src/inject.cc 
nullmailer/src/inject.cc
--- nullmailer-1.00RC7/src/inject.cc    2003-01-03 15:58:19.000000000 -0500
+++ nullmailer/src/inject.cc    2003-10-30 11:15:36.000000000 -0500
@@ -23,6 +23,7 @@
 #include "defines.h"
 #include <ctype.h>
 #include <errno.h>
+#include <pwd.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/wait.h>
@@ -254,6 +255,10 @@
   if(!user) user = getenv("MAILUSER");
   if(!user) user = getenv("USER");
   if(!user) user = getenv("LOGNAME");
+  if(!user) {
+      struct passwd *pw = getpwuid(getuid());
+      if (pw) user = pw->pw_name;
+  }
   if(!user) user = "unknown";
 
   mystring host = getenv("NULLMAILER_HOST");

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux oliver 2.4.20-oliver.5 #1 Sat May 10 10:34:39 EDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages nullmailer depends on:
ii  debconf [debconf-2.0]         1.3.15     Debian configuration management sy
ii  libc6                         2.3.2-7    GNU C Library: Shared libraries an
ii  libgcc1                       1:3.3.2-1  GCC support library
ii  libstdc++5                    1:3.3.2-1  The GNU Standard C++ Library v3
ii  ucf                           0.22       Update Configuration File: preserv

-- debconf information:
* shared/mailname: argon.org
* nullmailer/adminaddr: 
* nullmailer/relayhost: smtp

-- 
Roderick Schertler
[EMAIL PROTECTED]



--- End Message ---
--- Begin Message ---
This patch was added to 1.03, hence closing this bugreport.

                Norbert

--- End Message ---

Reply via email to