From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41504 Path: main.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Patches for cvs and cvslog Date: Thu, 03 Jan 2002 17:27:31 +0100 Organization: Programmerer Ingebrigtsen Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176890 6524 80.91.224.250 (21 Oct 2002 05:08:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:08:10 +0000 (UTC) Return-Path: Original-Received: (qmail 10362 invoked from network); 3 Jan 2002 16:28:27 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 3 Jan 2002 16:28:27 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16MAiw-0007gv-00; Thu, 03 Jan 2002 10:28:10 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 03 Jan 2002 10:28:02 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id KAA00995 for ; Thu, 3 Jan 2002 10:27:50 -0600 (CST) Original-Received: (qmail 10326 invoked by alias); 3 Jan 2002 16:27:54 -0000 Original-Received: (qmail 10321 invoked from network); 3 Jan 2002 16:27:53 -0000 Original-Received: from quimby.gnus.org (HELO quimby2.netfonds.no) (195.204.10.66) by gnus.org with SMTP; 3 Jan 2002 16:27:53 -0000 Original-Received: from news by quimby2.netfonds.no with local (Exim 3.12 #1 (Debian)) id 16MAjq-0003jc-00 for ; Thu, 03 Jan 2002 17:29:06 +0100 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 51 Original-NNTP-Posting-Host: quimbies.gnus.org Original-X-Trace: quimby2.netfonds.no 1010075346 14321 195.204.10.148 (3 Jan 2002 16:29:06 GMT) Original-X-Complaints-To: usenet@quimby2.netfonds.no Original-NNTP-Posting-Date: 3 Jan 2002 16:29:06 GMT Mail-Copies-To: never X-Now-Playing: Hiking's _Viking_ User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1 (i686-pc-linux-gnu) X-Face: |J 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 = ) { + 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