# Generating user email accounts

**URL:** <https://www.ruby-forum.com/t/generating-user-email-accounts/85119>\
**Category:** Rails\
**Created:** [February 10, 2007, 4:09am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119 "2007-02-10T04:09:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 10, 2007, 4:09am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/1 "2007-02-10T04:09:31Z")

</div>

OK, so we’re getting really close to lauch and someone insists on  
adding a new feature, great, not a problem, but I’ve never done this  
before, hopefully someone here can at least point me in the right  
direction.

We now need to automatically create an email account for each user  
that signs up. This email will be used to take incoming messages,  
parse them and then present the data to the user. Users will not be  
able to access them as pop accounts.

This is all well and good but I have no idea how to do this, what to  
use for the email server (we’re Linux so I think Postfix might be  
best, but maybe not), or how to hook the account creation into Rails.  
Any help here would be greatly appreciated, even just a pointer to  
some other article that may even just touch on this.

Thanks in advance  
Dale

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 10, 2007, 5:29am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/2 "2007-02-10T05:29:37Z")

</div>

Hi Dale, will these e-mail accounts be used on the site only?

-Conrad

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 10, 2007, 6:00am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/3 "2007-02-10T06:00:39Z")

</div>

Yes, they are essentially there so that users can send an email with a  
subject like ‘Dons Party 3/17/07’ to their site account and we create  
a celendar entry for them on the 17th of March 2007 with the title  
Dons Party (to be honest I’m not sure this is such a good idea but  
what do I know). There is no outbound mail and they can’t use a POP  
client (say Outlook) to pick up their mail. Once the mail is recieved  
and processed it gets deleted.

Rather than creating a seperate email account for each user we could  
just have a catch all account that gets all email, and then we just  
pick up and process the ones that have matching users, say  
removed\_email\_address@domain.invalid and removed\_email\_address@domain.invalid get processed and  
assigned to their perspective account (bob and steve669) but  
removed\_email\_address@domain.invalid gets deleted because there is no account with  
username davesmith. Once again, I don’t know if this is a good idea or  
not.

Dale

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 10, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/4 "2007-02-10T15:51:43Z")

</div>

Take a Look at majordome, it has some of the features your are looking.

In my opinion would be better to have just one email account receiving  
emails  
in a given format so that you can parse them easly

[http://www.greatcircle.com/majordomo/](http://www.greatcircle.com/majordomo/)

$/usr/bin/mv /usr/bin/mv

-rb.

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 11, 2007, 12:44am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/5 "2007-02-11T00:44:11Z")

</div>

> This is all well and good but I have no idea how to do this, what to  
> use for the email server (we’re Linux so I think Postfix might be  
> best, but maybe not), or how to hook the account creation into Rails.  
> Any help here would be greatly appreciated, even just a pointer to  
> some other article that may even just touch on this.

[http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer](http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer)  
[http://api.rubyonrails.com/files/vendor/rails/actionmailer/README.html](http://api.rubyonrails.com/files/vendor/rails/actionmailer/README.html)

-Kyle

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 11, 2007, 1:26am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/6 "2007-02-11T01:26:13Z")

</div>

Thanks rb, but majordomo is really a list server, which is not what  
I’m looking for.

On Feb 10, 6:51 am, Rodrigo B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![PeteSalty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/bc79bd/32.png) [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Post date:** [February 11, 2007, 1:28am UTC](https://www.ruby-forum.com/t/generating-user-email-accounts/85119/7 "2007-02-11T01:28:14Z")

</div>

Kyle,

Thanks so much for pointing this out, I knew there’d be a Rails way of  
doing it I just didn’t believe, or at least, couldn’t concieve that it  
would already come with the system. This is what happens when you come  
from a .NET environment into Rails, you’re constantly astounded by  
what is already done for you.

Dale
