[imp] From address

jimmy@firstlink.com.au jimmy@firstlink.com.au
Wed, 30 Jan 2002 10:23:57 +1100


in servers.php: 

//This extracts the domain name like webmail.example.com to example.com 
$this_domain=substr(getenv('HTTP_HOST'),strpos(getenv('HTTP_HOST'),'.')+1); 
//append mail host to domain, most server with mail like mail.example.com 
$this_mail_server='mail.'.$this_domain; 
$this_mail_protocol='imap'; 
$this_mail_port=143; 
$this_mail_folder=''; 
$this_mail_namespace=''; 
$this_mail_smtphost='localhost'; 
$this_mail_realm='webmail.'.$this_domain; 

$servers[$this_domain] = array( 
        'name' => $this_domain, 
        'server' => $this_mail_server, 
        'protocol' => $this_mail_protocol, 
        'port' => $this_mail_port, 
        'folders' => $this_mail_folder, 
        'namespace' => $this_mail_namespace, 
        'maildomain' => $this_domain, 
        'smtphost' => $this_mail_smtphost, 
        'realm' => $this_mail_realm, 
        } 

The above script detects the domain name and sets the right server properties. 

another change that i found useful was modify trailer.txt and compose.php make 
it subs the virtual domain name into the trailer.txt. 
in my trailer.txt: 
-------------------------------------------------------- 
This mail sent through MY_WEBMAIL_HOST webmail service 

in compose.php at line 674 I add this code: 
$trailer =ereg_replace('MY_WEBMAIL_HOST', substr( getenv('HTTP_HOST'), strpos 
(getenv('HTTP_HOST'), '.') + 1), $trailer); 

the above subs. MY_WEBMAIL_HOST with the virtual domain. 

Also in login.inc 
insert this line after the form input text login:
<?php echo substr($HTTP_HOST,strpos($HTTP_HOST,'.')+1)?>



hope you find it useful

jim

Quoting syn uw <syn_uw@hotmail.com>:

> Hi there,
> 
> I just installed horde 2.0 and imp 3.0. My configuration is like that, as a
> 
> provider i give webmail access to all my users (which can come from any 
> different domains) but IMP is always reacheable from the same URL. The 
> problem I now encouter is that I need somehow to set the From address to the
> 
> username@hisdomain.com and I don't want to allow him to enter himself his 
> e-mail address in his identities so I've disabled that. My question now is,
> 
> how can I do that ??
> 
> Thanks for the help
> 
> Regards
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 
> 




--------------------------------------------------------
This mail sent through firstlink.com.au webmail service