# Ruby based SMTP server?

**URL:** <https://www.ruby-forum.com/t/ruby-based-smtp-server/78565>\
**Category:** Ruby\
**Created:** [December 6, 2006, 10:16pm UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565 "2006-12-06T22:16:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_SSSgjfc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@Peter\_SSSgjfc](https://www.ruby-forum.com/u/Peter_SSSgjfc)\
**Post date:** [December 6, 2006, 10:16pm UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565/1 "2006-12-06T22:16:26Z")

</div>

People,

I have sendmail working on my linux box.

Since I can use sendmail to send e-mails, would it be easy to write a  
simple ruby  
class which listens for data on port 25?

Then, if it gets some data, it just passes it to sendmail.

Do any of you know if such a simple script is floating around somewhere  
on the net?

…Peter  
[http://GoodJobFastCar.com](http://GoodJobFastCar.com)

---

<div class="post-metadata">

**Author:** ![Peter\_SSSgjfc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@Peter\_SSSgjfc](https://www.ruby-forum.com/u/Peter_SSSgjfc)\
**Post date:** [December 6, 2006, 11:40pm UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565/2 "2006-12-06T23:40:47Z")

</div>

Peter S. [gjfc] wrote:

> People,
> 
> I have sendmail working on my linux box.
> 
> Since I can use sendmail to send e-mails, would it be easy to write a  
> simple ruby  
> class which listens for data on port 25?
> 
> Then, if it gets some data, it just passes it to sendmail.

Perhaps it would help if you were to tell us what you are trying to  
accomplish. Why are you trying to add a layer between applications and  
sendmail?

---

<div class="post-metadata">

**Author:** ![Peter\_SSSgjfc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@Peter\_SSSgjfc](https://www.ruby-forum.com/u/Peter_SSSgjfc)\
**Post date:** [December 6, 2006, 11:50pm UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565/3 "2006-12-06T23:50:51Z")

</div>

Paul,

Good question.

I’m want to provide an SMTP server to an instance of Oracle Enterprise  
Manager Grid Control (GC).

GC mails out ‘alerts’ to administrators when events happen (Oracle out  
of space,  
Linux Load too high, etc …).

These e-mails are dependent on an SMTP server.

I wish that GC could be configured to make use of sendmail but Oracle  
does  
not offer that functionality.

I need an SMTP server.

…Peter  
[http://GoodJobFastCar.com](http://GoodJobFastCar.com)

---

<div class="post-metadata">

**Author:** ![Peter\_SSSgjfc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@Peter\_SSSgjfc](https://www.ruby-forum.com/u/Peter_SSSgjfc)\
**Post date:** [December 7, 2006, 12:18am UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565/4 "2006-12-07T00:18:54Z")

</div>

removed\_email\_address@domain.invalid wrote:

> I wish that GC could be configured to make use of sendmail but Oracle  
> does  
> not offer that functionality.
> 
> I need an SMTP server.

sendmail is a SMTP server. You (or someone who knows how to do it) might  
want to configure it and run it as a server at port 25.

---

<div class="post-metadata">

**Author:** ![Peter\_SSSgjfc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b38774/32.png) [@Peter\_SSSgjfc](https://www.ruby-forum.com/u/Peter_SSSgjfc)\
**Post date:** [December 7, 2006, 12:20am UTC](https://www.ruby-forum.com/t/ruby-based-smtp-server/78565/5 "2006-12-07T00:20:54Z")

</div>

On 12/6/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> These e-mails are dependent on an SMTP server.
> 
> I wish that GC could be configured to make use of sendmail but Oracle  
> does  
> not offer that functionality.
> 
> I need an SMTP server.

Take a look at EventMachine. If this looks like it will work for you,  
let me know. I have an SMTP protocol-handler written for EM.
