[LON-CAPA-cvs] cvs: CVSROOT / loginfo loginfo.pl
raeburn
raeburn@source.lon-capa.org
Wed, 26 Nov 2008 18:54:53 -0000
raeburn Wed Nov 26 18:54:53 2008 EDT
Modified files:
/CVSROOT loginfo loginfo.pl
Log:
Anti-spam measures.
- Change "From" address for auto-generated mail for CVS commits.
- Revert CVS mailing list name from alias to real address.
(Mailman configs changed accordingly).
Index: CVSROOT/loginfo
diff -u CVSROOT/loginfo:1.5 CVSROOT/loginfo:1.6
--- CVSROOT/loginfo:1.5 Thu May 31 23:21:26 2007
+++ CVSROOT/loginfo Wed Nov 26 18:54:53 2008
@@ -24,7 +24,7 @@
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
-ALL $CVSROOT/CVSROOT/loginfo.pl lon-capa-cvs-allow@mail.lon-capa.org $USER %{sVv}
+ALL $CVSROOT/CVSROOT/loginfo.pl lon-capa-cvs@mail.lon-capa.org $USER %{sVv}
^loncom $CVSROOT/CVSROOT/cvs2rss.pl %{sVv}
^doc $CVSROOT/CVSROOT/cvs2rss.pl %{sVv}
^rat $CVSROOT/CVSROOT/cvs2rss.pl %{sVv}
Index: CVSROOT/loginfo.pl
diff -u CVSROOT/loginfo.pl:1.8 CVSROOT/loginfo.pl:1.9
--- CVSROOT/loginfo.pl:1.8 Wed Oct 22 22:18:41 2008
+++ CVSROOT/loginfo.pl Wed Nov 26 18:54:53 2008
@@ -25,6 +25,7 @@
# remove double trailing slash
$cvsroot =~ s/\/\/$/\//;
my $cvsusers = "/repository/CVSROOT/cvsusers";
+my $cvshost = "source.lon-capa.org";
# get the id of this process group for use in figuring out
# whether this is the last directory with checkins or not
@@ -33,8 +34,7 @@
# the command line looks something like this for a normal commit:
# ("user@example.com", "cvsuser",
# "module changedfile,1.1,1.2 addedfile,NONE,1.1 removedfile,1.1,NONE")
-my $mailfrom = shift;
-my $mailto = $mailfrom;
+my $mailto = shift;
my $envaddr = $mailto;
my $cvsuser = shift;
@@ -195,7 +195,7 @@
close(FD);
}
-$from ||= "$cvsuser <$mailfrom>";
+$from ||= "$cvsuser <$cvsuser\@$cvshost>";
# "Reply-to: $mailto\n".
# "Date: ".localtime()."\n".