# Email listener?

**URL:** <https://www.ruby-forum.com/t/email-listener/188118>\
**Category:** Ruby\
**Created:** [May 6, 2010, 1:37am UTC](https://www.ruby-forum.com/t/email-listener/188118 "2010-05-06T01:37:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siddarth\_Chandrasek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@Siddarth\_Chandrasek](https://www.ruby-forum.com/u/Siddarth_Chandrasek)\
**Post date:** [May 6, 2010, 1:37am UTC](https://www.ruby-forum.com/t/email-listener/188118/1 "2010-05-06T01:37:01Z")

</div>

I’m trying to figure how best to write an email listener – basically,  
something that listens for particular keyword(s) at an account and  
responds appropriately. Any ideas?

Thanks!

Siddarth

---

<div class="post-metadata">

**Author:** ![Siddarth\_Chandrasek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@Siddarth\_Chandrasek](https://www.ruby-forum.com/u/Siddarth_Chandrasek)\
**Post date:** [May 6, 2010, 8:35am UTC](https://www.ruby-forum.com/t/email-listener/188118/2 "2010-05-06T08:35:28Z")

</div>

On 06.05.2010 01:36, Siddarth Chandrasekaran wrote:

> I’m trying to figure how best to write an email listener – basically,  
> something that listens for particular keyword(s) at an account and  
> responds appropriately. Any ideas?

Procmail can be made to do this:

> **[Partmaps.org](http://www.hotels-in-mallorca.net/en/partmaps.html)**
>
> All hotels in Mallorca. The best selection of Mallorca hotels with reviews and maps. Book in advance and save.

[http://www.procmail.org/](http://www.procmail.org/)

Bad news is that you might not even need Ruby for that. 🙂

Kind regards

robert

---

<div class="post-metadata">

**Author:** ![Siddarth\_Chandrasek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c4cdca/32.png) [@Siddarth\_Chandrasek](https://www.ruby-forum.com/u/Siddarth_Chandrasek)\
**Post date:** [May 6, 2010, 9:41am UTC](https://www.ruby-forum.com/t/email-listener/188118/3 "2010-05-06T09:41:54Z")

</div>

Siddarth Chandrasekaran wrote:

> I’m trying to figure how best to write an email listener – basically,  
> something that listens for particular keyword(s) at an account and  
> responds appropriately. Any ideas?

You could write a program which polls a POP3 mailbox periodically, and  
sends replies.

Or you could write a program which accepts an E-mail on stdin, and  
configure your MTA to deliver mail for a certain address directly to  
that program, e.g. using a .forward file or an entry in /etc/aliases.
