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 -> [EMAIL PROTECTED]
:0
* ^TO([EMAIL PROTECTED])
! [EMAIL PROTECTED]

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
! [EMAIL PROTECTED]

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 [EMAIL PROTECTED] 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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to