
		fml under qmail environment

				Ken'ichi Fukamachi

------------------------------------------------------------
1	Caution
1.1	when you receive a mail
1.2	in distribution of ML articles

2	Set up mailing lists
2.1	qmail-users 
2.2	:include: cannot be used
2.3	~alias/.qmail-list style
2.4	Create "elena" user virtually.

Appendix A	special topics
Appendix A.1	VERPs
Appendix A.2	listname-command syntax command address
------------------------------------------------------------


1	Caution

1.1	when you receive a mail

The address rewriting rule of qmail differs a lot from other MTA's.

Let your account be "fml" and domain is "fml.org". You can extend your
address. This is called "extension address".  You can run fml at the
address "fml-elena@fml.org" by using ~fml/.qmail-elena file.

If you want to use "elena@fml.org" not fml-elena sytle, you have to do
add a few configurations.

~/.forward of sendmail corresponds to ~/.qmail. /var/qmail/alias is
similar to /etc/aliases of sendmail. Please see manuals and
http://www.qmail.org/ for more details.

1.2	in distribution of ML articles

fml connnects to MTA via SMTP, so you need RELAYCLIENT configuration
of qmail as follows.  See QMAIL FAQ and the manula of "qmail-smtpd" at
the first. 

Let us consider inetd csse. You should modify /etc/inetd.conf to be
that "RELAYCLIENT is null string when SMTP from localhost to disable
rcpthosts in /etc/inetd.conf".

* inetd.conf example:

smtp stream tcp nowait qmaild /usr/libexec/tcpd	/var/qmail/bin/tcp-env /var/qmail/bin/qmail-smtpd

* After rewrite inted.conf, send the HUP signal to inetd.
   % kill -HUP `cat /var/run/inetd.pid` 

* Set RELAYCLIENT be null when SMTP from localhost. 

tcp-env: 10.0.0.1, 127.0.0.1: setenv = RELAYCLIENT
tcp-env: ALL

2	Set up mailing lists

Consider creating elena ML. Several types are available. It may look
functional to use "qmail-users" described just below.

2.1	qmail-users 

Let "makefml newml elena" to create elena ML.
It makes examples under $ML_DIR/etc/qmail.

* Become root and edit /var/qmail/users/assign to add

   +elena:fml:100:1000:/var/spool/ml/etc/qmail/alias:-:elena:
   .

After this edit, run /var/qmail/bin/qmail-newu. This is just an
example. User name, uid, gid, home is customizable (If your account is
used, you have not only to su).

   +:fml:65535:10:/var/spool/ml/etc/qmail/alias:-::
   +mikoto:mikoto:100:10:/home/mikoto:-::
   .

CAUTION: All mails are forwarded to ML in this "assign" config.  If
user "mikoto" like to receive her mail in this host, she require the
following configuration. Please see manual of qmail-users(5).

2.2	:include: cannot be used

:include: style is not used under qmail but used via qmsmac. But
qmsmac does not support program running under it. 1998/04 qmsmac
becomes obsolete and is replaced to "fastfoward" (not tested).

    /var/qmscma/man/cat5/aliases.0
    
    MAJOR COMPATIBILITY ISSUES
           sendmail's handling of quotes and backslashes violates RFC
           821  and  RFC  822,  and  is not supported by qmsmac.  The
           qmail-alias delivery mechanism lets each user manage  sev-
           eral  addresses,  so there is no need for a special syntax
           to get around forwarding.
    
           sendmail and smail support file and program deliveries out
           of  /etc/aliases  and  :include:  files.  qmsmac does not.
           You can use the delivery  mechanism  described  in  qmail-
           alias(8) to set up secure file and program deliveries.

2.3	~alias/.qmail-list style

Create a virtual user "alias" and make .qmail-list style in alias's
home directory.

Run "makefml newml elena". Take out examples .qmail-elena* under
/var/spool/ml/etc/qmail/alias/ to ~alias/. Change owner of ~
alias/.qmail-elena* to "alias".  The files in ~alias/ follows:

	~alias/.qmail-elena
	~alias/.qmail-elena-ctl
	~alias/.qmail-elena-admin
	~alias/.qmail-elena-request

~alias/.qmail-elena
|/usr/local/fml/fml.pl /var/spool/ml/elena

~alias/.qmail-elena-ctl
|/usr/local/fml/fml.pl /var/spool/ml/elena --ctladdr

~alias/.qmail-elena-admin:

~alias/.qmail-elena-admin:
your-email-address

~alias/.qmail-elena-request:

~alias/.qmail-elena-request:
your-email-address

It has the same format as sendmail's include files but without '"'.

If you use "makefml", you should switch user (su) to "alias".

2.4	Create "elena" user virtually.

Similar to alias, but the virtual user name is equal to the ML itself.
Change owner files under /var/spool/ml/elena to be "elena".

~elena/.qmail
|/usr/local/fml/fml.pl /var/spool/ml/elena

~elena/.qmail-ctl
|/usr/local/fml/fml.pl /var/spool/ml/elena --ctladdr

~elena/.qmail-admin:

~elena/.qmail-admin:
your-email-address

~elena/.qmail-request:

~elena/.qmail-request:
your-email-address

Appendix A	special topics

Appendix A.1	VERPs

	../English/errormails/

Appendix A.2	listname-command syntax command address

If you use .qmail-elena-default for elena ML, which is created in
"makefml newml", your fml provides another command syntax. For example,
address elena-help@domain returns help file to the sender. That is
elena-command@domain is equal to to send "command" to elena-ctl@domain.
When you use this function, please set $USE_DOT_QMAIL_EXT = 1;

