Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ruby lib that will receive email

6 views
Skip to first unread message

"Peña, Botp"

unread,
Mar 31, 2005, 5:21:27 AM3/31/05
to
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.

thanks and kind regards -botp

Florian Gross

unread,
Mar 31, 2005, 7:06:30 AM3/31/05
to
Peña, 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?

Shalev NessAiver

unread,
Mar 31, 2005, 7:15:48 AM3/31/05
to
Well, I think the Rails ActionMailer library just got expanded to allow
for capturing incoming mail.


If this has already been suggested before, I'm sorry, but I keep
receiving only snippets of conversations.
It's as if I only receive one email in ten for some of these threads.

-Shalev

"Peña, Botp"

unread,
Mar 31, 2005, 7:45:33 PM3/31/05
to
Florian Gross [mailto:fl...@ccan.de] 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).

Brian Candler

unread,
Apr 1, 2005, 5:07:54 AM4/1/05
to
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 :-)

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

Gavin Kistner

unread,
Apr 1, 2005, 10:28:53 AM4/1/05
to
On Mar 31, 2005, at 3:21 AM, Peña, 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.

A coworker of mine was recently searching for free forum software (like
UBB) that also had a mail gateway. A groups.yahoo.com type replacement.

In case anyone needs an idea of another app that (like rails) might be
a major reason for people to adopt ruby, there you have it. It would
not be a trivial undertaking, and one of the 'selling' points would be
that it was a free OSS solution, but it would be a great addition to
the net.community. :)


Aredridel

unread,
Apr 1, 2005, 1:46:00 PM4/1/05
to
> 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 :-)
>
> 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


Kirk Haines

unread,
Apr 1, 2005, 2:54:27 PM4/1/05
to
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

Glenn Parker

unread,
Apr 1, 2005, 3:40:47 PM4/1/05
to
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/>


Aredridel

unread,
Apr 1, 2005, 4:02:21 PM4/1/05
to
> 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.


Matt Lawrence

unread,
Apr 1, 2005, 4:07:03 PM4/1/05
to
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...

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

-- Matt
Nothing great was ever accomplished without _passion_

Glenn Parker

unread,
Apr 1, 2005, 4:11:18 PM4/1/05
to
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? :)

James Edward Gray II

unread,
Apr 1, 2005, 6:07:42 PM4/1/05
to
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? :)

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

Aredridel

unread,
Apr 1, 2005, 6:35:03 PM4/1/05
to

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


0 new messages