Ruby lib that will receive email

//> the net/smtp only sends mail. Is there any email ruby lib out there
//> that can receive email? I just want to capture inbound
//mail; no worry
//> on where to save it.
//
//Net::POP and Net::IMAP in Ruby's standard library?
//

hmmm.. pop/imap retrieves email fr the server. It pulls the email already
arrived at the server. I want something like _that server (so then i can
pop/imap/orwhatever fr it).

thanks and kind regards -botp

···

Florian Gross [mailto:flgr@ccan.de] wrote:

I'd like one of these too, to go into a Unit testing framework for a mail
system. A sort of mock SMTP server.

If you write this, please release it :slight_smile:

I think if you have a look at the architecture of Exim, you might get some
good ideas. For example, Exim has ACLs which are triggered at various points
(e.g. MAIL FROM, RCPT TO) to make a decision as to whether to accept or
reject the message at that point. These could be Proc callbacks or instances
of an ACL object that you provide.

But a fully-fledged MTA in Ruby, complete with message queues and periodic
retries, isn't something that I need; just something which accepts mail via
SMTP, and stores it (even in RAM). If it were ever put onto the open
Internet it would at least have to have a way to decide whether the
recipient address is known or not, and accept/reject as appropriate.

Regards,

Brian.

P.S. I have a nice threaded server pattern you can use - see attached.

foo.rb (1.49 KB)

···

On Fri, Apr 01, 2005 at 09:45:33AM +0900, "Pea, Botp" wrote:

//> the net/smtp only sends mail. Is there any email ruby lib out there
//> that can receive email? I just want to capture inbound
//mail; no worry
//> on where to save it.
//
//Net::POP and Net::IMAP in Ruby's standard library?
//

hmmm.. pop/imap retrieves email fr the server. It pulls the email already
arrived at the server. I want something like _that server (so then i can
pop/imap/orwhatever fr it).

I'd like one of these too, to go into a Unit testing framework for a mail
system. A sort of mock SMTP server.

If you write this, please release it :slight_smile:

I think if you have a look at the architecture of Exim, you might get some
good ideas. For example, Exim has ACLs which are triggered at various points
(e.g. MAIL FROM, RCPT TO) to make a decision as to whether to accept or
reject the message at that point. These could be Proc callbacks or instances
of an ACL object that you provide.

I've had it in mind to do something like this before ... Exim's design
cleaned up and rubyfied would rock in a lot of ways. Wouldn't be as
fast, but for something like a mail server that's easy to extend, it
would be perfect. (And the syntax would not be as insane as Exim's)

Ari

Aredridel wrote:

I've had it in mind to do something like this before ... Exim's design
cleaned up and rubyfied would rock in a lot of ways. Wouldn't be as
fast, but for something like a mail server that's easy to extend, it
would be perfect. (And the syntax would not be as insane as Exim's)

Oh, do it. Do it. I have longed for such a thing for a variety of uses.

Kirk Haines

Aredridel wrote:

I've had it in mind to do something like this before ... Exim's design
cleaned up and rubyfied would rock in a lot of ways. Wouldn't be as
fast, but for something like a mail server that's easy to extend, it
would be perfect. (And the syntax would not be as insane as Exim's)

It sounds like a fun project to me, too. It might also be fun to have pure (or mostly pure) Ruby servers for LDAP, DNS, FTP, NIS, SSH, telnet, syslog, crontab, NFS...

···

--
Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/&gt;

It sounds like a fun project to me, too. It might also be fun to have
pure (or mostly pure) Ruby servers for LDAP, DNS, FTP, NIS, SSH, telnet,
syslog, crontab, NFS...

I was thinking the same thing. I was going to try an experiment and
rewrite some startup scripts in Ruby, too, to see if I can't
straighten out the load time on my box into something on the order of
not-very-many seconds.

I would enjoy working on some of these. Shorter, more easily maintained and hopefully more secure.

-- Matt
Nothing great was ever accomplished without _passion_

···

On Sat, 2 Apr 2005, Glenn Parker wrote:

Aredridel wrote:

I've had it in mind to do something like this before ... Exim's design
cleaned up and rubyfied would rock in a lot of ways. Wouldn't be as
fast, but for something like a mail server that's easy to extend, it
would be perfect. (And the syntax would not be as insane as Exim's)

It sounds like a fun project to me, too. It might also be fun to have pure (or mostly pure) Ruby servers for LDAP, DNS, FTP, NIS, SSH, telnet, syslog, crontab, NFS...

Has anyone tried using http://tmtm.org/ruby/smtpd/ ?

Doesn't look like it would replace exim as-is, but looks like a good
base for a fork-and-deliver or closed-system mail server.

Ari

···

On Apr 1, 2005 12:54 PM, Kirk Haines <khaines@enigo.com> wrote:

Aredridel wrote:

> I've had it in mind to do something like this before ... Exim's design
> cleaned up and rubyfied would rock in a lot of ways. Wouldn't be as
> fast, but for something like a mail server that's easy to extend, it
> would be perfect. (And the syntax would not be as insane as Exim's)

Oh, do it. Do it. I have longed for such a thing for a variety of uses.

Matt Lawrence wrote:

It sounds like a fun project to me, too. It might also be fun to have pure (or mostly pure) Ruby servers for LDAP, DNS, FTP, NIS, SSH, telnet, syslog, crontab, NFS...

I would enjoy working on some of these. Shorter, more easily maintained and hopefully more secure.

Shall I submit this to RubyQuiz? :slight_smile:

···

--
Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/&gt;

Those are pretty good size projects, but there are certainly some interesting points in there.

Break them down into something we can play with in an hour or so. A piece of the puzzle. Or possibly break one complete project down into a three part quiz series that gets us most of the way there.

There's always some option...

James Edward Gray II

···

On Apr 1, 2005, at 3:11 PM, Glenn Parker wrote:

Matt Lawrence wrote:

It sounds like a fun project to me, too. It might also be fun to have pure (or mostly pure) Ruby servers for LDAP, DNS, FTP, NIS, SSH, telnet, syslog, crontab, NFS...

I would enjoy working on some of these. Shorter, more easily maintained and hopefully more secure.

Shall I submit this to RubyQuiz? :slight_smile: