Forum Moderators: phranque
I have a working php/mysql registration system running on a dedicated-virtual box over at mediatemple with Qmail. When a user registers for an account on my system I'd like an email alias to be set up for them that, when it receives mail, checks to make sure the sender is a registered user and if they are, forwards that mail to the receiver's real email address (gmail, hotmail, etc) with the header changed so that it shows the sender's alias rather than their real address. No mail will be stored. Here's an example flow:
My site is example.com
1. User1 with Alias1 wants to send a message to User2 with Alias2
2. User1 writes a message from User1@hotmail.com to Alias2@example.com
3. The example server checks the DB for User1@hotmail.com as belonging to a registered user. If it isn't, User1@hotmail.com is sent an error message. If it is, the example server proceeds to step 4.
4. The example server changes the header on the message so that the message now appears to come from Alias1@example.com.
5. The modified message is now forwarded to User2@yahoo.com. If User2 wants to respond to User1 he does so to Alias1@example.com and the whole process starts over.
My real question is where to get started. I realize this isn't a small question by any means but I just need to identify the pieces so that I can start assembling them and educating myself. I'm guessing I won't have to create a real alias for each user, just a system to read the headers and act as a traffic controller.
You also need to scan the email content for references to the user's real email address - such as in signatures, etc.
That can get dicey if there is HTML content!
It does no good to make a substitution in the header if a reference within the text body slips through.
This almost certainly isn't something you have to write yourself, though. Do some searching, I am sure you will find multiple free and commercial solutions.
What would I search for to find some of the preexisting solutions out there? I'm not exactly sure how to formulate my request specifically enough for google at the moment.
There's one very popular service that is cheap - I think $10/year for the cheapest option. You just might find the service useful anyway. I use it for all of my website registrations, etc. Each website gets a unique email address.
Thanks for the help.