Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

implementing email relay

 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to implement an email relay system, which works like the one in caraigslist.org

This is how it should work:
For every user, there is a email id created when the account signup is done.
real email id : smith@hotmail.com
created email id : 178644@mydomain.com
anyone who wants to email the user can send mail to 178644@mydomain.com and the server will relay it to smith@hotmail.com

How do i go about it?

I have qmail in my server.
[ August 28, 2006: Message edited by: azhar bharat ]
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first of all you wouldn't use a servlet. Servlets process HTTP requests, but e-mail has nothing to do with HTTP.

What you do is this:

1. Set up an e-mail server that can receive e-mails at mydomain.com.

2. Make sure it's set up to reject as much spam as possible.

3. Program it so that when it receives a message for abc@mydomain.com, it finds out what real address that corresponds to and resends a copy of the message (presumably including the advertising that pays for your site) to that real address.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For an open-source email server see the Apache JAMES project .
As I recall, mail generally gets discussed in the "Other API" forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, thusly moved.
 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think you guys understood what i meant.
The problem is I cant configure the mail server manually evertime a new user signs up. I want a way to do it programatically.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by azhar bharat:
I dont think you guys understood what i meant.
I understood perfectly well what you meant.
The problem is I cant configure the mail server manually evertime a new user signs up. I want a way to do it programatically.
You're the one not understanding. When the user signs up you put their information in a database. When your server gets an e-mail for their alias, it looks in the database and forwards the message to their real address.
 
azhar bharat
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Paul Clapham:
When your server gets an e-mail for their alias, it looks in the database and forwards the message to their real address.


But how does my application know that a mail has arrived in the mail server?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic