From ignah at banktown.com Tue Mar 9 06:48:01 2004 From: ignah at banktown.com (Nah, Il-Guh) Date: Tue, 09 Mar 2004 15:48:01 +0900 Subject: [cvsspam-devel] patch, new feature senderAlias Message-ID: <404D68A1.9050302@banktown.com> This is a multi-part message in MIME format. --------------070000060900040103030507 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mail.banktown.com id i296eoHA012157 hi all! i am a newbie to cvsspam-devel list. attached is a patch to be applied to v0.2.8 of cvsspam. this patch introduces new feature, senderAlias. i have a CVS Repository, several developers work together. developers have their own email address on different domain. i configured cvs loginfo file like this ALL /path/to/cvsspam/collect_diffs.rb --from "$USER <$USER@banktown.co= m>" %{sVv} so, it's cause incorrect "From" email header to a developer using email address of another domain. i could not find the solution to fix that problem. now. i can use senderAlias in cvsspam.conf like this senderAlias "ignah", "ignah " senderAlias "your_accont", "another " 'ignah' and 'your_account' are the cvs account. it works fine to me. do you think it's helful? thanks. --- cut cut cut --- diff -urN cvsspam-0.2.8-orig/collect_diffs.rb cvsspam-0.2.8/collect_diffs= .rb --- cvsspam-0.2.8-orig/collect_diffs.rb Tue Mar 9 14:46:19 2004 +++ cvsspam-0.2.8/collect_diffs.rb Tue Mar 9 14:47:11 2004 @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -w +#!/usr/local/bin/ruby -w # Part of CVSspam # http://www.badgers-in-foil.co.uk/projects/cvsspam/ @@ -295,6 +295,8 @@ def addHeader(name,val) end def addRecipient(who) + end + def senderAlias(user, email) end class GUESS end diff -urN cvsspam-0.2.8-orig/cvsspam.conf cvsspam-0.2.8/cvsspam.conf --- cvsspam-0.2.8-orig/cvsspam.conf Tue Mar 9 14:46:19 2004 +++ cvsspam-0.2.8/cvsspam.conf Tue Mar 9 14:48:16 2004 @@ -140,3 +140,8 @@ # them happy, you can say $files_in_subject =3D true here. #$files_in_subject =3D false + + +# email sender Aliase +#senderAlias "ignah", "ignah " + diff -urN cvsspam-0.2.8-orig/cvsspam.rb cvsspam-0.2.8/cvsspam.rb --- cvsspam-0.2.8-orig/cvsspam.rb Tue Mar 9 14:46:19 2004 +++ cvsspam-0.2.8/cvsspam.rb Tue Mar 9 14:47:01 2004 @@ -903,7 +903,6 @@ $from_address =3D arg if opt=3D=3D"--from" end - if ARGV.length !=3D 1 if ARGV.length > 1 $stderr.puts "extra arguments not needed: #{ARGV[1, ARGV.length-1].j= oin(', ')}" @@ -919,6 +918,7 @@ $additionalHeaders =3D Array.new $problemHeaders =3D Array.new +$senderAliases =3D Array.new # helper functions called from the 'config file' def addHeader(name, value) @@ -934,12 +934,45 @@ class GUESS end +def senderAlias(user, email) + $senderAliases << [user, email] +end + +def getUser(address) + s =3D address.index('<') + if s =3D=3D nil + s =3D 0 + else + s =3D s + 1 + end + e =3D address.index('@') + if e =3D=3D nil + e =3D address.length + end + user =3D address[s,e-s] + return user +end + + if FileTest.exists?($config) blah("Using config '#{$config}'") load $config else blah("Config file '#{$config}' not found, ignoring") end + +# senderAliases=BF=A1=BC=AD from=B6=F5=C0=C7 user=B0=A1 =C0=D6=B4=C2=C1=F6. +# =BE=F8=C0=B8=B8=E9 default. +unless ($senderAliases.empty?) + $user =3D getUser $from_address + $senderAliases.each do |sender| + if sender[0] =3D=3D $user + $from_address =3D sender[1] + break + end + end +end + if $recipients.empty? fail "No email recipients defined" --- cut cut cut --- --------------070000060900040103030507 Content-Type: application/x-gzip; name="cvsspam-0.2.8-senderAlias.patch.gz" Content-Disposition: inline; filename="cvsspam-0.2.8-senderAlias.patch.gz" Content-Transfer-Encoding: base64 H4sICAZeTUAAA2N2c3NwYW0tMC4yLjgtc2VuZGVyQWxpYXMucGF0Y2gAlVXNbttGED6XTzGh BEgGfyTaim0JViIjaNNLgyKOczEEY0UOxU2oJbG7tCwkeZg8QIEeiiKHonV76Rv0HfoALXrs LpeSSclxEgnQSjOzw5nv+2YU0TgGr+DPILwSIicLr+/v+8dexum8F2ZpiqG8jFSQ8PmsG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7oWmcX/akm qW3wBTO/W9uhigym64AZR/K68Y9WHgYDKNlp8/Xf37p6jW2s17D9LKsW8m2MhoAyjGzrf1Mg 3pfSCAAA --------------070000060900040103030507-- From dave at badgers-in-foil.co.uk Tue Mar 9 11:10:19 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Tue, 9 Mar 2004 11:10:19 +0000 Subject: [cvsspam-devel] patch, new feature senderAlias In-Reply-To: <404D68A1.9050302@banktown.com> References: <404D68A1.9050302@banktown.com> Message-ID: <20040309111018.GA13736@vhost.badgers-in-foil.co.uk> On Tue, Mar 09, 2004 at 03:48:01PM +0900, Nah, Il-Guh wrote: > hi all! > i am a newbie to cvsspam-devel list. Welcome! > attached is a patch to be applied to v0.2.8 of cvsspam. > this patch introduces new feature, senderAlias. > it works fine to me. > do you think it's helful? I think the feature would be very helpful. Note that there's an existing CVS configuration file that could be used for the user to email address mappings, http://cvsbook.red-bean.com/cvsbook.html#users The CVSROOT/users file is used to find the recipient address for 'cvs notify' messages. I think that it should also be used to configure your senderAlias feature. Reusing existing CVS infrastructure seems like a good plan, so I'd like to include your feature, but with this adjustment. As I don't make use of 'cvs notify' or the 'users' file myself, I may have missed a reason why it shouldn't actually be implemented this way, so I'm open to persuasion. What do you think? dave From ignah at banktown.com Wed Mar 10 02:17:33 2004 From: ignah at banktown.com (Nah, Il-Guh) Date: Wed, 10 Mar 2004 11:17:33 +0900 Subject: [cvsspam-devel] patch, new feature senderAlias In-Reply-To: <20040309111018.GA13736@vhost.badgers-in-foil.co.uk> References: <404D68A1.9050302@banktown.com> <20040309111018.GA13736@vhost.badgers-in-foil.co.uk> Message-ID: <404E7ABD.2040602@banktown.com> i think it's a good idea, using CVSROOT/users file. but i also don't make use of the 'users' file. thanks. David Holroyd wrote: > > I think the feature would be very helpful. Note that there's an > existing CVS configuration file that could be used for the user to email > address mappings, > > http://cvsbook.red-bean.com/cvsbook.html#users > > The CVSROOT/users file is used to find the recipient address for 'cvs > notify' messages. I think that it should also be used to configure your > senderAlias feature. Reusing existing CVS infrastructure seems like a > good plan, so I'd like to include your feature, but with this adjustment. > > As I don't make use of 'cvs notify' or the 'users' file myself, I may > have missed a reason why it shouldn't actually be implemented this way, > so I'm open to persuasion. > > What do you think? > > > dave > > _______________________________________________ > cvsspam-devel mailing list > cvsspam-devel@lists.badgers-in-foil.co.uk > http://lists.badgers-in-foil.co.uk/mailman/listinfo/cvsspam-devel > > From Ernest at Beinrohr.sk Wed Mar 10 07:58:15 2004 From: Ernest at Beinrohr.sk (Ernest Beinrohr) Date: Wed, 10 Mar 2004 08:58:15 +0100 Subject: [cvsspam-devel] Error while commiting Message-ID: <404ECA97.2030108@Beinrohr.sk> One of our developers sends me this error log. He tryed to commit some java code. I use the newwest CVSspam. Error: PLUS: /home/cvs/cvsspam/cvsspam.rb:748:in `consume': unmatched ): /\000\000\000\000ODO\b.*)/ (RegexpError) Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:747:in `each' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:747:in `consume' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:836:in `consume' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:362:in `handleLines' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:360:in `each' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:360:in `handleLines' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:1006 Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:998:in `open' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:998 Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:996:in `open' Error: PLUS: from /home/cvs/cvsspam/cvsspam.rb:996 Error: PLUS: /home/cvs/cvsspam/collect_diffs.rb:230:in `mailtest': problem running '/home/cvs/cvsspam/cvsspam.rb' (RuntimeError) Error: PLUS: from /home/cvs/cvsspam/collect_diffs.rb:216:in `choose_operation' Error: PLUS: from /home/cvs/cvsspam/collect_diffs.rb:314 *** -- Ernest Beinrohr, OERNii eAdmin @ axonpro.sk, http://www.axonpro.sk/ +421-2--6241-0360, +421-903--482-603 HomePage: http://www.OERNii.sk/ ICQ: 28153343 --- There are 10 kinds of people, those that understand binary, and those that do not From ignah at banktown.com Wed Mar 10 10:14:21 2004 From: ignah at banktown.com (Nah, Il-Guh) Date: Wed, 10 Mar 2004 19:14:21 +0900 Subject: [cvsspam-devel] patch, download link Message-ID: <404EEA7D.1030203@banktown.com> This is a multi-part message in MIME format. --------------060107060608010509010109 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit hi all. attached file is a patch to be applied to cvsspam v0.2.8 patched by cvsspam-0.2.8-senderAlias.patch. this patch makes download link on the file name, but only works with viewcvs. My CVS Repository has some binary documentation files. clinking the revision of a binary file makes browser shows the content ugly. so i made a link on the file name to download the file. it works on text file too. i hope it's useful. :) thanks. ps1) i am a very novice on the ruby lang. :) the senderAlias patch is my first ruby code, after studing for some hours. you ought to inspect my codes. :) ps2) it's wonderful of you to understand my korean-english. :) --- cut cut cut --- diff -urN cvsspam-0.2.8-org/collect_diffs.rb cvsspam-0.2.8/collect_diffs.rb --- cvsspam-0.2.8-org/collect_diffs.rb 2004-03-10 18:18:38.000000000 +0900 +++ cvsspam-0.2.8/collect_diffs.rb 2004-03-10 18:20:45.000000000 +0900 @@ -1,4 +1,4 @@ -#!/usr/bin/ruby -w +#!/usr/local/bin/ruby -w # Part of CVSspam # http://www.badgers-in-foil.co.uk/projects/cvsspam/ diff -urN cvsspam-0.2.8-org/cvsspam.rb cvsspam-0.2.8/cvsspam.rb --- cvsspam-0.2.8-org/cvsspam.rb 2004-03-10 18:18:26.000000000 +0900 +++ cvsspam-0.2.8/cvsspam.rb 2004-03-10 18:20:52.000000000 +0900 @@ -509,6 +509,10 @@ def diff(file) '->' end + + def download(file, version) + htmlEncode(file.file) + end end # Superclass for objects that can link to CVS frontends on the web (ViewCVS, @@ -539,6 +543,10 @@ def diff(file) "#{super(file)}" end + + def download(file, version) + "#{file.file}" + end end # Link to ViewCVS @@ -567,6 +575,10 @@ add_repo("#{@base_url}#{urlEncode(file.path)}.diff?r1=#{file.fromVer}&r2=#{file.toVer}") end + def download_url(file, version) + add_repo("#{@base_url}/*checkout*/#{urlEncode(file.path)}?rev=#{version}"); + end + private def add_repo(url) if @repository_name @@ -595,6 +607,10 @@ def diff_url(file) "#{@base_url}/diff.php/#{urlEncode(file.path)}?r1=#{file.fromVer}&r2=#{file.toVer}" end + + def download_url(file, version) + htmlEncode(file.file) + end end # Link to CVSweb @@ -614,6 +630,10 @@ def diff_url(file) "#{@base_url}#{urlEncode(file.path)}.diff?r1=text&tr1=#{file.fromVer}&r2=text&tr2=#{file.toVer}&f=h" end + + def download_url(file, version) + htmlEncode(file.file) + end end @@ -626,7 +646,7 @@ print("") print($frontend.path(file.basedir, file.tag)) println("
") - println("
#{htmlEncode(file.file)} added at #{$frontend.version(file.path,file.toVer)}
") + println("
#{$frontend.download(file, file.toVer)} added at #{$frontend.version(file.path,file.toVer)}
") end end @@ -637,7 +657,7 @@ print("") print($frontend.path(file.basedir, file.tag)) println("
") - println("
#{htmlEncode(file.file)} removed after #{$frontend.version(file.path,file.fromVer)}
") + println("
#{$frontend.download(file, file.fromVer)} removed after #{$frontend.version(file.path,file.fromVer)}
") end end @@ -649,7 +669,7 @@ print("") print($frontend.path(file.basedir, file.tag)) println("
") - println("
#{htmlEncode(file.file)} #{$frontend.version(file.path,file.fromVer)} #{$frontend.diff(file)} #{$frontend.version(file.path,file.toVer)}
") + println("
#{$frontend.download(file, file.toVer)} #{$frontend.version(file.path,file.fromVer)} #{$frontend.diff(file)} #{$frontend.version(file.path,file.toVer)}
") end end @@ -1182,7 +1202,7 @@ name = "#{name}" end if file.isEmpty || file.isBinary || (file.removal? && $no_removed_file_diff) - mail.print("#{prefix}#{name}") + mail.print(" #{$frontend.download(file, file.toVer)}"); else mail.print("#{prefix}#{name}") end --- cut cut cut --- --------------060107060608010509010109 Content-Type: text/plain; name="cvsspam-0.2.8-download.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="cvsspam-0.2.8-download.patch" ZGlmZiAtdXJOIGN2c3NwYW0tMC4yLjgtb3JnL2NvbGxlY3RfZGlmZnMucmIgY3Zzc3BhbS0w LjIuOC9jb2xsZWN0X2RpZmZzLnJiDQotLS0gY3Zzc3BhbS0wLjIuOC1vcmcvY29sbGVjdF9k aWZmcy5yYgkyMDA0LTAzLTEwIDE4OjE4OjM4LjAwMDAwMDAwMCArMDkwMA0KKysrIGN2c3Nw YW0tMC4yLjgvY29sbGVjdF9kaWZmcy5yYgkyMDA0LTAzLTEwIDE4OjIwOjQ1LjAwMDAwMDAw MCArMDkwMA0KQEAgLTEsNCArMSw0IEBADQotIyEvdXNyL2Jpbi9ydWJ5IC13DQorIyEvdXNy L2xvY2FsL2Jpbi9ydWJ5IC13DQogDQogIyBQYXJ0IG9mIENWU3NwYW0NCiAjICAgaHR0cDov L3d3dy5iYWRnZXJzLWluLWZvaWwuY28udWsvcHJvamVjdHMvY3Zzc3BhbS8NCmRpZmYgLXVy TiBjdnNzcGFtLTAuMi44LW9yZy9jdnNzcGFtLnJiIGN2c3NwYW0tMC4yLjgvY3Zzc3BhbS5y Yg0KLS0tIGN2c3NwYW0tMC4yLjgtb3JnL2N2c3NwYW0ucmIJMjAwNC0wMy0xMCAxODoxODoy Ni4wMDAwMDAwMDAgKzA5MDANCisrKyBjdnNzcGFtLTAuMi44L2N2c3NwYW0ucmIJMjAwNC0w My0xMCAxODoyMDo1Mi4wMDAwMDAwMDAgKzA5MDANCkBAIC01MDksNiArNTA5LDEwIEBADQog ICBkZWYgZGlmZihmaWxlKQ0KICAgICAnLSZndDsnDQogICBlbmQNCisNCisgIGRlZiBkb3du bG9hZChmaWxlLCB2ZXJzaW9uKQ0KKyAgICBodG1sRW5jb2RlKGZpbGUuZmlsZSkNCisgIGVu ZA0KIGVuZA0KIA0KICMgU3VwZXJjbGFzcyBmb3Igb2JqZWN0cyB0aGF0IGNhbiBsaW5rI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bWFpbC5w cmludCgiPHRkPjx0dD4je3ByZWZpeH08YSBocmVmPVwiI2ZpbGUje2ZpbGVfY291bnR9XCI+ I3tuYW1lfTwvYT48L3R0PjwvdGQ+IikNCiAgICAgZW5kDQo= --------------060107060608010509010109-- From dave at badgers-in-foil.co.uk Wed Mar 10 10:18:44 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 10 Mar 2004 10:18:44 +0000 Subject: [cvsspam-devel] Error while commiting In-Reply-To: <404ECA97.2030108@Beinrohr.sk> References: <404ECA97.2030108@Beinrohr.sk> Message-ID: <20040310101844.GA542@vhost.badgers-in-foil.co.uk> On Wed, Mar 10, 2004 at 08:58:15AM +0100, Ernest Beinrohr wrote: > One of our developers sends me this error log. He tryed to commit some > java code. I use the newwest CVSspam. > > Error: PLUS: /home/cvs/cvsspam/cvsspam.rb:748:in `consume': unmatched ): /\000\000\000\000ODO\b.*)/ (RegexpError) Hmm, the relevant line in the source file is, if line =~ /\b(#{task}\b.*)/ Do you have local additions to the $task_keywords list? If you do, make sure these have don't accidentally contain regular expression meta-characters, or control characters (seems odd that those '\000' are appearing in error messsage). dave From dave at badgers-in-foil.co.uk Thu Mar 11 12:06:50 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Thu, 11 Mar 2004 12:06:50 +0000 Subject: [cvsspam-devel] Re: ccmail feature In-Reply-To: <200403102310.38500.radoeka@xs4all.nl> References: <200403102310.38500.radoeka@xs4all.nl> Message-ID: <20040311120650.GA20998@vhost.badgers-in-foil.co.uk> Hi Richard, On Wed, Mar 10, 2004 at 11:10:38PM +0100, Richard Bos wrote: > Hello Dave, > > some time I ask for a ccmail feature in cvsspam. I'm still longing for it. > Would it be possible for you to give me (again) some pointers were I should > start? Well, it's not something I'd want to include in the distributed version of CVSspam, but I still want to help :) Note: another path you might consider to implement your CCMAIL feature, rather than entering the data into the log message, would be to use the 'user variables' feature of CVS. I belive you could do something like this on the command-line, cvs -sCCMAIL=address1,address2 commit and then later pick up the addresses in the loginfo file, possibly implementing an extra option for collect_diffs, ^projectpath collect_diffs.rb --to address@domain --cc "$CCMAIL" ... User variables are mentioned in the CVS docs here, http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs_18.html#SEC179 I believe sending 'commands' in the log message is bad, but if that what you really want, here are some pointers... > I thought myself that putting a 'match CCMAIL:' functionality in this part of > the code should be the right thing to do, but is that really correct? > (based on version 0.2.8) > > 429 def teardown > 430 unless @comment == @lastComment > 431 println("
")
>     432       encoded = htmlEncode(@comment)
>     433       $commentEncoder.gsub!(encoded)
>     434       println(encoded)
>     435       println("
") > 436 @lastComment = @comment > 437 end This is not far from the code you need to change -- look at the place earlier in teh file where '$commentEncoder' is defined, $commentEncoder = MultiSub.new(commentSubstitutions) commentSubstitutions is a Hash that maps 'regular expression' strings to 'proc' objects. You'd want something like this code snippet, ccmailSub = proc { |match| match =~ /CCMAIL:\s*([^ ]+)/ add_cc_address $1 match } commentSubstitutions['\bCCMAIL:\s*[^ ]+'] = (all off the top of my head -- untested) This adds an extra pattern for the comment-highlighter that doesn't actually change the altered HTML (ccmailSub returns the 'match' unchanged), but extracts a single address from it, and passes it to a add_cc_address function. (or you could just add the text to $recipients) > The other problem I have is that get the right part of the CCMAIL: definition. > I assume that the lib function match must be used, but no clue at the moment > how. It would be nice if you could give some pointers. Find a reference on regular expression syntax to understand what's going on in the example code ('man perlre' on a typical linux system will get you started). Ruby's regular expressions are briefly covered about halfway down this page, http://www.rubycentral.com/book/tut_stdtypes.html It my be that the above code could actually be put into the config file, rather than cvsspam.rb, but I'm not sure if cvsspam.conf is 'load'ed into the script at a point that would make this possible. hope my rambling makes some sense, dave From richard.bos at xs4all.nl Thu Mar 11 21:10:56 2004 From: richard.bos at xs4all.nl (Richard Bos) Date: Thu, 11 Mar 2004 22:10:56 +0100 Subject: [cvsspam-devel] Re: ccmail feature In-Reply-To: <20040311120650.GA20998@vhost.badgers-in-foil.co.uk> References: <200403102310.38500.radoeka@xs4all.nl> <20040311120650.GA20998@vhost.badgers-in-foil.co.uk> Message-ID: <200403112210.56328.richard.bos@xs4all.nl> Op donderdag 11 maart 2004 13:06, schreef David Holroyd: > Note: =A0another path you might consider to implement your CCMAIL > feature, rather than entering the data into the log message, would be to > use the 'user variables' feature of CVS. =A0I belive you could do > something like this on the command-line, > > =A0 cvs -sCCMAIL=3Daddress1,address2 commit > > and then later pick up the addresses in the loginfo file, possibly > implementing an extra option for collect_diffs, > > =A0 ^projectpath=A0=A0collect_diffs.rb --to address@domain --cc "$CCMAIL"= ... > > > User variables are mentioned in the CVS docs here, > > =A0 http://www.cvshome.org/docs/manual/cvs-1.11.13/cvs_18.html#SEC179 > > > > I believe sending 'commands' in the log message is bad, but if that what > you really want, here are some pointers... And why didn't you tell this _great_ proposal from the beginning euh ;) ;) I like this one very much! I have been looking through the information I=20 found about sending mail using ruby and in the information I found I was no= t=20 able to determine how to sent a 'cc'. Just curious is it possible? I think that I'll add the recipients mentioned in CCMAIL to the to-list. Without changing the code the following may already work: ^projectpath=A0=A0collect_diffs.rb --to address@domain "$CCMAIL" ... cvs -sCCMAIL=3D"--to address1 --to address2" commit.... That would be nice :0 =2D-=20 Richard Bos Without a home the journey is endless From richard.bos at xs4all.nl Fri Mar 12 20:27:40 2004 From: richard.bos at xs4all.nl (Richard Bos) Date: Fri, 12 Mar 2004 21:27:40 +0100 Subject: [cvsspam-devel] Re: ccmail feature In-Reply-To: <200403112210.56328.richard.bos@xs4all.nl> References: <200403102310.38500.radoeka@xs4all.nl> <20040311120650.GA20998@vhost.badgers-in-foil.co.uk> <200403112210.56328.richard.bos@xs4all.nl> Message-ID: <200403122127.40157.radoeka@xs4all.nl> Op donderdag 11 maart 2004 22:10, schreef Richard Bos: > I think that I'll add the recipients mentioned in CCMAIL to the to-list. > > Without changing the code the following may already work: > ^projectpath=A0=A0collect_diffs.rb --to address@domain "$CCMAIL" ... > > cvs -sCCMAIL=3D"--to address1 --to address2" commit.... > > That would be nice :0 The format must be a little different to get it working, it should be: collect_diffs.rb --to address@domain {=3DCCMAIL} ... =46urther more the variable must be defined in $HOME/.cvsrc as: cvs -s CCMAIL=3D This prevents an error msg in case the user does not specify the variable o= n=20 the command line. Without the following waning msg is displayed: cvs server: loginfo:17: no such user variable ${=3DCCMAIL} The cmd format is: cvs -s CCMAIL=3D"--to sran@cvs.org" ci file1 =46or now this is sufficient for me :)), thanks a lot for this idea and=20 cvsspam!! =2D-=20 Richard Bos Without a home the journey is endless From dave at badgers-in-foil.co.uk Wed Mar 17 16:01:09 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 17 Mar 2004 16:01:09 +0000 Subject: [cvsspam-devel] Re: ccmail feature In-Reply-To: <200403122127.40157.radoeka@xs4all.nl> References: <200403102310.38500.radoeka@xs4all.nl> <20040311120650.GA20998@vhost.badgers-in-foil.co.uk> <200403112210.56328.richard.bos@xs4all.nl> <200403122127.40157.radoeka@xs4all.nl> Message-ID: <20040317160109.GA11980@vhost.badgers-in-foil.co.uk> On Fri, Mar 12, 2004 at 09:27:40PM +0100, Richard Bos wrote: > Op donderdag 11 maart 2004 22:10, schreef Richard Bos: > > And why didn't you tell this _great_ proposal from the beginning euh ;) ;) Heh. Well, I had only just thought of it :) > > Without changing the code the following may already work: > > ^projectpath??collect_diffs.rb --to address@domain "$CCMAIL" ... > The format must be a little different to get it working, it should be: > collect_diffs.rb --to address@domain {=CCMAIL} ... > > Further more the variable must be defined in $HOME/.cvsrc as: > cvs -s CCMAIL= > > This prevents an error msg in case the user does not specify the variable on > the command line. Without the following waning msg is displayed: > cvs server: loginfo:17: no such user variable ${=CCMAIL} That's unfortunate. I hadn't realised it would be so fiddly to set up this way. > The cmd format is: cvs -s CCMAIL="--to sran@cvs.org" ci file1 > > For now this is sufficient for me :)), thanks a lot for this idea and > cvsspam!! Thanks for working out this solution. At some point, I should add it to an appendix in the documentation. dave From dave at badgers-in-foil.co.uk Wed Mar 17 16:32:38 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 17 Mar 2004 16:32:38 +0000 Subject: [cvsspam-devel] patch, download link In-Reply-To: <404EEA7D.1030203@banktown.com> References: <404EEA7D.1030203@banktown.com> Message-ID: <20040317163238.GB11980@vhost.badgers-in-foil.co.uk> On Wed, Mar 10, 2004 at 07:14:21PM +0900, Nah, Il-Guh wrote: > hi all. > > attached file is a patch to be applied > to cvsspam v0.2.8 patched by cvsspam-0.2.8-senderAlias.patch. > > this patch makes download link on the file name, > but only works with viewcvs. > > My CVS Repository has some binary documentation files. > clinking the revision of a binary file makes browser shows the content ugly. > so i made a link on the file name to download the file. > it works on text file too. I apologise for not having given your patch a try yet. I intend to get around to it at some point. A question: Is diff-output appearing in the email for the binary files that you're talking about? > ps1) > i am a very novice on the ruby lang. :) > the senderAlias patch is my first ruby code, after studing for some hours. > you ought to inspect my codes. :) > > ps2) > it's wonderful of you to understand my korean-english. :) You've got nothing to worry about :) dave From dave at badgers-in-foil.co.uk Wed Mar 17 22:51:46 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 17 Mar 2004 22:51:46 +0000 Subject: [cvsspam-devel] patch, new feature senderAlias In-Reply-To: <404E7ABD.2040602@banktown.com> References: <404D68A1.9050302@banktown.com> <20040309111018.GA13736@vhost.badgers-in-foil.co.uk> <404E7ABD.2040602@banktown.com> Message-ID: <20040317225146.GA17580@vhost.badgers-in-foil.co.uk> On Wed, Mar 10, 2004 at 11:17:33AM +0900, Nah, Il-Guh wrote: > > i think it's a good idea, using CVSROOT/users file. > but i also don't make use of the 'users' file. Attached is a patch to take aliases from a 'users' file, if present. It doesn't require any configuration other than the existance of the file in the correct format. I've given it a quick test and it seems to work. This will probably be included in the next release. dave From dave at badgers-in-foil.co.uk Wed Mar 17 22:53:45 2004 From: dave at badgers-in-foil.co.uk (David Holroyd) Date: Wed, 17 Mar 2004 22:53:45 +0000 Subject: [cvsspam-devel] patch, new feature senderAlias In-Reply-To: <20040317225146.GA17580@vhost.badgers-in-foil.co.uk> References: <404D68A1.9050302@banktown.com> <20040309111018.GA13736@vhost.badgers-in-foil.co.uk> <404E7ABD.2040602@banktown.com> <20040317225146.GA17580@vhost.badgers-in-foil.co.uk> Message-ID: <20040317225345.GB17580@vhost.badgers-in-foil.co.uk> --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 17, 2004 at 10:51:46PM +0000, David Holroyd wrote: > Attached is [...] *sigh* --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sender_alias-patch2.diff" Index: cvsspam.rb =================================================================== RCS file: /var/lib/cvs/cvsspam/cvsspam.rb,v retrieving revision 1.44 diff -u -r1.44 cvsspam.rb --- cvsspam.rb 15 Jan 2004 00:12:48 -0000 1.44 +++ cvsspam.rb 17 Mar 2004 22:41:40 -0000 @@ -905,8 +905,9 @@ - -$config = "#{ENV['CVSROOT']}/CVSROOT/cvsspam.conf" +cvsroot_dir = "#{ENV['CVSROOT']}/CVSROOT" +$config = "#{cvsroot_dir}/cvsspam.conf" +$users_file = "#{cvsroot_dir}/users" $debug = false $recipients = Array.new @@ -1303,6 +1304,20 @@ end +def sender_alias(address) + if File.exists?($users_file) + File.open($users_file) do |io| + io.each_line do |line| + if line =~ /^([^:]+)\s*:\s*([^\s]+)/ + if address == $1 + return $2 + end + end + end + end + end + address +end class MailContext def initialize(io) @@ -1382,6 +1397,7 @@ mailer = SendmailMailer.new end +$from_address = sender_alias($from_address) unless $from_address.nil? mailer.send($from_address, $recipients) do |mail| mail.header("Subject", mailSubject) --VS++wcV0S1rZb1Fb-- From jmoses at lanepress.com Tue Mar 23 18:19:59 2004 From: jmoses at lanepress.com (jmoses@lanepress.com) Date: Tue, 23 Mar 2004 13:19:59 -0500 (EST) Subject: [cvsspam-devel] cvsspam and squirrelmail Message-ID: <33554.10.11.6.152.1080065999.squirrel@mail.4lane.com> Just an fyi, but I don't see it mentioned anywhere here. If you're using squirrelmail as your mail client, and are annoyed at the fact that the cvsspam emails are formatted almost correctly, but styles don't seem to work, you're not alone. Or at least, you weren't. You are now, since I've figured it out. Squirrelmail ignores anything between