Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
Subject: Re: Patches for cvs and cvslog
Date: Thu, 03 Jan 2002 17:27:31 +0100	[thread overview]
Message-ID: <m3advvs8lo.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <yllmffo3io.fsf@windlord.stanford.edu>

Russ Allbery <rra@stanford.edu> writes:

> I'd be happy to roll those changes into my version if you have a patch, so
> that you won't have to maintain them locally.

I've included the patch below, but remember: I don't know any Perl, so
try not to hurt yourself too badly when you fall off your chair,
laughing.  :-)

--- cvslog.old	Wed Jan  2 06:27:52 2002
+++ cvslog	Thu Jan  3 17:24:37 2002
@@ -586,6 +586,26 @@
 }
 $data{messages} = [ $data{message} ] unless $data{messages};
 
+my $from_line = "";
+
+if (open (PASSWD, "/usr/local/cvsroot/CVSROOT/passwd")) {
+    my $passwd_user = $ENV{CVSUSER};
+    my $full_name = "CVS";
+    my $email_address = "cvs\@" . `hostname --fqdn`;
+    chomp $email_address;
+    my $line;
+    my @info;
+    while ($line = <PASSWD>) {
+	chomp $line;
+	@info = split (/:/, $line);
+	if ($info[0] eq $passwd_user) {
+	    $full_name = $info[3];
+	    $email_address = $info[4];
+	}
+    }
+    $from_line = "From: \"$full_name\" <$email_address>\n";
+}
+
 # Open our mail program.
 open (MAIL, '| /usr/lib/sendmail -t -oi -oem')
     or die "$0: can't fork /usr/lib/sendmail: $!\n";
@@ -603,7 +623,13 @@
     print MAIL "To: $address\n";
 }
 print MAIL $headers if $headers;
+print MAIL $from_line;
 print MAIL "Subject: $subject", build_subject (\%data), "\n\n";
 
 # Build the message and write it out.
 print MAIL build_header (\%data, $showdir);

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



  reply	other threads:[~2002-01-03 16:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-01  7:32 Lars Magne Ingebrigtsen
2002-01-02  5:27 ` Russ Allbery
2002-01-03 13:25 ` Per Abrahamsen
2002-01-03 14:19   ` Lars Magne Ingebrigtsen
2002-01-03 14:22     ` Lars Magne Ingebrigtsen
2002-01-03 15:17       ` Lars Magne Ingebrigtsen
2002-01-03 15:20         ` Lars Magne Ingebrigtsen
2002-01-03 15:30           ` Per Abrahamsen
2002-01-03 16:25             ` Lars Magne Ingebrigtsen
2002-01-03 15:30         ` Russ Allbery
2002-01-03 16:27           ` Lars Magne Ingebrigtsen [this message]
2002-01-03 16:56             ` Michael Cook
2002-02-17  0:18             ` Russ Allbery
2002-02-18  1:22               ` Lars Magne Ingebrigtsen
2002-02-18  3:32                 ` Russ Allbery
2002-02-18 17:28                 ` Steinar Bang
2002-01-03 15:24     ` Per Abrahamsen
2002-01-03 15:25     ` ShengHuo ZHU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3advvs8lo.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).