<!--
   $FML: chapter.sgml,v 1.1 2003/07/27 15:04:27 fukachan Exp $
   $jaFML: chapter.sgml,v 1.2 2003/04/15 14:51:47 fukachan Exp $
-->

<chapter id="virtualdomain">
	<title>
	Virtual domain handling
	</title>

<para>
It is difficult to handle virtual domains and the default domain in
the same way.
</para>

<para>
You can use "user@domain" as an argument if needed, for example,
ambiguous. So, use "user@domain" form for the ML name if it is an ML
of a virtual domain. For example, for a virtual domain, use makefml
like this
<screen>
% makefml newml mlname@virtualdomain
</screen>
but both syntaxes are acceptable for the default domain.
<screen>
% makefml newml mlname@defaultdomain
% makefml newml mlname
</screen>
Fml treats these properly as could as possible. But fml needs some
hints such as ml home directory information. You need to prepare
/usr/local/etc/fml/virtual file for a hint on mappping between domain
and directory. This file name is defined as $virtual_maps in main.cf.
</para>


<sect1 id="virtualdomain.fml8.overview">
	<title>
	Overview: virtual domain handling in &fmldevel;
	</title>

<para>
It is easy in use.
Edit
<link linkend="install.virtual">
/usr/local/etc/fml/virtual
</link>
file and define it as $virtual_maps in main.cf. 
After that, you can use "user@domain" form in makefml arguments 
in handling virtual domains.
<screen>
makefml newml	ML@virtualdomain
makefml add	ML@virtualdomain	address
makefml bye	ML@virtualdomain	address
</screen>
Instead, for the default domain, either of user and user@domain is
accpetable.
</para>

<para>
When you use CGI, you need not to use user@domain syntax 
since config.cgi knows the domain name the cgi handles.
<screen>
http://lists/~fml/cgi-bin/fml/$domain/admin/config.cgi
</screen>
</para>

<warning>
<para>
The domain name is hard-coded within config.cgi since makefml injects
the domain name in creating config.cgi when "makefml newml" runs.
"config.cgi" does not resolve its domain by URL.
</para>
</warning>

</sect1>


<sect1 id="virtualdomain.movement">
	<title>
	Case study: movement ?
	</title>

<para>
NOT YET WRITTEN.
</para>

</sect1>


</chapter>
