On Wed, Nov 05, 2003 at 09:39:51AM +0000, Andrew Ingram wrote:
> > You can set the templates using an environment variable, which means if you
> > have multiple virtual servers in Apache then you can have different
> > templates for each one. But as far as I know there's no built-in logic to do
> > it based on the login name.
>
> Thanks for the reply Brian. Do you have any details of how this works?
> Is there any documentation you can point me towards?
In the INSTALL file at the top-level of the source tarball:
Domain-based templates are implemented by making the web server set
the environment variables SQWEBMAIL_TEMPLATEDIR prior to running the
sqwebmail binary. The contents of this environment variable override
the default location of /usr/local/share/sqwebmail/html. By having the
web server initialize this variable based on the domain name it is
possible to present different templates, based on the domain name
used.
To do this, make copies of the HTML template directory,
/usr/local/share/sqwebmail/html. Then, configure the web server to
initialize SQWEBMAIL_TEMPLATEDIR appropriately. For example, with
Apache:
<VirtualHost a.b.c.d>
ServerName webmail.example.com
[...]
SetEnv SQWEBMAIL_TEMPLATEDIR /usr/local/share/webmail/webmail.example.com
[...]
</VirtualHost>