Need to build smtp server in Ruby?

Dear Friends,

I need to build a simple smtp server in ruby, based on Gserver, which
should support most mail clients and need to log the messages iam
receiving.

Kindly any one suggest on this, on how to proceed.

Thanks in advance

Regards
Jose

dare ruby wrote in post #994834:

I need to build a simple smtp server in ruby, based on Gserver, which
should support most mail clients and need to log the messages iam
receiving.

Kindly any one suggest on this, on how to proceed.

Sure:

  1. Create a subclass of GServer
  2. Implement SMTP in it(see RFC 2821)
  3. Create an instance of your object and run it

For an example of how to build a server with GServer, just read the
gserver.rb file in the ruby standard library. But if you’re building an
SMTP server from scratch, I’m afraid there’s no shortcut to
understanding how SMTP works - so you need to read RFC 2821.

I have to say this sounds like a homework question: otherwise, why would
you say it has to be built on GServer?

On Tue, Apr 26, 2011 at 03:31:50AM +0900, Brian C. wrote:

  1. Create a subclass of GServer
  2. Implement SMTP in it(see RFC 2821)
  3. Create an instance of your object and run it

For an example of how to build a server with GServer, just read the
gserver.rb file in the ruby standard library. But if you’re building an
SMTP server from scratch, I’m afraid there’s no shortcut to
understanding how SMTP works - so you need to read RFC 2821.

I have to say this sounds like a homework question: otherwise, why
would you say it has to be built on GServer?

Well . . . the querent did only ask for suggestions on “how to
proceed”, rather than asking for code. You answered that admirably. If
it’s a homework issue, it was asked properly and answered properly, so
far. If the querent asks for code as a follow-up to your answer,
though,
you might be justified in saying “go away, I won’t do your homework for
you”.

That’s my take, anyway.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs