<!--
   $FML: newml.sgml,v 1.2 2005/07/23 01:57:37 fukachan Exp $
   $jaFML: newml.sgml,v 1.3 2003/04/15 14:51:44 fukachan Exp $
-->


<chapter id="setup.newml">
	<title>
	Create ML On Unix
	</title>


<sect1>
	<title>
	Run "makefml newml" To Create An ML (In The Case Of Default Domain)
	</title>

<caution>
<para>
The usage of &fml8; makefml is same as &fml4; in the case of default
domain.  But differs in the virtual domain case. See
<link linkend="setup.newml.nondefault">
<xref linkend="setup.newml.nondefault">
</link>
for the virtual domain case.
</para>
</caution>

<para>
To create an ML, use "makefml" command (CUI) in the same way as &fml4;.
<screen>
% su fml
% makefml newml elena
   ... snip ...
</screen>
</para>

<para>
In the case of non default domain (virtual domain), 
run "makefml newdomain" command before running "makefml newml".
<screen>
% su root
# makefml newdomain fml.org /var/spool/virtual/fml.org
# exit
% su fml
% makefml newml elena
   ... snip ...
</screen>
</para>

<para>
"makefml newml" processes the following steps.

<itemizedlist>

   <listitem>
        <para>
	Create files such as
	<screen>
	config.cf
	include
	include-ctl
	</screen>
	at /var/spool/ml/elena. The domain name et.al. in these files
	is replaced to proper value.
        </para>
   </listitem>

   <listitem>
        <para>
	Add elena ML entry into /var/spool/ml/etc/mail/aliases.
	Run postalias to rebuild /var/spool/ml/etc/mail/aliases.db.
        </para>
   </listitem>

   <listitem>
        <para>
	Create ~fml/.qmail-* files for qmail.
        </para>
   </listitem>

   <listitem>
        <para>
	Update procmailrc as a sample.
        </para>
   </listitem>

   <listitem>
        <para>
	Prepare the directory
	<screen>
	~fml/public_html/fml/mlarchive/$domain/$ml/
	</screen>
	for html archive.
	For example, for elena@fml.org
	<screen>
	~fml/public_html/fml/mlarchive/fml.org/elena/
	</screen>
	is creatd.
	HTML archive of ML articles is created by default.
        </para>
   </listitem>

   <listitem>
        <para>
	Prepare CGI (GUI). Set up 
	<screen>
	~fml/public_html/cgi-bin/fml/$domain/admin/config.cgi
	</screen>
	for the master cgi, instead cgi to control one ML $ml@$domain
	is set up at
	<screen>
	~fml/public_html/cgi-bin/fml/$domain/ml-admin/$ml/config.cgi
	</screen>
        </para>
   </listitem>

</itemizedlist>
</para>

</sect1>


<sect1 id="setup.newml.nondefault">
	<title>
	Run "makefml newml" To Create An ML (In The Case Of Virtual Domain)
	</title>

<caution>
<para>
The usage of makefml differs from &fml4;.
In the case of &fml8; firstly use "makefml newdomain" command, 
in the next run "makefml newml" command.
Also ml_name differs. For virtual domain, use ml_name@ml_domain form.
</para>
</caution>

<para>
In using "makefml newml", the usage is same as &fml4; except for 
the ml_name. ml_name part is ml_name@ml_domain in the case of &fml8;
</para>

<para>
At the first time to use a virtual domain, 
run "makefml newdomain" before "makefml newml".
<screen>
% su root
# makefml newdomain nuinui.net /var/spool/virtual/nuinui.net
# exit
% su fml
% makefml newml elena@nuinui.net
</screen>
After the second time, just use "makefml newml". 
<screen>
% su fml
% makefml newml elena@nuinui.net
</screen>
</para>

<para>
In running "makefml newdomain", 
specify a pair of domain and directory in ml_home_prefix_maps.
This command edits /usr/local/etc/fml/ml_home_prefix file to add the
following line.
<screen>
nuinui.net /var/spool/virtual/nuinui.net
</screen>
To remove this line, use "makefml rmdomain".
</para>

<para>
The usage of "makefml newml" command is same as in the case of default
domain.
</para>

<para>
"makefml newml" creates an example of virtual domain configurations
for several MTA's such as
<screen>
/var/spool/ml/etc/sendmail/virtusertable
/var/spool/ml/etc/postfix/virtual
</screen>
.
No example for qmail (not needed).
No example for procmail since .procmailrc contains domain.
</para>

<para>
See the chapter of
<link linkend="virtualdomain">
virtual domain
</link>
for more details.
</para>

</sect1>


<!-- MTA config -->
&sect.setup.postfix;
&sect.setup.qmail;


<!-- each ML config -->
&sect.setup.config.cf;


<!-- recipies -->
&sect.setup.newml.recipes;

</chapter>
