[dev] Re: [imp] trailer.txt with multuple domains

Rich Lafferty rich@horde.org
Wed, 21 Mar 2001 12:57:55 -0500


On Wed, Mar 21, 2001 at 08:59:50AM -0800, Edwin L. Culp (eculp@EnContacto.Net) wrote:
> >
> > I lean towards solving the problem once -- maybe documenting how to do
> > multi-domains setups with conditionals? In other words, PHP-parsed
> > files already do per-domain, 
> 
> In my rush to not have multiple instances of IMP, I may have been
> trying to reinvent the wheel - again:-(.  What are the existing,
> per-domain conditionals using as a base for comparison?  Which files
> contain them?

Er, well, this is the dev list, you can't assume that things talked
about here exist yet. :-) I'm not exactly up-to-date on the 2.3
tree. But with what I was suggesting, you could do something like this
(using 2.2's variable names):

 <?php if ($imp->server == 'mail.biscuit.ca') { ?>
 -- 
 This mail sent from Biscuits Online Webmail! 
 <?php } elseif ($imp->server == 'post.platzchen.de') { ?>
 -- 
 Diese Meldung gesendet von den Platzchen-Online!
 <?php } ?>

or, for instance, use the environment variables the webserver
provides. (Locally, we give the user a "Use our secure site" link if
they're using http and not https, but no "Use our insecure site" link
if they're already using https, based on $SERVER_PORT.)

But note that Chuck and I were talking about a feature that doesn't
exist yet, with respect to trailer.txt; it happens to work in MOTD.txt
(now motd.php) in 2.2 right now because that file's sucked up with
include() rather than file().

  -Rich

-- 
------------------------------ Rich Lafferty ---------------------------
 Sysadmin/Programmer, Instructional and Information Technology Services
   Concordia University, Montreal, QC                 (514) 848-7625
------------------------- rich@alcor.concordia.ca ----------------------