[imp] Virtual domain TIPs
Jan Schneider
jan@horde.org
Wed, 10 Apr 2002 10:49:24 +0200
Zitat von "Ing. CIP Alejandro Celi Mariátegui" <alex@linux.org.pe>:
> We want to when the user use http://mail.domain1.com or
> http://mail.domain2.com the server recognize HTTP_HOST and do this:
>
> 1.- User login with for example "alex" and his password in
> http://mail.domain1.com
>
> 2.- The server look the domain and change the login user to
> alex_domain1_com
> as the real user (like in $conf['hooks']['vinfo'] = 'imp_get_vinfo'),
> thanks
> Chuck!
>
> 3.- I configured the config example sent by Jim in this email:
> http://marc.theaimsgroup.com/?l=imp&m=101195869916272&w=2
> looks good!
>
> All works fine still now!
>
> The problem is:
>
> When user "alex" (real user alex_domain1_com) compose and email and send
> it
> to another mailserver, it always arrive using the real account user name
> like this:
>
> alex_domain1_com@domain1.com
>
> I wish I could have a config or php tip for making that the "From field"
> changes to the virtual sender like this
>
> alex@domain1.com
You can do this in the "from" hook. Just strip everything up from the
second last underscore. Or replace the "underscored" HOST_NAME part with an
empty string.
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft