Re: E-mail redirection....?

From: Date: Fri, 10 Jan 2003 23:39:30 +0000
Subject: Re: E-mail redirection....?
References: 1  Groups: php.general php.general 
Request: Send a blank email to php-general+get-131207@lists.php.net to get a copy of this message
You might see if your server is running procmail. If it is, then you can have your .procmailrc file auto-generated from PHP, and then procmail will do all the forwarding for you. The procmail recipe will be pretty simple for what you want (e.g.,) # user_id -> useremail@usersdomain.com :0 * ^TO(user_id@mydomain.com) ! useremail@usersdomain.com If you want to also handle cases where the user was BCC'd, then you might also put this in: :0 * ^Received.*for..user_id.mydomain.com ! useremail@usersdomain.com So when a new id is created (or user changes their target e-mail address) you can run through a script that foreach of the user_id values, it creates the above procmail recipe - dump it into the .procmailrc file and you're set. -Dave Michal Stankoviansky wrote:
Hi I'm totally confused. What I need is the following: User registers and I need to create an e-mail alias for him, something like user_id@mydomain.com. If someone sends an e-mail to the above address, I need to redirect it to the user's real e-mail address. I'm totally lost...can this be done in PHP????? Thanx for help, please save me :) Michal


« previous php.general (#131207) next »