简体   繁体   中英

How to Dynamically generate emails like doing in Craiglist?

When you reply a post for personal ad section in Craigslist.org they show a generated email address which we can use to send email to owner of the ad.

k86wt-47XXXXXXXXX@pers.craigslist.org

They doing it to protect the ad owner from the spamming. So after that when owner receive that email from the Craigslist they also can reply to that email address. But again they are going through Craigslist. So Craigslist act as a intermediate person who connecting these 2 parties. They can communicate with each other for 6 months ( I think ) by using this Craigslist generated email even the ad is expired.

So this post is not a marketing article of Craigslist. :)

I just want to know how to do this? I chated with famous email clients but they not offering this dynamically generated email thing. This cant be achieve with email client which comes with the domain owner because they are only offering a 1 or few emails per domain which can not be auto generated.

I am developing an ASP.NET web application and I want to implement the above mechanism. If you are saying that I should get a dedicated email server. Ok. Tell me where to get? then what? Please explain it. Give me some links please. Don't forget that I want to send unlimited emails per day.

I dont know specifically how craigslist does it, but I would just have a DB table with 2 columns, 1 is a randomly generated email address on your domain, which you can generate uniquely however you like, and the second is the real users email address it maps to.

Then id set up a mail server on my domain that accepts all mail into a single inbox. Then id run through any mail received, and if the "To" address is in my list of generated emails, forward it along to the intended recipient.

You will need to find a host that will let you set up and run your own mail server though. You will not be looking at consumer hosts, or pretty much any host which offers anything like "1 or 2 email addresses per domain". You need a proper host. Azure cloud or EC2 are probably good choices off the top of my head for something like this, but I dont have much experience in that area.

Gmail has a similar mechanism where I can create unlimited email aliases for myself with "myname+any_alias_here@gmail.com". The plus is not standard, but it works in a lot of clients and forms (unless sites just don't let that pass validation). Since the Craig's List has the "-" sign, it just reminded me of Gmails feature.

As for your setup, you could setup a postfix email server on a quick Amazon EC2 instance with Linux, the have a process to manage your aliases file. http://www.postfix.org/STANDARD_CONFIGURATION_README.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM