[#118612] OS X Tiger still including ruby 1.6 — Carl Youngblood <carl.youngblood@...>

I'm not sure who to talk to about this, but in my correspondence with

17 messages 2004/11/01

[#118651] symbol solver.. early experiments — Simon Strandgaard <neoneye@...>

Hi,

11 messages 2004/11/01

[#118675] fastcgi performance problems and ruby — andrew.stuart@...

Hello

16 messages 2004/11/02

[#118679] US Presidential Election — "trans. (T. Onoma)" <transami@...>

Election Day is upon us!

135 messages 2004/11/02
[#118681] Re: [OT] US Presidential Election — James Britt <jamesUNDERBARb@...> 2004/11/02

trans. (T. Onoma) wrote:

[#118690] Re: [OT] US Presidential Election — Ara.T.Howard@... 2004/11/02

On Tue, 2 Nov 2004, trans. (T. Onoma) wrote:

[#118696] Re: [OT] US Presidential Election — Logan Capaldo <logancapaldo@...> 2004/11/02

I am neither a Kerry or Bush supporter. Idealy I would vote

[#118734] Re: [OT] US Presidential Election — Richard Kilmer <rich@...> 2004/11/02

Bush, with conviction ;-)

[#118744] Re: [OT] US Presidential Election — Thomas Kirchner <lists@...> 2004/11/02

On Tue, Nov 02, 2004 at 09:18:12PM +0900, Richard Kilmer wrote:

[#118836] From getoptlong to optparse — Massimiliano Mirra - bard <mmirra@...>

15 messages 2004/11/02

[#118863] Programmatically and dynamically catching exceptions — Logan Capaldo <logancapaldo@...>

Allright here was my idea which seems to have been shattered by the

13 messages 2004/11/03

[#118965] Ruby Package for MacOS X — Mark Hubbart <discordantus@...>

Hi all,

11 messages 2004/11/04

[#118970] Ruby and civil political discussion? (Re: [OT] US Presidential Election) — "Dave Burt" <burtdav@...>

"David Morton" <mortonda@gmail.com> wrote:

18 messages 2004/11/04

[#118988] rails: gem install rails is bombing — "J. D." <jd@...>

Hi,

11 messages 2004/11/04
[#118994] Re: rails: gem install rails is bombing — David Heinemeier Hansson <david@...> 2004/11/04

> I'm running into a problem installing rails using gem. How do I fix

[#118997] Ruby BitTorrent — (Curne) Simon Conrad-Armes <curne@...>

Has anybody started a Ruby BitTorrent transfer library? I wanted to

13 messages 2004/11/04

[#119059] Will ActiveRecord support Berkeley DB? — "J. D." <jd@...>

Hi,

13 messages 2004/11/04

[#119111] FastCGI parameters (get and post) — "J. D." <jd@...>

Hi,

21 messages 2004/11/04
[#119114] Re: FastCGI parameters (get and post) — Kent Sibilev <ksibilev@...> 2004/11/04

GET parameters you have to parse from ENV['QUERY_STRING'].

[#119117] Re: FastCGI parameters (get and post) — "J. D." <jd@...> 2004/11/04

Kent Sibilev wrote:

[#119176] Re: FastCGI parameters (get and post) — Patrick May <patrick@...> 2004/11/05

[#119208] Re: FastCGI parameters (get and post) — MoonWolf <moonwolf@...> 2004/11/05

Patrick May wrote:

[#119275] Re: FastCGI parameters (get and post) — Patrick May <patrick@...> 2004/11/05

Quoting MoonWolf <moonwolf@moonwolf.com>:

[#119289] Re: FastCGI parameters (get and post) — gabriele renzi <rff_rff@...> 2004/11/05

Patrick May ha scritto:

[#119357] Re: FastCGI parameters (get and post) — Patrick May <patrick@...> 2004/11/06

[#119358] Re: FastCGI parameters (get and post) — Ara.T.Howard@... 2004/11/06

On Sun, 7 Nov 2004, Patrick May wrote:

[#119132] recursive brace matching with Ruby regexp — Jason Sweat <jason.sweat@...>

I wanted to learn Ruby, so I picked a small task of trying to write a

19 messages 2004/11/05
[#119149] Re: recursive brace matching with Ruby regexp — Mark Hubbart <discordantus@...> 2004/11/05

Hi,

[#119161] Re: recursive brace matching with Ruby regexp — James Edward Gray II <james@...> 2004/11/05

On Nov 4, 2004, at 8:04 PM, Mark Hubbart wrote:

[#119148] Ruby 1.4.6 - trouble with require path — primehalo@... (Ken Innes)

I inherited a project that uses Ruby 1.4.6 on a RedHat Linux 6.1J. I

12 messages 2004/11/05

[#119168] value provided for argument with default value - how to check inside method? — "itsme213" <itsme213@...>

Is there an equivalent of block_given? to check if the caller provided a

16 messages 2004/11/05

[#119223] GEDCOM Parser (#6) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

40 messages 2004/11/05
[#119224] Re: [QUIZ] GEDCOM Parser (#6) — Jim Menard <jimm@...> 2004/11/05

> <gedcom>

[#119371] Documenting accessor methods as methods — James Britt <jamesUNDERBARb@...>

I sometimes use the method definition shorthand 'attr_reader',

29 messages 2004/11/06
[#119373] Re: [RDOC] Documenting accessor methods as methods — Gavin Kistner <gavin@...> 2004/11/07

On Nov 6, 2004, at 4:23 PM, James Britt wrote:

[#119386] Re: [RDOC] Documenting accessor methods as methods — Dave Thomas <dave@...> 2004/11/07

[#119406] Re: [RDOC] Documenting accessor methods as methods — James Britt <jamesUNDERBARb@...> 2004/11/07

Dave Thomas wrote:

[#119417] Re: [RDOC] Documenting accessor methods as methods — Dave Thomas <dave@...> 2004/11/07

[#119428] Re: [RDOC] Documenting accessor methods as methods — James Britt <jamesUNDERBARb@...> 2004/11/07

Dave Thomas wrote:

[#119432] Re: [RDOC] Documenting accessor methods as methods — Sam Roberts <sroberts@...> 2004/11/07

Quoteing jamesUNDERBARb@neurogami.com, on Mon, Nov 08, 2004 at 04:26:26AM +0900:

[#119439] Re: [RDOC] Documenting accessor methods as methods — James Britt <jamesUNDERBARb@...> 2004/11/07

Sam Roberts wrote:

[#119535] rdoc and vim folding — "Ara.T.Howard" <Ara.T.Howard@...>

24 messages 2004/11/08
[#119540] Re: rdoc and vim folding — Dave Thomas <dave@...> 2004/11/08

[#119543] Re: rdoc and vim folding — Hans Fugal <hans@...> 2004/11/09

Dave Thomas wrote:

[#119545] Re: rdoc and vim folding — "Ara.T.Howard" <Ara.T.Howard@...> 2004/11/09

On Mon, 8 Nov 2004, Hans Fugal wrote:

[#119597] One-Click Installer 1.8.2-14 RC9 with RubyGems built-in — "Curt Hibbs" <curt@...>

This release candidate of the One-Click Installer for

22 messages 2004/11/09

[#119598] RedCloth 3.0.0 -- Textile and Markdown Elope! — why the lucky stiff <ruby-talk@...>

RedCloth 3 is out. You know? RedCloth? Perhaps you've heard of it.

14 messages 2004/11/09

[#119607] Iterating trough hash — Kevin =?ISO-8859-15?Q?B=F6rgens?= <kevin@...>

Hi!

19 messages 2004/11/09

[#119685] new spam at the wiki — Edwin Eyan Moragas <haaktu@...>

been checking my pages and it looks like we've got a new spammer on board.

41 messages 2004/11/10
[#119708] Re: new spam at the wiki — Jim Weirich <jim@...> 2004/11/10

On Wednesday 10 November 2004 02:00 am, Edwin Eyan Moragas wrote:

[#119748] Re: new spam at the wiki — Asfand Yar Qazi <see@...> 2004/11/10

Jim Weirich wrote:

[#119754] Re: new spam at the wiki — Henrik Horneber <ryco@...> 2004/11/10

Asfand Yar Qazi wrote:

[#119756] Re: new spam at the wiki — Charles Comstock <cc1@...> 2004/11/10

[#119796] A Wiki/Spam Report — "Jim Weirich" <jim@...> 2004/11/10

Hello all.

[#119895] Re: A Wiki/Spam Report — Ben Giddings <bg-rubytalk@...> 2004/11/11

Jim Weirich wrote:

[#119911] Re: A Wiki/Spam Report — gabriele renzi <rff_rff@...> 2004/11/11

Ben Giddings ha scritto:

[#119935] Re: A Wiki/Spam Report — "Jim Weirich" <jim@...> 2004/11/11

[#119799] array.each restart when array is changed — Kevin =?ISO-8859-15?Q?B=F6rgens?= <kevin@...>

Hi!

18 messages 2004/11/10

[#119825] Arachno users? — "itsme213" <itsme213@...>

Any Arachno IDE users out there? Do you mind sharing your opinion of the

16 messages 2004/11/11
[#119908] Re: Arachno users? — Wayne Vucenic <nightphotos@...> 2004/11/11

I've been programming in Ruby for 3 years, and using ArachnoRuby for

[#119826] ruby idiom for attribute definition? — "Corey" <corey_s@...>

19 messages 2004/11/11

[#119878] Thinking About Java Interfaces In Ruby — James Edward Gray II <james@...>

I'm currently reading "Holub on Patterns", an excellent volume on

18 messages 2004/11/11

[#119974] warning: redefining Object#initialize may cause infinite loop — Stu <ceaser@...>

12 messages 2004/11/12

[#120037] Copland to Needle article on RubyGarden — Chad Fowler <chadfowler@...>

For those not subscribed to RubyGarden's rss feed[1], Jamis Buck has

35 messages 2004/11/12
[#120214] Re: [ANN] Copland to Needle article on RubyGarden (LONG) — Joel VanderWerf <vjoel@...> 2004/11/13

Chad Fowler wrote:

[#120431] Starter question on Test::Unit — Mohammad Khan <mkhan@...> 2004/11/15

Hello,

[#120056] Countdown (#7) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

26 messages 2004/11/12

[#120061] why does rss/maker not raise errors? — Sam Roberts <sroberts@...>

There are lots of mandatory attributes (yes, which are mandatory is

26 messages 2004/11/12
[#120133] bug: rss/maker is requiring <image> for rss/0.9 — Sam Roberts <sroberts@...> 2004/11/13

It says it is optional here:

[#120071] assert — "itsme213" <itsme213@...>

I could not find a standard "assert" in Ruby. Is there one?

29 messages 2004/11/12

[#120248] Dynamic define_method on class creation per module namespace — "trans. (T. Onoma)" <transami@...>

Here's a wee challenge for Rubyists at large. Consider:

12 messages 2004/11/14

[#120261] Countdown (#7) — Dennis Ranke <dennis.ranke@...>

Hi, here is my second solution for this very interesting quiz.

15 messages 2004/11/14

[#120271] Ruby in the enterprise... — "Wood, Jeff" <jeffwood@...>

Hello all,=20

14 messages 2004/11/14

[#120299] OpenStruct#update ? — "trans. (T. Onoma)" <transami@...>

How 'bout an OpenStruct#update for adding values after initialization. Or is

72 messages 2004/11/14
[#120306] Re: OpenStruct#update ? — "trans. (T. Onoma)" <transami@...> 2004/11/14

On Sunday 14 November 2004 03:42 pm, trans. (T. Onoma) wrote:

[#120337] Re: OpenStruct#update ? — Yukihiro Matsumoto <matz@...> 2004/11/14

Hi,

[#120355] Re: OpenStruct#update ? — "trans. (T. Onoma)" <transami@...> 2004/11/15

On Sunday 14 November 2004 06:16 pm, Yukihiro Matsumoto wrote:

[#120395] Re: OpenStruct#update ? — Florian Gross <flgr@...> 2004/11/15

trans. (T. Onoma) wrote:

[#120401] Kernel#singleton_class (was: Re: OpenStruct#update ?) — "David A. Black" <dblack@...> 2004/11/15

Hi --

[#120405] Re: Kernel#singleton_class — Florian Gross <flgr@...> 2004/11/15

David A. Black wrote:

[#120407] Re: Kernel#singleton_class — "David A. Black" <dblack@...> 2004/11/15

Hi --

[#120446] Re: Kernel#singleton_class — Yukihiro Matsumoto <matz@...> 2004/11/15

Hi,

[#120449] Re: Kernel#singleton_class — "trans. (T. Onoma)" <transami@...> 2004/11/15

On Monday 15 November 2004 12:28 pm, Yukihiro Matsumoto wrote:

[#120380] Arachno Ruby 0.3 (patch 2) — Lothar Scholz <mailinglists@...>

Hello,

16 messages 2004/11/15

[#120485] rpa-base 0.2.3 — Mauricio Fern疣dez <batsman.geo@...>

15 messages 2004/11/15
[#120516] Re: [ANN] rpa-base 0.2.3 — Matt Armstrong <matt@...> 2004/11/16

[#120626] Re: [ANN] rpa-base 0.2.3 — Mauricio Fern疣dez <batsman.geo@...> 2004/11/17

On Tue, Nov 16, 2004 at 02:08:23PM +0900, Matt Armstrong wrote:

[#120573] Can't Build Ruby 1.8.1 on HP-UX 11.00 — Kevin Hinners <kevin.hinners@...>

I've downloaded the stable 1.8.1 release of Ruby. When I attempt to run make

21 messages 2004/11/16
[#120574] Re: Can't Build Ruby 1.8.1 on HP-UX 11.00 — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#120577] Re: Can't Build Ruby 1.8.1 on HP-UX 11.00 — Kevin Hinners <kevin.hinners@...> 2004/11/16

Top segment of mkmk.log:

[#120582] Re: Can't Build Ruby 1.8.1 on HP-UX 11.00 — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#120609] Ruby to C to another language (perhaps Java (I Don't Need JRuby)) — Zach Dennis <zdennis@...>

This posting is more for a learning thing then anything else at this

10 messages 2004/11/17

[#120727] About Regular Expressions — Nikolai Weibull <mailing-lists.ruby-talk@...>

Lately there have been a bunch of posts on this list about regular

31 messages 2004/11/18
[#120739] Re: About Regular Expressions — "trans. (T. Onoma)" <transami@...> 2004/11/18

On Thursday 18 November 2004 05:34 am, Nikolai Weibull wrote:

[#120745] Re: About Regular Expressions — Nikolai Weibull <mailing-lists.ruby-talk@...> 2004/11/18

* trans. (T. Onoma) <transami@runbox.com> [Nov 18, 2004 14:10]:

[#120764] Re: About Regular Expressions — "trans. (T. Onoma)" <transami@...> 2004/11/18

On Thursday 18 November 2004 09:26 am, Nikolai Weibull wrote:

[#120754] postgres-pr (pure Ruby PostgreSQL) — Michael Neumann <mneumann@...>

Hi,

30 messages 2004/11/18
[#120772] Re: [ANN] postgres-pr (pure Ruby PostgreSQL) — David Ross <dross@...> 2004/11/18

Michael Neumann wrote:

[#120870] Re: [ANN] postgres-pr (pure Ruby PostgreSQL) — David Garamond <lists@...6.isreserved.com> 2004/11/19

David Ross wrote:

[#120877] Re: [ANN] postgres-pr (pure Ruby PostgreSQL) — Mauricio Fern疣dez <batsman.geo@...> 2004/11/19

On Fri, Nov 19, 2004 at 04:42:36PM +0900, David Garamond wrote:

[#120872] mission critical Ruby? — Mark VanOrman <mark@...>

Hi all,

14 messages 2004/11/19

[#120890] Object Browser (#8) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

65 messages 2004/11/19
[#121006] Re: [SOLUTION] Object Browser (#8) — "R. Mark Volkmann" <mark@...> 2004/11/22

I'm new to using gems. Can you tell me the command I need to run to get

[#121093] Object Browser (#8) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/11/23

Hello Group,

[#121357] Re: [Solution] Object Browser (#8) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/11/25

So I took some time and refactored my solution. It now has a modular and extendible structure (at least I hope so). It should be possible to easily write non-gtk ui's and extend the reporting capabilities.

[#120940] Inner Class Relationship — James Edward Gray II <james@...>

I have an inner class that needs to send it's parent object (outer

24 messages 2004/11/20
[#120946] Re: Inner Class Relationship — Francis Hwang <sera@...> 2004/11/20

Since you haven't said much about how you're using this, maybe my

[#120947] Re: Inner Class Relationship — James Edward Gray II <james@...> 2004/11/21

On Nov 20, 2004, at 5:55 PM, Francis Hwang wrote:

[#120952] Re: Inner Class Relationship — Francis Hwang <sera@...> 2004/11/21

[#120961] Windows - calling system with multiple parms — colotechpro@... (John Reed)

I'm having a problem getting a system call to Windows XP to work. I

13 messages 2004/11/21

[#121015] Some progress but have hit a new error working through the Todo tutorial... Anyone recognize it? — "Abraham Vionas" <abe_ml@...>

The error is below. Ugh. But at least it works up to this point. I don't

12 messages 2004/11/22
[#121016] Re: Some progress but have hit a new error working through the Todo tutorial... Anyone recognize it? — "Abraham Vionas" <abe_ml@...> 2004/11/22

Oh, whups. The state of the todo_controller.rb file that evokes this error

[#121026] Instiki problems — Ryco@...

Hi!

19 messages 2004/11/22
[#121031] Re: Instiki problems — Ryco@... 2004/11/22

Update:

[#121129] Re: Instiki problems — Ryco@... 2004/11/23

Hi!

[#121126] rails is awesome — Dick Davies <rasputnik@...>

46 messages 2004/11/23
[#121134] Re: rails is awesome — David Heinemeier Hansson <david@...> 2004/11/23

> Couldn't help sending a big 'thank you' to DHH for Rails.

[#121194] Re: rails is awesome — Austin Ziegler <halostatue@...> 2004/11/23

On Tue, 23 Nov 2004 20:11:24 +0900, David Heinemeier Hansson

[#121196] Re: rails is awesome — David Heinemeier Hansson <david@...> 2004/11/23

> I haven't seen this myself, but from something said by others, it

[#121217] Re: rails is awesome — Austin Ziegler <halostatue@...> 2004/11/24

On Wed, 24 Nov 2004 07:01:17 +0900, David Heinemeier Hansson

[#121243] Re: rails is awesome — David Heinemeier Hansson <david@...> 2004/11/24

> Essentially, David, this is a *problem* with ActiveRecord.

[#121247] Re: rails is awesome — Gavin Sinclair <gsinclair@...> 2004/11/24

On Wednesday, November 24, 2004, 9:23:09 PM, David wrote:

[#121260] Re: rails is awesome — Austin Ziegler <halostatue@...> 2004/11/24

On Wed, 24 Nov 2004 19:48:18 +0900, Gavin Sinclair

[#121267] Other ORMs [was: rails is awesome] — Francis Hwang <sera@...> 2004/11/24

[#121271] Re: Other ORMs [was: rails is awesome] — George Moschovitis <gm@...> 2004/11/24

> do, maybe it's worth considering that ActiveRecord is not not the only

[#121274] Re: Other ORMs [was: rails is awesome] — Austin Ziegler <halostatue@...> 2004/11/24

On Wed, 24 Nov 2004 22:58:09 +0900, George Moschovitis <gm@navel.gr> wrote:

[#121275] Re: Other ORMs [was: rails is awesome] — Francis Hwang <sera@...> 2004/11/24

Austin, what DB are you using anyway? Dunno if I caught that in this

[#121173] Most popular wiki in Ruby seeks kind maintainer — David Heinemeier Hansson <david@...>

Okay, okay, okay. Instiki does need a new maintainer. At least a

12 messages 2004/11/23
[#121195] Re: Most popular wiki in Ruby seeks kind maintainer — Austin Ziegler <halostatue@...> 2004/11/23

On Wed, 24 Nov 2004 02:35:21 +0900, David Heinemeier Hansson

[#121210] Marshal vs. YAML vs. something else (Re: Most popular wiki in Ruby seeks kind maintainer) — Francis Hwang <sera@...> 2004/11/24

More generally, let me ask: What formats are people using to persist

[#121205] How to avoid inheriting Object? — "itsme213" <itsme213@...>

How do I create a class that does not inherit from Object?

17 messages 2004/11/24
[#121218] Re: How to avoid inheriting Object? — Austin Ziegler <halostatue@...> 2004/11/24

On Wed, 24 Nov 2004 10:29:09 +0900, itsme213 <itsme213@hotmail.com> wrote:

[#121227] editors/IDEs — Jamie Orchard-Hays <jamie@...>

I'm curious what people are favoring for editors and IDEs for Ruby.

21 messages 2004/11/24

[#121318] Ruby/DL tutorial — bjsp123@... (Benjamin Peterson)

Hi,

15 messages 2004/11/24

[#121381] Re: Ruby GUIs and installation effort — "bin liu" <ruby@3cn.com.cn>

I think one GUI system dos not depends others except ruby will bee more flexible.

19 messages 2004/11/25

[#121455] Using unit-tests as examples for a documentation — benny <listen@...>

dear list,

13 messages 2004/11/25

[#121468] oneclick installer, freeride — tony summerfelt <snowzone5@...>

anybody NOT developing the oneclick installer or freeride can skip

12 messages 2004/11/25

[#121506] Multiplexer - linear non-blocking I/O — Mikael Brockman <mikael@...>

Blocking I/O is really easy to use. But when you use it to write

32 messages 2004/11/26

[#121517] Banned Words (#9) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

29 messages 2004/11/26

[#121611] initialize always — "trans. (T. Onoma)" <transami@...>

It is rather a common occurrence that I find myself creating a mixin module

16 messages 2004/11/27

[#121647] One-Click Installer 1.8.2-14 RC10 — "Curt Hibbs" <curt@...>

This release is mainly in upgrade the included FreeRIDE

13 messages 2004/11/28

[#121730] Seeking advice on some method names — Gavin Sinclair <gsinclair@...>

Hi all,

28 messages 2004/11/29

[#121847] to_s, inspect, etc. — "itsme213" <itsme213@...>

Where would I find a nice summary of to_s, inspect, p, etc. and the core

16 messages 2004/11/29

[#121903] PHP vs. Ruby vs. Python (vs. Rails) — "Abraham Vionas" <abe_ml@...>

As I was falling asleep last night I was wondering about the differences in

15 messages 2004/11/30

[#121916] Python 2.4 released — Zach Dennis <zdennis@...>

A coworker of mine came and hollarred at me because on /. it mentioned

21 messages 2004/11/30

[#121936] Optional static typing (or, What can Ruby 2.0 borrow from Boo?) — djberg96@... (Daniel Berger)

Hi all,

23 messages 2004/11/30

[#121943] profile — "Joe Van Dyk" <joe.vandyk@...>

Hi,

24 messages 2004/11/30

[#121949] singleton methods : when are they not permitted? — "itsme213" <itsme213@...>

irb(main):025:0> x = :any

20 messages 2004/11/30
[#121956] Re: singleton methods : when are they not permitted? — Florian Gross <flgr@...> 2004/11/30

itsme213 wrote:

[#121970] Re: singleton methods : when are they not permitted? — Francis Hwang <sera@...> 2004/12/01

[#121975] Re: singleton methods : when are they not permitted? — Christoph <chr_mail@...> 2004/12/01

Francis Hwang schrieb:

Re: More samples of rubyfilter code?

From: Matt Armstrong <matt@...>
Date: 2004-11-06 17:49:43 UTC
List: ruby-talk #119360
Lloyd Zusman <ljz@asfast.com> writes:

> I'm interested in using the rubyfilter module.  Although the
> documentation that comes with this module is quite extensive, it
> would be helpful to me to see a few working rubyfilter samples, in
> addition to those that are mentioned in the official docs.
>
> Can anyone point me to some real-world rubyfilter examples?
>
> Thanks in advance.

Hey Lloyd, almost one month later, here is the contents of my
.rdeliver file, used by the example rdeliver script that comes with
rubyfilter.  I'll append 'confirm_queue' afterward.  All my incoming
mail goes through this filter.  Email addresses not in my white list
are likely to get an automatic (and controversial) confirmation
request to cut down on SPAM.

I have been meaning to package this stuff more formally, and clean it
up considerably, but have successfully procrastinated for years.  ;-)

As the author of RubyFilter, I imagine this is the most extensive use
of the software.  I think RubyMail is a little more popular than
RubyFilter.  But somebody has mailed me from one of the country code
TLD registrars saying they use RubyMail+RubyFilter to automatically
process their incoming mail requests.  :-)


----------------------------------------------------------------------

require 'rdeliver/confirm_queue'

def h
  agent.header
end

def send_to_gmail
    require 'net/smtp'
    Net::SMTP.start('localhost', 25) do |smtp|
	smtp.send_message(agent.message, 'matt+gmailbounces@lickey.com',
		'gmatta@gmail.com')
    end
    agent.log(1, "sent to gmatta@gmail.com")
end

# Returns the line in the table that matches or nil
def check_senders(table)
  senders(agent.message.header).each do |address|
    if line = hash_match(address, table)
      return [line, address]
    end
  end
  return [nil, nil]
end

def senders(header)
  get_addresses([ 'From', 'Sender', 'Return-Path' ], header)
end

def hash_match(address, hash)
  a = address.address.downcase
  if hash.key?(a)
    return hash[a]
  end
  return nil unless address.domain
  d = address.domain.downcase
  if hash.key?("@#{d}")
    return hash["@#{d}"]
  end
  parts = d.split(/\./)
  while not parts.empty?
    d = '.' + parts.join('.')
    if hash.key?(d)
      return hash[d]
    end
    parts.shift
  end
  return nil
end

# Returns a hash of every line in a flat text file (downcased)
def table_from_file(filename)
  lines = {}
  File.open(filename) { |f|
    f.each { |line|
      case line
      when /^\s*\#/
	next
      when /^\s*$/
	next
      else
	line = line.strip.downcase
	lines[line] = line
      end
    }
  }
  lines
end


# def corpus_save(kind)
#   if x_bogosity = h['x-bogosity']
#     h.delete('x-bogosity')
#   end
#   h.delete('x-corpus')

#   type_str = case kind
# 	     when :spam
# 	       "spam"
# 	     when :good
# 	       "good"
# 	     else
# 	       raise ArgumentError, "unknown kind #{kind.inspect}"
# 	     end

#   box = RFilter::KeyedMailbox.new(".corpus/#{type_str}")

#   agent.log(2, "Action: save to keyed mailbox #{box.path.inspect}")
#   key = box.save(agent.message)
#   h.delete('x-corpus')
#   h['X-Corpus'] = "type=#{type_str}; key=#{key}"

#   if x_bogosity
#     h['X-Bogosity'] = x_bogosity
#   end
# end

def spool_save(folder, continue = false)
  folder = ".incoming/spools/%s.spool" % [ folder ]
  agent.save(folder, continue)
end

def is_list(list)
  name, domain = list.split(/@/).collect { |s| Regexp.quote(s) }
  raise ArgumentError if name.nil? || domain.nil?
  raise ArgumentError if name.length == 0 || domain.length == 0
  h.match?(/^((Resent-)?Sender|Errors-To|X-Loop|(X-)?Mailing-List)$/i, /(owner-)?#{name}(-request|-help|-admin|-bounce|-errors|-owner)?@#{domain}/im) ||
    h.match?(/(List-Id|X-Mailing-List)$/i, /<#{name}.#{domain}>/im) ||
    h.match?('delivered-to', /mailing list #{name}@#{domain}/im) ||
    h.match?("x-ml-name", /^\s*#{name}([^ \t]|$)/im) ||
    h.match?(/^(to|cc)$/i, /#{name}@#{domain}/im)
end

def save_if_list(list, folder)
  if is_list(list)
    spool_save("list.#{folder}")
  end
end


LISTS = [
  ['amrita-users@walrus-ruby.org', 'amrita-users'],
  ['bitkeeper-users@bitmover.com', 'bitkeeper'],
  ['spamtools@abuse.net', 'spamtools'],
  ['mutt-users@mutt.org', 'mutt'],
  ['debian-ocaml-maint@lists.debian.org', 'ocaml'],
  ['vim@vim.org', 'vim'],
  ['dcc@calcite.rhyolite.com', 'dcc'],
  ['dcc@rhyolite.com', 'dcc'],
  ['cygwin@cygwin.com', 'cygwin'],
  ['bbdb-info@lists.sourceforge.net', 'bbdb'],
  ['ding@gnus.org', 'ding'],
  ['ding@lists.math.uh.edu', 'ding'],
  ['ding@hpc.uh.edu', 'ding'],
  ['secprog@securityfocus.com', 'secprog'],
  ['list@dsbl.org', 'dsbl'],
  ['nmh-workers@mhost.com', 'nmh-workers'],
  ['jamming@perforce.com', 'jamming'],
  ['bogofilter@aotto.com', 'bogofilter'],
  ['bogofilter-dev@aotto.com', 'bogofilter-dev'],
  ['ruby-core@ruby-lang.org', 'ruby-core'],
  ['ruby-talk@ruby-lang.org', 'ruby-talk'],
  ['help-cfengine@gnu.org', 'cfengine'],
  ['email-sig@python.org', 'email-sig'],
  ['email-sig@python.org', 'email-sig'],
  ['zsh-users@sunsite.dk', 'zsh'],
  ['zsh-workers@sunsite.dk', 'zsh']
  ]

def save_listmail
  LISTS.each { |list, folder|
    unless folder.nil?
      if is_list(list)
        spool_save("list.#{folder}")
      end
    end
  }
end

def is_listmail
  LISTS.detect { |list, folder|
    is_list(list)
  }
end

def bogofilter_classify_and_update
  command = %w{ /usr/bin/bogofilter -e -p -u }
  agent.filter(*command)
end

def bogofilter_reclassify_as_ham
  command = %w{ /usr/bin/bogofilter -e -p -Sn }
  agent.filter(*command)
end

def bogofilter_reclassify_as_spam
  command = %w{ /usr/bin/bogofilter -e -p -Ns }
  agent.filter(*command)
end

def dccproc
  command = %w{ /home/matt/pkg/bin/dccproc -x 0 -S List-Id -w whiteclnt }
  agent.filter(*command)
end

def dccproc_bulk
  ! agent.header.match(/^x-dcc-.*-metrics$/, /;.*=many/).empty?
end

# def bogofilter
#   command = %w{ /usr/local/bin/bogofilter -uep }
#   agent.filter(*command)
# end
=begin
  if h.match?('x-bogosity', /^Yes, tests=bogofilter/im)
    corpus_save(:spam)
    spool_save('spam')
  else
    corpus_save(:good)
  end
rescue RFilter::DeliveryAgent::DeliveryCommandFailure => e
  agent.log(2, "Bogofilter failure: #{e.message} : #{e.status.inspect}")
  agent.save('.incoming/bogofailures', true)
end
=end

def skip_spamcheck
  if ((agent.header.match?('to', /postmaster@lickey\.com/im) and
       (agent.header.match?('subject', /Postfix Log/im) or
	agent.header.match?('subject', /FOUND VIRUS IN MAIL from/m))) or
      (agent.header.match?('to', /root@lickey\.com/) and
       agent.header.match?('subject', /system check/)))
    true
  else
    false
  end
end

# def crm
#   agent.pipe("/usr/bin/crm -u /home/matt/crm procmailfilter.crm", true)
#   corpus_save(:good)
# rescue RFilter::DeliveryAgent::DeliveryCommandFailure => e
#   if e.status.exitstatus == 75
#     corpus_save(:spam)
#     spool_save('spam')
#   end
# end

def destinations
  d = h.to
  d.concat(h.cc)
  d.concat(h.bcc)
end

def return_path(header)
  value = header['Return-Path']
  RMail::Address.parse(value)[0]
end

def sender(header)
  value = nil
  [ 'Resent-Sender', 'Resent-From', 'Sender', 'From' ].each { |h|
    value ||= header[h]
  }
  RMail::Address.parse(value)[0]
end

def log_address_header(header, address)
  return unless address
  agent.log(1, header + ': ' + address.format)
end

def get_addresses(list, header)
  addresses = []
  list.each { |h|
    v = header[h]
    addresses.concat(RMail::Address.parse(v)) if v
  }
  return addresses
end

def get_address(name, header)
  get_addresses([name], header)[0]
end

def recipients(header)
  addresses = get_addresses([ 'Resent-To', 'Resent-Cc', 'Resent-Bcc' ],
			    header)
  addresses = get_addresses([ 'To', 'Cc', 'Bcc' ], header) if addresses.empty?
  addresses
end

def log_abstract
  header = agent.header
  agent.log(1, "-----------------------------------------------")
  return_path = return_path(header)
  sender = sender(header)
  log_address_header('Return-Path', return_path(header))
  if return_path && sender && return_path.address != sender.address
    log_address_header('Sender', sender(header))
  end
  agent.log(1, 'Recipients: ' +
      recipients(header).collect {|r| r.format }.join(", "))
  agent.log(1, 'Subject: ' + header['Subject'].to_s)

  delivered_to = get_address('Delivered-To', header)
  if delivered_to &&
      delivered_to.address !~ /^matt(\+(bmi|root))?@lickey\.com$/i
    agent.log(1, 'Delivered-To: ' + delivered_to.format)
  end
end

def check_list(name, file)
  table = table_from_file(file)
  line, address = check_senders(table)
  if line
    agent().log(1, "#{name} match on #{address.address} by #{line}")
    true
  else
    false
  end
end

def check_whitelist
  check_list("whitelist", File::expand_path("~/.whitelist").untaint)
end

def check_bouncelist
  check_list("bouncelist", File::expand_path("~/.bouncelist").untaint)
end

BOUNCE_ADDRESS = RMail::Address.new('matt+confirmationbounces@lickey.com')
def confirmation_bounce
  bounce_address = recipients(agent.header).detect { |recipient|
    recipient == BOUNCE_ADDRESS
  }
  !bounce_address.nil?
end

def is_local_mail
  ! agent.header.match?('received', /with.*fetchmail/)
end

def skip_confirm
  is_local_mail || check_whitelist || skip_spamcheck || is_listmail
end

def main
  #agent.defer('testing stuff')

  log_abstract
  confirm_reply
  if check_bouncelist
    agent.reject("Sorry, mail rejected.")
  end

  if confirmation_bounce
    agent.log(1, 'dropping a bounce from a confirmation request')
    agent.save(Time.now.strftime("confirmationbounces-%F"))
  end

  agent.header.delete('x-bogosity')
  bogofilter_classify_and_update

  unless skip_confirm
    dccproc
    if dccproc_bulk
      agent.log(1, "dccproc found bulk mail")
      agent.reject("Rejecting bulk e-mail.")
    end
    agent.log(1, "doing confirmation thing")
    confirm
  end

  if agent.header.match?('x-bogosity', /^yes,/i)
    bogofilter_reclassify_as_ham
  end

  if agent.header.match?('subject', /to ruby-talk/)
    spool_save('list.ruby-talk')
  end

  agent.save('.incoming/backup-' + Time.now.strftime('%Y-%V'), true)
  save_listmail
  send_to_gmail
  spool_save('inbox')
end

----------------------------------------------------------------------
#!/usr/bin/env ruby
#--
#   Copyright (C) 2002, 2003, 2004 Matt Armstrong.  All rights reserved.
#
#   Permission is granted for use, copying, modification,
#   distribution, and distribution of modified versions of this work
#   as long as the above copyright notice is included.

require 'util'
require 'rfilter/keyed_mailbox'

class Deliver

  include RFilter::Deliver

  def confirm
    return if @confirmed

    require 'net/smtp'

    # FIXME: define a 'cannot send confirmation' exception and use
    # that here instead of plain raise

    # FIXME: need a general "send bounce to this address" routine
    return_path = RMail::Address.parse(agent.header['return-path'])[0]
    unless return_path.nil?
      agent.message.header.delete('X-RFilter-Confirm-Address')
      agent.message.header['X-RFilter-Confirm-Address'] = return_path.format
    end

    bogospam = agent.header.match?('X-Bogosity', /^Yes/)
    # I want any mail in the pending queue to be SPAM.  If somebody
    # confirms their message, then it'll be reclassified as HAM.
    unless bogospam
      # Steal this function from my .rdeliver file.  Ugh.
      bogofilter_reclassify_as_spam
    end

    send_confirmation = !(return_path.nil? ||
                          agent.header.match?('precedence', /bulk|list/im) ||
                          agent.header['list-unsubscribe'] ||
                          agent.header['list-id'] ||
                          agent.header['list-post'] ||
                          agent.header['list-help'] ||
                          agent.header['list-subscribe'] ||
                          agent.header['list-unsubscribe'] ||
                          agent.header['mailing-list'] ||
                          agent.header['x-ml-name'] ||
                          agent.header['x-ml-info'] ||
                          # FIXME: this is not appropriate for everyone, but fatcow.com
                          # adds this if brightmail thinks the thing is SPAM.
                          agent.header.match?('X-SPAM', /bTrueb/) ||
                          # FIXME: this is particular to my install -- I run everything
                          # through bogofilter before we get here
                          bogospam)

    agent.header.set('X-RFilter-Confirm-Sent', send_confirmation ? "Yes" : "No")

    pending = RFilter::KeyedMailbox.new(".pending")
    key = pending.save(agent.message)
    agent.log(1, "pending message is #{key}")

    if send_confirmation
      m = RMail::Message.new
      m.header['To'] = return_path.format
      m.header['From'] =
	"Matt Armstrong <matt+confirm-#{key.downcase}@lickey.com>"
	m.header['Subject'] = "Please confirm your message (#{key.downcase})"
      subject = agent.header['Subject']
      subject ||= '(none)'
      subject = subject.chomp
      m.body = Util.confirm_bounce_body({ "return_path" => return_path.format,
					  "headers" => agent.header.to_s })
      # FIXME: this return address is bogus, should be <>
      # FIXME: guard against shell metacharacters!  
      agent.log(1, "return_path.address #{return_path.address.inspect}")
      Net::SMTP.start('localhost', 25) do |smtp|
        smtp.send_message(m, 'matt+confirmationbounces@lickey.com',
                          return_path.address.untaint)
      end
      agent.log(1, "sent confirmation request to #{return_path.format}")
    end

    # FIXME: need a AGENT.drop method
    agent.save('/dev/null')
  end

  def bogus_confirmation(key)
    unless agent.header['subject'] =~ /#{key}/i
      agent.log(1, "Subject does not contain confirmation key: #{key}")
      return true
    end
    from = agent.header.from.first
    if from and from.address == 'NAVER-MAILER@naver.com'
      agent.log(1, "From: NAVER-MAILER, a bogus confirmation mail")
      return true
    end

    if agent.header.content_type == 'multipart/report'
      agent.log(1, "a multipart/report -- a bounce, a bogus confirmation mail")
      return true
    end

    return false
  end

  def confirm_reply
    delivered_to = agent.header['delivered-to']
    if delivered_to =~ /confirm-(\w+)/im
      key = $1.untaint.upcase

      if bogus_confirmation(key)
	agent.save('bogusconfirmations', true)
	agent.reject("invalid confirmation message")
      end

      pending = RFilter::KeyedMailbox.new(".pending")
      name =
	begin
	  pending.retrieve(key)
	rescue
	  # FIXME: RFilter::KeyedMailbox#retrieve should throw a
	  # specific exception when the key is invalid, and we should
	  # reject only in that case.  We may be rejecting for other
	  # unforeseen reasons here.
	  agent.reject("invalid confirmation key")
	end
      if name
	old_msg = File.open(name) do |f|
	  RMail::Parser.new.parse(f)
	end

	# Append this dude to the whitelist
	h = old_msg.header
	confirmed_by = RMail::Address.parse(h['X-RFilter-Confirm-Address'])
	if confirmed_by.first
	  agent.log(1, "appending #{confirmed_by.first.address} to whitelist")
	  File.open("/home/matt/.whitelist", "a") { |f|
	    f.puts confirmed_by.first.address
	  }
	end

	# FIXME: make this mailbox configurable.
	agent.save('confirmations', true)

	agent.log(1, "a confirmation -- replacing current message with" +
		  "original")

	# FIXME: this is a serious bug.  Why?  We should either
	# refrain from deleting the pending key until this message has
	# been delivered successfully, or we should just re-introduce
	# the message into the MTA for re-delivery.  The former option
	# requires a new mechanism that allows code to run only after
	# successful delivery, while the latter is more overhead.
	#
	# Why is this a problem?  If subsequent delivery of this
	# released message fails, it is the confirmation that will be
	# deferred.
	agent.log(1, "FIXME: this is a serious bug!")

        confirmaton_msgid = agent.header['message-id']
        confirmaton_return_path = agent.header['return-path']
        confirmaton_from = agent.header.from.first.format
	agent.message = old_msg
        agent.header.set('X-RFilter-Confirmed', 'yes',
                         :msgid => confirmaton_msgid,
                         :return_path => confirmaton_return_path,
                         :from => confirmaton_from,
                         :confirmation_key => key)
	pending.delete(key)
	@confirmed = true
      end
    end
  end
end



-- 
matt

In This Thread