fml 8 tutorial
Dr . Ken'ichi Fukamachi
FML.ORG
< fukachan@fml.org >
Copyright (C) 2001,2002,2003,2004,2005,2006 Ken'ichi Fukamachi
All rights reserved. This program is free software; you can redistribute it and
/or modify it under the same terms as Perl itself.
The current status of fml8 is PRE ALPHA. The version is 7.98.x. We plan to
assign version 7.99.x to fml 8 ALPHA through fml 8 RC (release candidate).
The current TODO is seen at http://www.fml.org/software/fml-devel/fml/doc/ja/
todo/STATUS.html (Japanese only now, sorry). See Chapter 8 on the changes
between fml 4 and fml8.
It is verified that fml8 works on the following environemnt now.
perl 5.8.5 on NetBSD 2.0
perl 5.8.5 on NetBSD 1.6
perl 5.6.1 on NetBSD 1.5.x (1.5 stable)
perl 5.6.1 on NetBSD 1.6
perl 5.6.1 on FreeBSD 5.2.1
perl 5.00503 on FreeBSD 4.3 STABLE
perl ? on FreeBSD 4.6 RELEASE
perl 5.00503 on FreeBSD 4.7 RELEASE-p3
perl 5.00503 on FreeBSD 4.6.2 RELEASE
perl 5.6.1 on Turbolinux Server 8 (qmail)
perl 5.6.1 on Redhat Linux 7.2 (postfix)
perl 5.00503 on Redhat Linux 6.2 (sendmail8.11.6)
postfix + perl 5.6.1 on Solaris 7
postfix 2.0.3 + perl 5.6.1 on Solaris 9
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Table of Contents
Preface
fml8 Status
The Road To The Next Generation Of Fml
Relation Between fml4 And fml8 Development Branch.
Mailing List
Please Let Me Know Your Opinion ...
On This Tutorial
Technical terms in this tutorial
I. Fml Fundamental Usage
1. What Is Mailing List ?
Email
Mailing List (Ml)
2. fml8 Overview
fml8 Features
Installation Overview
Create An ML
Add A New User To ML
Remove The User
Customize
Recipes
II. How To Set Up ML
3. Download fml8 Source Code.
Download Via Ftp.
Access To Cvs.
Access To Cvs Via Cvsweb.
4. fml8 Installation On Unix
Preparation Of Installation
Run Configure
Appendix: Directory Roles
Fml Installation: make install
Edit main.cf
Edit site_default_config.cf (optional)
Filter
Virtual Domain
MTA Configuration (postfix)
MTA configuration (qmail)
recipes
5. Create ML On Unix
Run "makefml newml" To Create An ML (In The Case Of Default Domain)
Run "makefml newml" To Create An ML (In The Case Of Virtual Domain)
MTA Configuration (postfix)
MTA Configuration (qmail)
Customize config.cf
Recipes
6. fml8 installation on Microsft 2000/NT
7. Convert fml4 Style ML To fml8 Style ML
Overview: fml4 To fml8 (1)
Overview: Convert fml4 To fml8 (2)
Overview: Difference Between fml4 and fml8
Discussion
8. Difference Between fml4 And fml8
Difference Between fml4 And fml8: License.
Difference Between fml4 And fml8: Command Mail And Error Messages.
Difference Between fml4 And fml8: CUI
Difference Between fml4 And fml8: GUI (CGI)
File Naming Convention
9. Upgrade And Downgrade Of fml8
Upgrade
downgrade.
10. Configure CGI
"makefml newml" Creates CGI Script Always
Edit .htaccess
Example: Master Cgi
CGI Example: Create ML
CGI Example: subscribe
CGI Skin Selection
11. Apache Configuration
Use Suexec Of Apache
12. Test
Before Test
Test Of MTA
Send A Mail To ML
Test Of fml8 Itself.
Reset After Test.
III. How To Customise
13. What A User Can
Get ML Guide
Subscribe
Posting Article
Help: When You Want To know The Usage
Get Past Articles
Unsubscribe
Command Mail (Control fml By Sending Mail)
14. What Can You Do On The Mailing List Server
On The Host
Policy Of Command Creation
Common Command Line Options
Create A New ML
Remove An ML
Subscribe and Unsubscribe
Change the registered address
Stop Realtime Delivery
Start Realtime Delivery
See Log
See The Member List
Modify Configuration
Add or Remove A Remote Administrator.
Add or Remove A Modrator
"fml" And "makefml" Command
Show Addresses (Users + Aliases)
Show Alias
Show Configuration
Show Perl Module Document
Convert Articles To HTML Form
Recipes
15. Modify Configuration Files
Change Default For All ML's On Thie Host
16. [Caution] File Names
Filename Structure
Case Study: Address List
Case Study: List Of Remote Administrators
Case Study: List Of Moderators
Case Study: Remote Administrator Password Files
17. Case Studies Of Customization
Case Study: Auto File Responder
Case Study: Anyonen Can Use Command Mail.
Case Study: Disable Command Mail
Case Study: Mail Magazine (1)
Case Study: Mail Magazine (2)
Case Study: Anyone Can Post.
Case Study: Article Posting Allowd If It Is A Reply To The Former One.
Case Study: PGP/PGP Based Authentication In Posting
Case Study: Authenticate command mail by PGP/GPG
case study: hierarchical ML
I Want To Use ML By My Account.
Case Study: Office (1)
Case Study: Office (2)
18. Header Rewriting
Recipe's
19. Extend Command
Case Study: Create Your Own Help Command.
Recipes
20. Filtering
21. Extend Message
Case Study: Customize Message
22. Be ML Articles public via WWW
Recipes
IV. Operations
23. Logging
See Log
Show Computer Oriented Log
Recipes
24. Back Up Of Configurations
Back Up fml8 Configurations
Back Up All Files Except For Some Large Directories.
V. Troubleshoot
25. Troubleshoot
When The File System Error Ocuurs
VI. fml8 Design
26. [LOG] Original Idea Of fml8 Project
The Original Idea Of fml8 (fml-devel) Project
Details Of Idea
Refactoring
Architecture image
release engineering
27. Programming Style
Variable Naming Convension
A Few Topics On Design And Coding Style
Programming Style Original Idea
VII. fml8 Internals
28. fml8 Boot Loader To Resolve Version Dependence Dynamically
Case: Distribution
FML::Process:: Class Structure
Modules In Process Execution
Discussion: Where Function Should Resolve $ml_name And $ml_domain.
29. Configuration File: config.cf
ML Specific Configuration File: config.cf
config.cf Format
Extension To Postfix Style
Overload Variables In config.cf
Modifying/Adding Variables After All Configuration Files Have Been
Loaded.
Variable List (Alphabetical Order)
Variable List (Class Based)
Recipes
30. Create A New Program
Create A Program (CUI)
Create A Program (CGI)
31. fml8 Mail Delivery System
The Difference Between fml4 And fml8
Mail::Message Object
Incoming Queuing
fml Sends Back A Mail Message
Mail Queue And Delivery System
Mail Queue Directory
Queue Management System
Discussion: FML::Mailer Is Apropriate ?
Delivery TIPS
32. Digest Delivery
Files Used For Digest Delivery Control
Idea: Digest Related Commands
recipes
33. Language Preference In Processing
Problems Of Language Preference
Japanese Preferred ML
English preferred ML
34. Manipulate Message (Mail Message)
Mail::Message Class
Mail::Message::Parse Class
Mail::Message::Compose Class
Message Internationalization: The Usage Of reply_message_nl()
Discussion: How To Send Back Language Dependent Error Mesages
35. Filter
Overview Of Filter System
Configuration Variables
Size Limit
Limit For Command Mail
Mime Component Filter Rules
Discussion: Mime Component Filter Needs What Functions ?
36. Subscribe / Unsubscribe
Which Map Subscribe/Unsubscribe Is Operated To ?
37. Command (Command Mail, CUI And GUI)
Modules for commands
Data Flow Of Command Request Processing
Command Extension: Command Mail
CUI Command Extension: makefml/fml
GUI Command Extension: CGI
How Differ Coding Style Among fml4 And fml8
38. Internal Of CGI Process
Method
Screen Of CGI And The Method
Screen And Trampolin Mechanism
MISC: Hard Coding Is Mandatory ?
CGI Implementation: Inheritance Among CGI Classes
CGI Implementation: config.cgi
39. Directory
Q: How Recursively Sub Directory Can Be Created ?
Recipes
40. Restrict Input Data
Overview: Checks Of Input Data
FML::Restriction Class
How CGI Restricts The Input
Discussion: FML::Restriction Is Too Restrictive ?
41. User Authentication
Discussion: FML::Credential Implementation
42. Hook
Overview
Hook Naming Convension
Recipes
43. Virtual Domain
Overview: virtual domain handling in fml8
Case study: movement ?
44. Errormail Analyzer (libexec/error)
Overview
Algorithm Of Error Detection
Cache Of Error Messages Data
Forward Error Messages
45. IO Interface And Operations
Fundamentals Of IO::Adapter
Methods / Operation Vector
Discussion
46. Lock
Overview: Lock
TODO
47. Database Related Modules
Overview
Persistent Data Use
Tie::JournaledFile Class
FML::Cache::Ring Class
48. Database Management System
Overview
49. Convert Another ML System To fml8
Implementation: fml4 To fml8
VIII. Modules
50. IO Abstraction Layer (IO::Adapter Class)
IO::Adapter Overview
IO::Adapter Methods
Argument Type Of Methods
File Map
Unixgroup Map
Nis Map
MySQL Map
51. Mail::Message Module
Mail::Message Overview
Mail::Message Module: Analyze
Mail::Message Module: Create A New Object
Mail::Message Module: Header Manipulations
Mail::Message Module: Manipulate Messabe Body
Mail::Message Module: Search
Mail::Message Module: Print
Mail::Message Module: Utility Functions
References
52. Language Dependent Functions
Something::Language:: Class
53. Mail::Message::Encode Class
Mail::Message::Encode Specification
run_in_chcode()
54. Execise: Create A New Program
Case Study: Create A fmlsch
Case Study: fmlsch.cgi
IX. Apendixes
Glossary (function and variable names convention)
A. Struct curproc (Object In Fact)
curproc Object
PCB Category List
List of Tables
4-1. directory structure
8-1. Difference between fml4 and fml8: CUI
26-1. refactoring TODO
26-2. release interval
29-1. table description
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Preface
fml8 Status
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│fml8 has already implemented fundamental functions. Several people uses fml8│
│as hobby and office mailing list system under normal operations. │
│ │
│When you configure fml8, you need to edit configuration files since │
│configuration helper tool has basic functions now. Except it, you can use │
│fml8 as same as fml4. │
│ │
│See http://www.fml.org/software/fml-devel/fml/doc/ja/todo/STATUS.html for │
│the current status of fml8. │
│ │
│See Chapter 8 on the difference between fml4 and fml8. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Road To The Next Generation Of Fml
fml8 is fully rewritten mailing list driver from scratch to re-implement fml4.
The main purpose of this project is re-implementation of fml mailing list
driver system with reflecting our 10 years experience on mailing list driver
developement.
Roughly speaking, the relation between fml4 and fml8 is similar to one between
sendmail and Postfix.
fml8 re-implements almost all features of fml4 functions. We re-design fml and
clean up the function and variable naming convenstion. Also, We reinforce guide
line to the coding style for clean source codes.
For example, when you use fml4, you'll find that fml assumes the list of
members is a text file on the host. fml4 inherits the assumption from version
1.0 through 4.0. It affetcts the core part of the design. Hence, it is
difficult to extend fml IO for the use of RDBMS, redundency et.al. In fact,
fml4 supports RDBMS but the code is ugly. We should need to fully rewrite fml
core parts.
Also, I want a lot of new features. fml8 should provide tiny bug tracking
system maintatined automatically. It is better to co-relate fml with cvs log.
These features help the support by mail and developer mailing list. I need it,
of course.
Firstly, we need to discuss what we should inherit from fml4 design and
features, and discard what in fml4.
・ What we should inherit into fml8 from fml4 ?
・ easily customizable ?
・ what obsolete features we should remove ?
Anyway, we should write codes for the further discussion! You can find it at
the following URL.
http://www.fml.org/software/fml8/
ftp://ftp.fml.org/pub/fml8/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Relation Between fml4 And fml8 Development Branch.
We implement new features at fml8 branch. fml4 imports it if needed. We only
have to bug-fix at fml4 branch.
(further translation omited).
fml-devel
-----------------------------> 8.0
A |
| | (interaction)
| V
1.2 -> 4.0 ------------------------------> 4.0-current
| |
4.0.1 4.0.2 .... (release / 4.0-stable release)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Mailing List
fml-users@ffs.fml.org is prepared. Use it for English discussion.
To subscribe it, send the mail with "subscribe YOUR NAME" in the body to
fml-users-ctl@ffs.fml.org. You will receive the reply for confirmation. Please
reply the confirmation and send back it to fml-users-ctl@ffs.fml.org again. For
example, a subscribe mail is as follows:
From: your-account@your-domain
To: fml-users-ctl@ffs.fml.org
subscribe Kinomoto Sakura
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Please Let Me Know Your Opinion ...
Please send me the idea on fml8 to the mail address: fml-request@fml.org or
myself fukachan@fml.org directly.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
On This Tutorial
For the fml4 user, the order of chapters and sections are almost same as the
book "fml bible" publishded by O'reilly Japan (rewritten in Japanese).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical terms in this tutorial
See Glossary (function and variable names convention) also.
%
user prompt on the shell
#
root user prompt on the shell
~
user's home directory
CUI
command line tool such as makefml or fml.
fml
fml software in general use.
fml (command)
fml command included in fml8 software. fml is same as makefml command
except for the argument order.
user fml
a user called as fml. a user account for fml8 software.
fml4
fml4 series.
fml8
fml8 series.
GUI
CGI interface.
makefml (command)
configuration helper tool included in fml4 and fml8. You can use them when
you login the mailing list server.
I. Fml Fundamental Usage
This part describes a brief guide for beginners.
See http://www.fml.org/software/fml/ and other sites for more details on
mechanism of the mailing list.
Table of Contents
1. What Is Mailing List ?
2. fml8 Overview
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 1. What Is Mailing List ?
Email
Email is an electirc version of mail.
One email has the following structure which consists of two parts. The former
is header, the latter is body. The separator between them is one null line
(empty line).
[Example]
From: rudo@nuinui.net
To: kenken@nuinui.net
Subject: asobo.
Hi, Kenken. I am Rudo.
// rudo
See RFC822 and RFC2822 for more details of definitions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Mailing List (Ml)
Mailing list (ML) is forwarding mechanism of email. The program for it is
called as ML driver. ML driver receives the email injected via MTA over the
network, copy and redistributes it to members subscribed to the ML.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Model Of An ML.
[ml]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 2. fml8 Overview
See Chapter 8 on the detail of difference between fml4 and fml8.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
fml8 Features
・ fml8 configuration file format is changed to new Postfix style format
configuration files (.cf files).
・ usage of CUI is almost same as fml4 (it is same as could as possible). You
can use CUI (makefml and fml command)
to create/remove an ML,
to add/remove/change an addresse of ML members,
to add/remove/change an address of remote administrators,
to see log and member list,
et.al.
Makefml and fml are same programs except for argument order.
See the Section called Difference Between fml4 And fml8: CUI in Chapter 8
on the CUI usage difference between fml4 and fml8.
・ GUI (CGI) interface. The functions are a subset of CUI ones.
to create/remove an ML,
to add/remove/change an address of ML members,
to add/remove/change an address of remote administrators,
to see log and member list,
et.al.
The configuration file editing is incomplete yet.
・ article delivery, header rewriting and several filters ( corresponding with
fml4's envelope filter and content filter ).
・ command mail for users.
to add/remove/change the address,
get article summary,
get old articles,
et.al.
・ command mail (admin command mail) for remote administratoin by mail.
to add/remove/change an addresse of ML members,
to add/remove/change an address of remote administrators,
to see log and member list,
et.al.
・ automatic analyzer of error messages.
・ IPv6 ready.
・ tiny thread track system.
・ built-in module for HTML converter of articles. support automatic
conversion by default.
fmlhtmlify and makefml supports html conversion functions.
・ main programs (fml/libexec): distribute command error
・ utilities: fmladdr fmlailas fmlconf fmldoc makefml fml
・ fml4 emulation: if you replace fml.pl of fml4 and fml.pl of fml8, fml8 runs
as fml4.
・ After 2004 summer, the queueing system is implemanted. Currently the
delivery system is queuing based. So, fml8 is a MTA in fact.
・ Abstracted IO layer to get member list in unified way from a file, /etc/
group, NIS, SQL.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Installation Overview
Important: Run GNU autoconf firstly, and "make install". It is defact
standard in the world of open sources. This procedure is different from
fml4 installation steps. It may confuse you if you are customered with fml4
But fml8 is more friendly for package systems of free unix like systems.
The main differece between fml4 and fml8 in installation is "run programs
as root", "use of configure", and editing of configuration files.
Suppose we create a new ML named elena ML (elena@fml.org). The brief flow of
installation is as follows:
1. Download fml8 source and extract it on the disk.
2. Install it by user root. Firstly, change user to "root" and create the user
"fml" and the group "fml". Secondly, run configure and "make install".
% su root
# groupadd fml
# useradd -m -g fml fml
# ./configure
# make install
By default, 4.4 BSD style sub-directories are created. The path is
configurable at configure options.
For example, main programs called from MTA such as distribute, command,
et.al. are installed into under /usr/local/libexec/fml/. Instead, utility
programs are installed to /usr/local/bin. These are wrappers to call real
programs at /usr/local/libexec/fml/.
Perl modules are installed into /usr/local/lib/fml/$fml_version/ and
message templates et.al. are installed into /usr/local/share/fml/
$fml_version/.
3. Change user to "fml" and create elena ML for test.
% su fml
% makefml newml elena
You can use "fml" instead of makefml. Both are same except for the argument
order.
% su fml
% fml elena newml
4. Set up MTA which runs fml8 programs.
5. Test.
6. Customize your ML.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│Please install by user root. It is different from fml4. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Create An ML
Create an ML by CUI (makefml). To create elena@fml.org ML (fml.org is the
default domain), run
% su fml
% makefml newml elena
. See the section Chapter 5 for more details.
In the virtual domain case, specify the whole address as an argument. For
example, to create an ML elena@nuinui.net, run the following command:
(At the first time)
% su root
% makefml newdomain nuinui.net /some/where/nuinui.net
% su fml
% makefml newml elena@nuinui.net
(After the 2nd time)
% su fml
% makefml newml elena@nuinui.net
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│See Chapter 43 for the virtual domain case detail. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Add A New User To ML
In the case of the default domain (fml.org)
% su fml
% makefml subscribe elena rudo@nuinui.net
in the case of virtual domain (nuinui.net), specify the whole adress of ML
name.
% su fml
% makefml subscribe elena@nuinui.net fukachan@sapporo.iij.ad.jp
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Remove The User
In the case of the default domain (fml.org),
% su fml
% makefml unsubscribe elena rudo@nuinui.net
in the case of virtual domain (nuinui.net), specify the whole adress of ML
name.
% su fml
% makefml unsubscribe elena@nuinui.net fukachan@sapporo.iij.ad.jp
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Customize
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│"makefml config" is a CUI to customize ML by menu form. BUT YET INCOMPLETE. │
│ │
│Edit configuration files anyway now. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Common Configurations On This Host
/usr/local/etc/fml/site_default_config.cf affects all ML on this host
irrespective of the default domain or virtual domains. [1]
The format of site_default_config.cf is same as config.cf described below.
See list of all variables for the configurable variation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
elena ML's Configuration
To customize elena ML, edit /var/spool/ml/elena/config.cf file. The format is a
little modified postfix style. It is different from both fml4's config.ph and
cf. Add hooks after =cut line if needed.
Add or modify the least variables. If unspecified, the default value is used.
The default value depends fml version and is defined at
/usr/local/etc/fml/defaults/${fml_version}/default_config.cf
The library path depends fml version. This technique ensures the easy upgrade/
downgrade procedure. This is a feature of fml8.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recipes
1. Why fml8 is the next official release of fml4 series ?
2. What difference between fml4 and fml8 ?
3. Which of current, stable and release should we download ?
1. Why fml8 is the next official release of fml4 series ?
1 bit shift of version with greate internal change is traditional :-)
fml8 is build from scratch by discarding fml4 source codes. fml8 is not a
upgraded fml4 software. So we use 1 bit shifted version number for fml8.
2. What difference between fml4 and fml8 ?
See Chapter 8 fore more details.
3. Which of current, stable and release should we download ?
fml8 does not provide such release line today. Please download the latest one
by comparing file name which has date in int.
See Chapter 3 on download.
II. How To Set Up ML
Topics driven in this part.
Table of Contents
3. Download fml8 Source Code.
4. fml8 Installation On Unix
5. Create ML On Unix
6. fml8 installation on Microsft 2000/NT
7. Convert fml4 Style ML To fml8 Style ML
8. Difference Between fml4 And fml8
9. Upgrade And Downgrade Of fml8
10. Configure CGI
11. Apache Configuration
12. Test
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 3. Download fml8 Source Code.
Download Via Ftp.
You can find fml8 source at ftp://ftp.fml.org/pub/fml8/ . You can get it by
ftp.
We build snapshot as a tarball in some interval. The file name contains date
such as YYYYMMDD form. Please get the latest one.
Also, you can find a daily snapshot at ftp://ftp.fml.org/pub/fml/
daily-snapshots/fml8/source/. This snapshot is auto-built. So it may not work
well.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Access To Cvs.
You can find fml8 under /fmlsrc in anoncvs.fml.org.
Anonymous cvs over ssh is allowed for anyone.
cvs -d anoncvs.fml.org:/cvsroot co fmlsrc
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Access To Cvs Via Cvsweb.
http://www.fml.org/cvsweb/fmlsrc/ provides the cvs acesss via web interface.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│It is useful to retrieve the specified version of the file. Instead, it is │
│not useful to get the whole source. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 4. fml8 Installation On Unix
Preparation Of Installation
Create the user "fml" and the group "fml" before running configure.
% su root
# groupadd fml
# useradd -g fml -m fml
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Run Configure
Run configure (GNU autoconf) and make.
% su root
# groupadd fml
# useradd -g fml -m fml
# ./configure
# make install
where configure replaces variables in scripts and .cf files.
After runnig configure, run "make install". The fml installer (perl scripts)
reads ./etc/fml/install.cf configure created and install fml8 to e.g. /usr/
local/.
You can specify the user name and fundamental directory names by configure
arguments. Customizable variables are follows: configure --help shows them.
variables default value example
--------------------------------------------------------
prefix /usr/local /usr/local
exec_prefix /usr/local
bindir ${exec_prefix}/bin /usr/local/bin
sbindir ${exec_prefix}/sbin /usr/local/sbin
libexecdir ${exec_prefix}/libexec /usr/local/libexec/fml
datadir ${prefix}/share /usr/local/share/fml
sysconfdir ${prefix}/etc /usr/local/etc/fml
sharedstatedir ${prefix}/com
localstatedir ${prefix}/var
libdir ${exec_prefix}/lib /usr/local/lib/fml
includedir ${prefix}/include
oldincludedir /usr/include
infodir ${prefix}/info
mandir ${prefix}/man
You can overwrite the following variables by configure arguments.
fmlconfdir $sysconfidr/fml /usr/local/etc/fml
mlspooldir /var/spool/ml /var/spool/ml
fml_owner fml fml
fml_group fml fml
default_domain (spaculated by configure) (spaculated by configure)
These options are shown by runnig
configure --help
.
--without-warning run perl as perl without -w
--with-fmlconfdir=DIR use DIR instead of SYSCONFDIR/fml
--with-mlspooldir=DIR use DIR instead of /var/spool/ml
--with-fml-owner=USER use USER instead of fml
--with-fml-group=GROUP use GROUP instead of fml
--with-default-domain=DOMAIN use DOMAIN as the ML domain
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Example: Running Configure
Example: On NetBSD, you should install 3rd party programs into /usr/pkg.
% ./configure --prefix=/usr/pkg
Example: On FreeBSD, use /usr/local.
% ./configure
If you use /etc/fml as configuration directory on e.g. Debian,
# ./configure --with-fmlconfdir=/etc/fml
loading cache ./config.cache
checking for perl... (cached) perl
checking for perl... (cached) /usr/local/bin/perl
checking whether optional useful commands are available or not
checking for cksum... (cached) /usr/bin/cksum
checking for md5... (cached) /usr/bin/md5
checking for ls... (cached) /bin/ls
checking for tar... (cached) /usr/bin/tar
checking for gzip... (cached) /usr/bin/gzip
checking for zcat... (cached) /usr/bin/zcat
checking for gunzip... (cached) /usr/bin/gunzip
checking for lha... (cached) /usr/pkg/bin/lha
checking for ish... no
checking for bzip2... (cached) /usr/bin/bzip2
checking for bunzip2... (cached) /usr/bin/bunzip2
checking for uuencode... (cached) /usr/bin/uuencode
checking for compress... (cached) /usr/bin/compress
checking for sendmail... (cached) /usr/sbin/sendmail
checking for newaliases... (cached) /usr/bin/newaliases
checking for postfix... (cached) /usr/sbin/postfix
checking for postalias... (cached) /usr/sbin/postalias
checking for postconf... (cached) /usr/sbin/postconf
checking for postmap... (cached) /usr/sbin/postmap
checking for nkf... (cached) /usr/pkg/bin/nkf
checking for kakasi... no
checking for namazu... no
checking for pgp... (cached) /usr/pkg/bin/pgp
checking for pgp5... no
checking for pgpe... no
checking for pgpk... no
checking for pgps... no
checking for pgpv... no
checking for gpg... no
checking for less... (cached) /usr/bin/less
checking for more... (cached) /usr/bin/more
checking for w3m... (cached) /usr/pkg/bin/w3m
updating cache ./config.cache
creating ./config.status
creating config.sh
creating fml/etc/main.cf
creating fml/etc/default_config.cf.ja
creating fml/etc/site_default_config.cf
creating fml/libexec/loader
creating fml/bin/fmlalias
creating fml/bin/fmlconf
creating fml/bin/fmldoc
creating fml/bin/fmlhtmlify
creating fml/bin/fmlsch
creating fml/bin/fmlthread
creating fml/bin/fmlspool
creating fml/bin/makefml
enabled perl -w
fml has been configure with the following options:
prefix: /usr/local
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
lib_dir: ${exec_prefix}/lib
libexec_dir: ${exec_prefix}/libexec
mandir: ${prefix}/man
datadir: ${prefix}/share
fml process owner: fml
fml process group: fml
fmlconfdir: /etc/fml
mlspooldir: /var/spool/ml
default domain: home.fml.org
Now you must run "make install".
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Appendix: Directory Roles
fml8 installs files under /usr/local by default.
Table 4-1. directory structure
┌─────┬───────────────────────────────┐
│directory │ description │
├─────┼───────────────────────────────┤
│/usr/local│Configuration files. It corresponds with fml4's /usr/local/fml│
│/etc/fml │/.fml and default_config.ph. /usr/local/etc/fml/main.cf has │
│ │fml version and library paths et.al. │
├─────┼───────────────────────────────┤
│/usr/local│ │
│/libexec/ │Executables (corresponding with fml4's /usr/local/fml ) │
│fml │ │
├─────┼───────────────────────────────┤
│/usr/local│Perl module location ( fml4's /usr/local/fml ) │
│/lib/fml │ │
├─────┼───────────────────────────────┤
│/usr/local│Message templates ( fml4's /usr/local/fml/messages/). Template│
│/share/fml│files are language dependendent. │
├─────┼───────────────────────────────┤
│ │The top directory for mailing lists of the default domain. │
│ │same as fml4. caution: the owner of /var/spool/ml can be │
│ │specified by configure arguments. Prepare different directory │
│/var/spool│for each domain. For example, /var/spool/ml for fml.org │
│/ml │(default domain), whereas /var/spool/nuinui.net for nuinui.net│
│ │domain (virtual domain). See ml_home_prefix_maps for the │
│ │relation between domain and directory. Also see Chapter 43 │
│ │for the virtual domain detail. │
└─────┴───────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fml Installation: make install
change user to "root" and run "make install" after configure runs.
% su root
# make install
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│You need not to run configure by the user root. But, you need to run "make │
│install" by root. So, it may be better to run both by root. │
│ │
│% su root │
│# ./configure │
│# make install │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Edit main.cf
Please edit /usr/local/etc/fml/main.cf if needed, though already configure
rewrites main.cf to fit your environment.
The file main.cf contains the most fundamental configuration variables to
control fml8 basic features: fml version control, library path, virtual domain
et.al.
Instead, the detail of each ML configuration depends on config.cf file of each
ML such as /var/spool/ml/elena/config.cf for elena ML. "config.cf" can override
all configuration variables: header customizations, filter rules, member file
locations et.al.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Example: /usr/local/etc/fml/main.cf
/usr/local/etc/fml/main.cf is not ML specific. This is meta file to define
fundamental variables e.g. fml version, directory path et.al. fml8 loader reads
them.
The format of main.cf is same as other .cf files: [2]
variable = value
style.
#
# $FML: main.cf.sgml,v 1.2 2005/09/25 04:27:18 fukachan Exp $
#
# fml version
# This is important
# Example: fml 8.0
# fml-current YYYYMMDD
# fml-devel YYYYMMDD
fml_version = current-20020701
fml_owner = fml
fml_group = fml
###
### DIRECTORIES
###
# Example: /usr/local
prefix = /usr/local
exec_prefix = ${prefix}
# $config_dir holds the global main configuration and
# several version-dependent default configurations
# Example: /usr/local/etc/fml
config_dir = /usr/local/etc/fml
# Example: /usr/local/etc/fml/defaults/$fml_version
default_config_dir = $config_dir/defaults/$fml_version
# defined for convenience, for example, we need this variable
# at include, include-ctl, which needs expansion of ../libexec/fml/fml.pl
# Example: /usr/local/libexec/fml
executable_prefix = ${exec_prefix}/libexec/fml
# Example: /usr/local/libexec/fml/$fml_version
libexec_dir = ${exec_prefix}/libexec/fml/$fml_version
# Example: /usr/local/lib/fml/$fml_version
lib_dir = ${exec_prefix}/lib/fml/$fml_version
# Example: /usr/local/share/fml/$fml_version
share_dir = ${prefix}/share/fml/$fml_version
# site local library location
# which is prepared but not used by fml itself
local_lib_dir = ${exec_prefix}/lib/fml/site_local
# ml's home directories
# $ml_home_dir (e.g. /var/spool/ml/elena ) is taken from loader's @ARGV.
# This is compatible with fml 4.0.
# Example: /var/spool/ml
default_ml_home_prefix = /var/spool/ml
###
### CONFIGURATION FILES AND DEFAULT PARAMETERS
###
# default domain
default_domain = fml.org
# version dependent default_config.cf location
# whic holds
# Example: /usr/local/etc/fml/defaults/8.0/default_config.cf
default_config_cf = $default_config_dir/default_config.cf
# domain specific configurations
# Example: /usr/local/etc/fml/domains/fml.org/default_config.cf
domain_default_config = $config_dir/domains/$default_domain/config.cf
# virtual format: domain directory
# for example,
# fml.org /var/spool/ml/fml.org
# nuinui.net /var/spool/ml/nuinui.net
virtual_maps = $config_dir/virtual
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Edit site_default_config.cf (optional)
/usr/local/etc/fml/site_default_config.cf is the configuration file common over
all mailing list on this host (site). [3]
site_default_config.cf overrides default_config.cf file. Each ML configuration
file (/var/spool/ml/elena/config.cf for elena ML) overrides
site_default_config.cf.
By default, some example configurations are added to this file.
#
# site default_config.cf EXAMPLE
#
# fml-devel loads .cf files in this order for elena ML.
# 1. ${prefix}/etc/fml/defaults/$VERSION/default_config.cf
# 2. ${prefix}/etc/fml/site_default_config.cf
# 3. ${prefix}/etc/fml/domains/$DOMAIN/default_config.cf
# 4. /tmp/dir/elena/config.cf
#
# This file overrides the default "default_config.cf" configurations
# in the following way.
#
# We want to disable the subject tag in articles by default.
article_header_rewrite_rules -= rewrite_article_subject_tag
# mime based comonent filter
use_mime_component_filter = yes
# [site specific options]
# Example:
# key = value
# key += value
# key -= value
=cut
#
# you can write hooks here after.
# Example:
# $distribute_run_start_hook = q{ ... };
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Filter
All filter are enabled by default.
"mime component filter" is important. By default mime component filter is
enabled, Only text/plain article can be passed through fml8.
To disable mime component filter on all ML's, set
use_mime_component_filter = no
at site_default_config.cf.
To customize mime component filter, set
use_mime_component_filter = yes
at site_default_config.cf, and edit rules in /usr/local/etc/fml/
mime_component_filter file.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Virtual Domain
You do not need edit /usr/local/etc/fml/main.cf but you need to edit
$ml_home_prefix_maps (/usr/local/etc/fml/ml_home_prefix file by default). You
can use "makefml newdomain" command to control $ml_home_prefix_maps. See "ML
creation" for newdomain command.
Suppose that fml.org is the default domain. In this case, /var/spool/ml/$ml is
used for $ml ML of fml.org. /var/spool/ml is used only for the domain fml.org.
If you want to set up elena@nuinui.net, you need to specify other directory.
Specify the relation between domain and directory, edit /usr/local/etc/fml/
ml_home_prefix and set the following:
nuinui.net /var/spool/nuinui.net
Please use "makefml newdomain" command to change /usr/local/etc/fml/
ml_home_prefix file. It is recommended that you do not edit this file directly.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│site_default_config.cf is applied to all domains. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MTA Configuration (postfix)
Please set up postfix properly before "makefml newml" can set up a ml.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Default Domain (Example: fml.org)
Set up /etc/postfix/main.cf like this:
[/etc/postfix/main.cf]
allow_mail_to_commands = alias,forward,include
alias_maps = hash:/etc/mail/aliases
hash:/var/spool/ml/etc/mail/aliases
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│Please check that $mydestination contains the default domain (may be │
│$mydomain). │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Virtual Domain (Example: nuinui.net)
You need to edit /etc/postfix/main.cf to set up $virtual_maps.
[/etc/postfix/main.cf]
allow_mail_to_commands = alias,forward,include
alias_maps = hash:/etc/mail/aliases
hash:/var/spool/ml/etc/mail/aliases
hash:/var/spool/nuinui.net/etc/mail/aliases
virtual_maps = hash:/var/spool/nuinui.net/etc/postfix/virtual
[/usr/local/etc/fml/ml_home_prefix]
nuinui.net /var/spool/nuinui.net
Both alias files and /var/spool/nuinui.net/etc/postfix/virtual are updated by
makefml automatically where we suppose ml_home_prefix_maps defines
nuinui.net /var/spool/nuinui.net
relation.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│Postfix variable $mydestination should contain the default domain (may be │
│$mydomain) but not virtual domain. Pay attention that we assume we use │
│postfix style virtual domain. Please see postfix document for more details. │
│ │
│When you begin to use a new virtual domain, you need to update both │
│$alias_maps and $virtual_maps in /etc/postfix/main.cf. Also, you have to │
│update /usr/local/etc/fml/ml_home_prefix by running "makefml newdomain". │
│ │
│Recent postfix has $virtual_alias_maps and $virtual_maps variables. But │
│$virtual_alias_maps = $virtual_maps by default. You can use either. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MTA configuration (qmail)
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│fml8 assumes that qmail configurations is always based on /var/qmail/control│
│/virtualdomains regardless of the default domain or not. │
└──────────────────────────────────────┘
The template of /var/qmail/control/virtualdomains is created at /var/spool/ml/
etc/qmail by makefml.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The default domain (example: fml.org)
It is good to prepare "ml.fml.org" domain for ml specific. At
/var/qmail/control/virtualdomains
specify the following rule
ml.fml.org:fml-fml.org
. "makefml newml" can set up ~/.qmail-* automatically.
See the section on "makefml newml and qmail" on how "makefml newml" creates ~
/.qmail-* files.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
virtual domain (example: nuinui.net)
For "nuinui.net" virtual domain, not the default one, specify
nuinui.net:fml-nuinui.net
at /var/qmail/control/virtualdomains. It is same as in default domain case.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
recipes
1. Can we use other user as fml process ?
2. When should we change use to fml in installation ?
3. Can we install fml8 without document.
4. Can we specify per path in installation ?
5. Can we use jperl ?
6. Can we overwrite elena ML ?
7. Can we edit alias files under /var/spool/ml/etc ?
8. Can we use fml8 on Windows 2000/NT4 but MTA on Unix server ?
9. Can we initialize ML ?
1. Can we use other user as fml process ?
Run configure with --with-fml-owner option.
configure --with-fml-owner=$USER
Do not use your own account but use fml specific user for all fml processes.
Please use procmail et.al. if fml processes are kicked off by .forward not
aliases. See /var/spool/ml/etc/procmail/procmailrc for more details on procmail
usage.
2. When should we change use to fml in installation ?
In installation.
You can download source code and run configure by not user root (e.g. user
fml), but run "make install" by user root. It may be better to run by user too
always.
3. Can we install fml8 without document.
Yes by default. fml8 does not install document. If you need documentation,
please install ./SOURCE/Documentation/ into /usr/local/share/doc/fml8/
$FML_VERSION/.
4. Can we specify per path in installation ?
No directly. Run configure with proper environment variable PATH.
% env PATH=/some/where/:$PATH sh configure
5. Can we use jperl ?
Unknown.
6. Can we overwrite elena ML ?
Run "makefml newml" with --force option.
% makefml --force newml elena
7. Can we edit alias files under /var/spool/ml/etc ?
Yes but please control them by yourself. These files are controlled by makefml/
fml scripts. These scripts edit them. If the ML is removed, the corresponding
entries are removed and cannot be back.
8. Can we use fml8 on Windows 2000/NT4 but MTA on Unix server ?
Caution: not tested.
It can be. Run fetchfml on Windows 2000 or NT4 and run MTA on Unix.
9. Can we initialize ML ?
It is easy to run rmml once and newml again.
% makefml rmml elena
% makefml newml elena
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 5. Create ML On Unix
Run "makefml newml" To Create An ML (In The Case Of Default Domain)
┌──────────────────────────────────────┐
│ Caution │
├──────────────────────────────────────┤
│The usage of fml8 makefml is same as fml4 in the case of default domain. But│
│differs in the virtual domain case. See the Section called Run "makefml │
│newml" To Create An ML (In The Case Of Virtual Domain) for the virtual │
│domain case. │
└──────────────────────────────────────┘
To create an ML, use "makefml" command (CUI) in the same way as fml4.
% su fml
% makefml newml elena
... snip ...
In the case of non default domain (virtual domain), run "makefml newdomain"
command before running "makefml newml".
% su root
# makefml newdomain fml.org /var/spool/virtual/fml.org
# exit
% su fml
% makefml newml elena
... snip ...
"makefml newml" processes the following steps.
・ Create files such as
config.cf
include
include-ctl
at /var/spool/ml/elena. The domain name et.al. in these files is replaced
to proper value.
・ Add elena ML entry into /var/spool/ml/etc/mail/aliases. Run postalias to
rebuild /var/spool/ml/etc/mail/aliases.db.
・ Create ~fml/.qmail-* files for qmail.
・ Update procmailrc as a sample.
・ Prepare the directory
~fml/public_html/fml/mlarchive/$domain/$ml/
for html archive. For example, for elena@fml.org
~fml/public_html/fml/mlarchive/fml.org/elena/
is creatd. HTML archive of ML articles is created by default.
・ Prepare CGI (GUI). Set up
~fml/public_html/cgi-bin/fml/$domain/admin/config.cgi
for the master cgi, instead cgi to control one ML $ml@$domain is set up at
~fml/public_html/cgi-bin/fml/$domain/ml-admin/$ml/config.cgi
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Run "makefml newml" To Create An ML (In The Case Of Virtual Domain)
┌──────────────────────────────────────┐
│ Caution │
├──────────────────────────────────────┤
│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. │
└──────────────────────────────────────┘
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
At the first time to use a virtual domain, run "makefml newdomain" before
"makefml newml".
% su root
# makefml newdomain nuinui.net /var/spool/virtual/nuinui.net
# exit
% su fml
% makefml newml elena@nuinui.net
After the second time, just use "makefml newml".
% su fml
% makefml newml elena@nuinui.net
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.
nuinui.net /var/spool/virtual/nuinui.net
To remove this line, use "makefml rmdomain".
The usage of "makefml newml" command is same as in the case of default domain.
"makefml newml" creates an example of virtual domain configurations for several
MTA's such as
/var/spool/ml/etc/sendmail/virtusertable
/var/spool/ml/etc/postfix/virtual
. No example for qmail (not needed). No example for procmail since .procmailrc
contains domain.
See the chapter of virtual domain for more details.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MTA Configuration (postfix)
Important: If $alias_maps of Postfix is properly set up, "makefml newml"
automatically prepares fml and postfix configuration for the new ML.
See the Section called MTA Configuration (postfix) in Chapter 4 for the
detail of postfix configuration.
"makefml" does not update system aliases (e.g. /etc/mail/aliases), but updates
only alias file $ml_home_prefix/etc/mail/aliases file, which is used only for
fml. "makefml" rebuilds $ml_home_prefix/etc/mail/aliases.db automatically, too.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NOTE: Format Of /var/spool/ml/etc/mail/aliases
$ml_home_prefix/etc/mail/aliases has the following entry for elena@home.fml.org
ML.
### ###
# address for post
elena: :include:/var/spool/ml/elena/include
owner-elena: fukachan
# address for command
elena-ctl: :include:/var/spool/ml/elena/include-ctl
owner-elena-ctl: fukachan
# maintainer
elena-request: elena-admin
elena-admin: fukachan, elena-error
# error analyzer
elena-error: :include:/var/spool/ml/elena/include-error
owner-elena-error: fukachan
### ###
In the case of virtual domain, $ml_home_prefix varies with $virtual_maps.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MTA Configuration (qmail)
"makefml newml" creates the following files for qmail:
~fml/.qmail-fml:org-elena
~fml/.qmail-fml:org-elena-admin
~fml/.qmail-fml:org-elena-ctl
~fml/.qmail-fml:org-elena-default
~fml/.qmail-fml:org-elena-request
Hence, if /var/qmail/control/virtualdomains contains the following definition
fml.org:fml-fml.org
you have only to run "makefml newml" to create an ML in the case of qmail.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│This configuration assumuss ML's uses the whole one domain only for mailing │
│list. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Virtual Domain
The logic is same as above. So you need to edit /var/qmail/control/
virtualdomains to make an ML effective automatically when you runs "makefml
newml". This edit needs root priviledge. Please contact the administrator on
it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Customize config.cf
In running "makefml newml", makefml sets up configuration files such as
config.cf, include files for sendmail and postfix and ~fml/.qmail-* files.
% su fml
% makefml newml elena
... snip ...
% ls /var/spool/ml/elena
config.cf include include-ctl include-error
... snip ...
To customize one ML configuraiton, edit config.cf.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│menu tool to edit config.cf is incomplete. │
└──────────────────────────────────────┘
config.cf contains little definition. For example, /var/spool/ml/elena/include
file follows:
"| /usr/local/libexec/fml/distribute elena@fml.org"
/var/spool/ml/elena/include-ctl file follows:
"| /usr/local/libexec/fml/commande elena@fml.org"
/usr/local/libexec/fml/PROGMAR resolves ml_name and ml_domain from the
arguments such as elena@fml.org. That is, elena@fml.org in this argument
determines values of $ml_domain and $ml_name. It is enough that ml_name and
ml_domain in config.cf is a comment.
The content of include, include-ctl and aliases are same as fml4 except for the
path.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recipes
1. Specify administrator's mail address in alias file when "newml" command
runs.
2. Not create a configuration file for a specific MTA not used.
1. Specify administrator's mail address in alias file when "newml" command
runs.
CUI (makefml/fml) creats an alias in "newml".
${ml_name}-admin: ADDRESS
where ADDRESS is defined by $newml_command_ml_admin_default_address. By
default, $newml_command_ml_admin_default_address == $fml_owner defined in /usr/
local/etc/fml/main.cf file. To change the value, specify
$newml_command_ml_admin_default_address in site_default_config.cf.
$newml_command_ml_admin_default_address = YOUR_ADDRESS
You can use $ml_name here.
$newml_command_ml_admin_default_address = $ml_name-owner@$ml_domain
2. Not create a configuration file for a specific MTA not used.
$newml_command_mta_config_list defines list of MTA. "makefml newml" command
creates examples of the specified MTA's. Remove the specific MTA from the list
to disable example creation.
For example, you do not need "qmail" configuration example
newml_command_mta_config_list -= qmail
fml8 does not generate ~/.qmail-* files.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 6. fml8 installation on Microsft 2000/NT
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│not yet implemented. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 7. Convert fml4 Style ML To fml8 Style ML
2004/03: We have implemented a converter which converts ML HOME DIRECTORY
($DIR) such as /var/spool/ml/elena ($ml_home_dir in fml8) from fml4 style to
fml8 style. It is incomplete but is being developed.
2004/11: You can replace fml.pl of fml4 with fml.pl of fml8. now. It means that
fml8 directly emulates fml4. It enables easy upgrade from fml4 to fml8.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overview: fml4 To fml8 (1)
It is a little wrong that fml8 works if fml8 overwrites fml4 programs.
Currently fml8 can work but it needs automatic conversion in the background.
Hence, fml8 modifies fml4 to emulate fml4.
Firstly there is a problem. You want to upgrade all ML's at the same time from
fml4 to fml8? It is better to upgrade from one to one ? When something fails,
you want to downgrade your system if could.
We want to support both types. So it is available that some ML's are fml8,
other ML's are fml4 in one domain simultaneously. Downgrading if needed are
supported.
One example of upgrade operation follows:
1. install fml8
2. (in the case of Postfix) add fml8 aliases to postfix's alias_maps.
Example:
alias_maps = hash:/etc/mail/aliases
hash:/var/spool/ml/etc/aliases (fml4)
hash:/var/spool/ml/etc/mail/aliases (fml8)
3. convert fml4 ML to fml8 one.
fml $ml mergeml fml4's$DIR
for example,
fml elena mergeml /var/spool/ml/elena
Apply 3. for ML's which would be converted to fml8.
You can use "makefml mergeml" command to convert aliases, include files, fml4
configuration files and member lists from fml4 to fml8.
It is not easy to convert difficult fml4's config.ph file. Now we can convert
simple config.ph to fml8 config.cf style file automatically. We suppose this
simple config.ph is generated by fml4's "makefml config" command.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overview: Convert fml4 To fml8 (2)
2004/11: you can replace fml4's fml.pl with fml8's fml.pl.
Configure like this.
[1. Install fml8]
% su fml
% sh configure
% su root
# make install
[2. Emulate fml4]
# mv /usr/local/fml/fml.pl /usr/local/fml/fml.pl.orig
# ln -s /usr/local/libexec/fml/fml.pl /usr/local/fml/fml.pl
# ln -s /usr/local/libexec/fml/msend.pl /usr/local/fml/msend.pl
# ln -s /usr/local/libexec/fml/mead.pl /usr/local/fml/libexec/mead.pl
Precisely fml8 can not read fml4 configuration file. If fml8's fml.pl cannot
find config.cf, it tries to convert config.ph in ML's home directory to fml8
config.cf, read it and starts to run.
The conversion is incomplete but fml8 can convert simple configurations
manipulated by fml4 CUI or GUI.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overview: Difference Between fml4 and fml8
There are several fml8 variables and functions not related with fml4 since fml8
is re-designed and re-coded from scratch.
Also not one to one even if the relation found.
Let's see a few examples below.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Anyone Can Post
Users registered as members can post ML by default. This default behaviour is
common between fml4 and fml8. To set "anyone can post", in the case of fml4,
$PERMIT_POST_FROM = "anyone";
in the case of fml8,
article_post_restrictions = reject_system_special_accounts
permit_anyone
reject
.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Subject Tag
No subject tag defined by default. This is common between fml4 and fml8 To set
the tag such as '[ML_NAME:00100]', in the case of fml4,
$SUBJECT_TAG_TYPE = '[:]';
This corresponds to the following fml8 configuration:
article_header_rewrite_rules = rewrite_article_subject_tag
article_subject_tag = [$ml_name:%05d]
fml8 configuration concepts are more orthogonal.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Disable Specific Command In Command Mail
Commands such as "members" are prohibited in fml8 by default. fml4 needs the
following configurations to disable dangerous commands:
&DENY_PROCEDURE('member');
&DENY_PROCEDURE('active');
&DENY_PROCEDURE('members');
&DENY_PROCEDURE('actives');
&DENY_PROCEDURE('status');
&DENY_PROCEDURE('stat');
Old fml4 use no filter by default but fml8 uses filter by default.
fml8 applies confirmation for subscribe, chaddr, unsubscribe commands by
default. fml4 not. Currently fml8 always applies confirmation, which can not be
disabled by configuration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Discussion
"makefml mergeml" command processes the following steps automatically.
To clarify details more, explain conversion of aliases and include files below.
Our purpose is to run fml8 anyway. If fml8 runs, converter of config.ph runs
too. So, we need MTA runs fml4 and fml4 runs fml8.
Explain more details. Consider ML driver internal section.
For example, when you use Postfix, Postfix reads aliases and recognizes it
needs to read include file. By reading include file, Postfix knows how to call
fml8 process. Finally, postfix runs /usr/local/libexec/fml/distribute command.
Executed distribute command reads config.cf and knows the location of member
lists and processes et.al.
That is, when fml8 process starts, the following two phases
aliases (MTA configuration)
include
ends.
It is mandatory that no duplication in aliases files. For example, if /etc/
postfix/main.cf contains the following configuration:
alias_maps = hash:/etc/mail/aliases
hash:/var/spool/ml/etc/aliases (fml4)
hash:/var/spool/ml/etc/mail/aliases (fml8)
aliases of fml4 and fml8 should not have duplication.
In othe words, in the case of fml4 process,
MTA -> fml4's aliases -> fml4's include -> fml4 (fml.pl) runs
in the case of fml8 process,
MTA -> fml8's aliases -> fml8's include -> fml8 runs
So we need the following condition:
remove the ml from fml4's aliases file.
add the ml to fml8's aliases file.
If no duplication in aliases, both fml4 and fml8 runs on the same host.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 8. Difference Between fml4 And fml8
In this chapter, we describe the difference beetween fml4 and fml8
Intuitively fml4 vs fml8 is equal to sendmail vs Postfix. It is good image.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Difference Between fml4 And fml8: License.
Roughly speaking, fml8 license is composed of Artistic, BSD or GPL. A part of
fml8 is either of them.
In the case of fml4, almost all codes are written by fml project. The license
of such codes is GPL. jcode.pl and some perl modules are exceptions.
In the case of fml8, the source tree has sub tree which is divided according to
the license. For example, the license of fml/ sub tree is Artictic, cpan/ is
Artistic or GPL, gnu/ is GPL and img/ is BSD. See the license files under them
on the detail.
It is easy to remove some licensed files since the sub-tree is license based.
fml8 installs all modules of the tree into the proper path, so installed
modules are hybrid of licenses. You need to clarify the license before
installation.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Difference Between fml4 And fml8: Command Mail And Error Messages.
fml8 selects language of the return mail for command mail and error messages by
Accept-Language of the incoming message and other information. See Chapter 33
for more details.
In sending back files or messages, fml8 uses MIME/Multipart. tar.gz and zip
formats are not supported..
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Difference Between fml4 And fml8: CUI
There are two CUI: makefml and fml. The syntax of the two is different.
makefml COMMAND ML OPTIONS
fml ML COMMAND OPTIONS
The only difference is the order of command argument.
fml4 command shows processing information as could as possible. Instead fml8
command runs as could as silently since it is proper for automatic process. [4]
This behaviour is UNIX style.
Table 8-1. Difference between fml4 and fml8: CUI
┌───────┬────────────┬────────────────┐
│ Content │ fml4 │ fml8 │
├───────┼────────────┼────────────────┤
│ │"makefml help ML". │ │
│ │"makefml info ML" is │ │
│show help │same as "makefml help │not implemented. │
│ │ML". If the environment │ │
│ │variable PAGER, use it │ │
│ │as pager. │ │
├───────┼────────────┼────────────────┤
│ │run "make install" at │run "configure" and "make │
│installation │the source top │install" at the source top │
│of fml │directory. In fact "make│directory. In fact "make │
│ │install" executes │install" executes install.pl │
│ │"makefml install". │script. │
├───────┼────────────┼────────────────┤
│ │interactive by default. │not interactive. You can use │
│Behaviour of │You can use interactive │configure for most important │
│install script│menu for most important │options. │
│ │options. │ │
├───────┼────────────┼────────────────┤
│create ML │"makefml newml ML" or │makefml newml ML │
│ │"makefml new ML" │ │
├───────┼────────────┼────────────────┤
│templates of │ │ │
│alias files │only for sendmail (also │all for postfix, sendmail, │
│"makefml │used as postfix for │qmail, procmail MTA's. │
│newml" │compatibility). │ │
│generates. │ │ │
├───────┼────────────┼────────────────┤
│alias file │ │ │
│path "makefml │/var/spool/ml/etc/ │/var/spool/ml/etc/mail/aliases │
│newml" │aliases │ │
│generates. │ │ │
├───────┼────────────┼────────────────┤
│how to │ │ │
│generate qmail│makefml qmail-setup ML │"makefml newml" generates it. │
│configuration │ │ │
│files. │ │ │
├───────┼────────────┼────────────────┤
│re-generate │makefml │not implemented. │
│aliaes. │recollect-aliases ML │ │
├───────┼────────────┼────────────────┤
│remove ML │makefml destructml ML │makefml rmml ML │
├───────┼────────────┼────────────────┤
│how to set up │run "makefml mead ML" │ │
│error │and set up aliases │enabled by default. │
│analyzer. │properly. │ │
├───────┼────────────┼────────────────┤
│test of fml │makefml test ML │not implemented │
├───────┼────────────┼────────────────┤
│set up │makefml fmlserv ML │ │
│LISTSERV style│listserv majordomo is │not implemented │
│server. │same as. │ │
├───────┼────────────┼────────────────┤
│ │"makefml add ML │"makefml subscribe ML ADDRESS". │
│ │ADDRESS". "makefml │Other 4 commands (add subscribe │
│subscribe (add│adduser ML ADDRESS" is │adduser useradd) are same as │
│addess to │same. the changes is │subscribe. No message is shown │
│member and │shown after the │unless error occurs. This │
│recipient │operation. This │operation is applied to │
│list) │operation is applied to │$primary_recipient_map and │
│ │both actives and members│$primary_member_map (recipients │
│ │files. │and members files actually). │
├───────┼────────────┼────────────────┤
│ │ │"makefml unsubscribe ML │
│ │"makefml bye ML │ADDRESS". Other 7 commands ( bye│
│ │ADDRESS". byeuser is │unsubscribe deluser remove │
│remove address│same. the changes is │resign signoff userdel ) are │
│from recipient│shown after the │same as unsubscribe. No message │
│and member │operation. This │is shown unless error occurs. │
│list. │operation is applied to │This operation is applied to │
│ │both actives and members│$primary_recipient_map and │
│ │files. │$primary_member_map (recipients │
│ │ │and members files actually). │
├───────┼────────────┼────────────────┤
│ │"makefml chaddr ML │"makefml chaddr ML OLD_ADDRESS │
│ │OLD_ADDRESS │NEW_ADDRESS". No message is │
│change address│NEW_ADDRESS". the │shown unless error occurs. This │
│(in recipient │changes is shown after │operation is applied to │
│and member │the operation. This │$primary_recipient_map and │
│list) │operation is applied to │$primary_member_map (recipients │
│ │both actives and members│and members files actually). │
│ │files. │ │
├───────┼────────────┼────────────────┤
│ │"makefml addactives ML │ │
│ │ADDRESS". Commands │"makefml addactives ML ADDRESS │
│add address to│(addactive add2active │". No message is shown unless │
│only recipient│add2actives) are same. │error occurs. This operation is │
│list │the changes is shown │applied to │
│ │after the operation. │$primary_recipient_map │
│ │This operation is │(recipients file actually). │
│ │applied to actives file.│ │
├───────┼────────────┼────────────────┤
│ │"makefml addmembers ML │ │
│ │ADDRESS". Commands │"makefml addmembers ML ADDRESS".│
│add address to│(addmember add2member │No message is shown unless error│
│only member │add2members) are same. │occurs. This operation is │
│list. │the changes is shown │applied to $primary_member_map │
│ │after the operation. │(members file actually). │
│ │This operation is │ │
│ │applied to members file.│ │
├───────┼────────────┼────────────────┤
│ │"makefml off ML │"makefml off ML ADDRESS". No │
│ │ADDRESS". skip is same │message is shown unless error │
│disable real │as off. the changes is │occurs. This operation is │
│time delivery │shown after the │applied to │
│ │operation. This │$primary_recipient_map │
│ │operation is applied to │(recipients file actually). │
│ │actives file. │ │
├───────┼────────────┼────────────────┤
│ │ │"makefml digestoff ML ADDRESS" │
│ │"makefml on ML ADDRESS".│or "makefml digest ML ADDRESS │
│enable real │the changes is shown │off". No message is shown unless│
│time delivery.│after the operation. │error occurs. This operation is │
│ │This operation is │applied to │
│ │applied to actives file.│$primary_recipient_map │
│ │ │(recipients file actually). │
├───────┼────────────┼────────────────┤
│ │"makefml matome ML │"makefml digeston ML ADDRESS" or│
│ │ADDRESS". digest is │"makefml digest ML ADDRESS on". │
│change real │same. the changes is │No message is shown unless error│
│time to digest│shown after the │occurs. This operation is │
│delivery. │operation. This │applied to │
│ │operation is applied to │$primary_recipient_map │
│ │actives file. │(recipients file actually). │
├───────┼────────────┼────────────────┤
│ │"makefml addadmin ML │"makefml addadmin ML ADDRESS". │
│add a remote │ADDRESS". the changes is│No message is shown unless error│
│administrator │shown after the │occurs. This operation is │
│address. │operation. This │applied to recipients-admin and │
│ │operation is applied to │members-admin. │
│ │members-admin file. │ │
├───────┼────────────┼────────────────┤
│ │"makefml byeadmin ML │"makefml byeadmin ML ADDRESS". │
│remove a │ADDRESS". the changes is│No message is shown unless error│
│remote │shown after the │occurs. This operation is │
│administrator │operation. This │applied to recipients-admin and │
│address. │operation is applied to │members-admin. │
│ │members-admin file. │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│password of │"makefml passwd ML". │"makefml passwd ML" (incomplete │
│remote │interactive. │?) │
│administrator │ │ │
│(1). │ │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│password of │"makefml passwd ML │"makefml passwd ML ADDRESS". │
│remote │ADDRESS" interactive. │interactive. │
│administrator │ │ │
│(2). │ │ │
├───────┼────────────┼────────────────┤
│set up │"makefml passwd ML │"makefml passwd ML ADDRESS │
│password of │ADDRESS PASSWORD". the │PASSWORD". No message is shown │
│remote │changes is shown after │unless error occurs. This │
│administrator │the operation. This │operation is applied to etc/ │
│(3). │operation is applied to │passwd-admin file. │
│ │etc/passwd file. │ │
├───────┼────────────┼────────────────┤
│menu style │ │ │
│configuration │makefml config ML │incomplete. │
│tool. │ │ │
├───────┼────────────┼────────────────┤
│edit │"makefml edit ML". Ask │"makefml edit ML". Not ask the │
│configuration │the editor to use before│editor to use before running. │
│file. │running. "vi" by │use environment variable EDITOR │
│ │default. │if specified. "vi" by default. │
├───────┼────────────┼────────────────┤
│fml4 specific │"makefml update-config │ │
│configuration │ML". Commands (update │ │
│file │config-update │no corresponding idea (one │
│conversion │update-config.ph) are │configuration file). │
│(generate cf │same. the operations is │ │
│to config.ph) │shown. │ │
├───────┼────────────┼────────────────┤
│edit cf │makefml config-template │ │
│template by │ML │not implemented │
│menu. │ │ │
├───────┼────────────┼────────────────┤
│edit template │makefml edit-template │ │
│files "makefml│FILE list up available │not implemented │
│newml" uses │file list unless FILE │ │
│ │specified. │ │
├───────┼────────────┼────────────────┤
│re-generate │ │ │
│files e.g. │makefml │ │
│help at the ml│create-doc-template ML │no corresponding idea. │
│home │ │ │
│directory. │ │ │
├───────┼────────────┼────────────────┤
│convert SRC │ │ │
│file to DST │ │ │
│file with │makefml conv ML SRC DST │not implemented │
│variable │ │ │
│conversion. │ │ │
├───────┼────────────┼────────────────┤
│see log (the │"makefml log ML [OPTION]│"makefml log ML". options are │
│last 100 lines│". "makefml tail ML" is │not implemented. │
│shown). │same. │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│admin.cgi │ │ │
│(scripts and │"makefml admin.cgi ML". │incomplete. │
│apache │interactive. │ │
│configuration │ │ │
│helper). │ │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│ml-admin.cgi │"makefml ml-admin.cgi │ │
│(scripts and │ML". "makefml │incomplete. │
│apache │mladmin.cgi ML" is same.│ │
│configuration │interactive. │ │
│helper). │ │ │
├───────┼────────────┼────────────────┤
│set up │makefml │ │
│.htpasswd for │html_cgiadmin_passwd ML │not implemented │
│admin.cgi. │ │ │
├───────┼────────────┼────────────────┤
│html_config │ │ │
│(makefml │makefml html_config ML │not implemented │
│internal use │html_config_set is same.│ │
│command) │ │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│.htpasswd for │ │ │
│ml-admin.cgi │ │ │
│and the │makefml html_passwd ML │not implemented │
│password of │ │ │
│admin command │ │ │
│mail. │ │ │
├───────┼────────────┼────────────────┤
│set up │ │ │
│.htpasswd for │makefml htpasswd ML │not implemented │
│ml-admin.cgi. │ │ │
├───────┼────────────┼────────────────┤
│pgp command │makefml pgp ML │fmlpgp │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│pgp2 command │makefml pgp2 ML │fmppgp2 │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│pgpe command │makefml pgpe ML │fmlpgpe │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│pgpk command │makefml pgpk ML │fmlpgk │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│pgps command │makefml pgps ML │fmlpgps │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│pgpv command │makefml pgpv ML │fmlpgpv │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│gpg command │makefml gpg ML │fmlgpg │
│wrapper │ │ │
├───────┼────────────┼────────────────┤
│admin-auth │ │ │
│(PGP, GPG KEY │makefml admin-auth ML │fmlpgp* command │
│RING │ │--admin-command-mail-auth │
│operation) │ │ │
├───────┼────────────┼────────────────┤
│admin-encrypt │ │ │
│(PGP, GPG KEY │makefml admin-encrypt ML│not implemented │
│RING │ │ │
│operation) │ │ │
├───────┼────────────┼────────────────┤
│dist-auth │ │ │
│(PGP, GPG KEY │makefml dist-auth ML │fmlpgp* command │
│RING │ │--article-post-auth │
│operation) │ │ │
├───────┼────────────┼────────────────┤
│dist-encrypt │ │ │
│(PGP, GPG KEY │makefml dist-encrypt ML │fmlpgp* command │
│RING │ │--article-post-encrypt │
│operation) │ │ │
├───────┼────────────┼────────────────┤
│set up popfml │ │ │
│(emulate MTA │makefml popfml │fetchfml │
│and ML via │ │ │
│POP). │ │ │
├───────┼────────────┼────────────────┤
│set up │ │write password in configuration │
│password for │makefml pop_passwd │file config.cf. │
│POP. │ │ │
├───────┼────────────┼────────────────┤
│ │ │not implemented (no │
│lock ML. │makefml lock ML │corresponding idea, no giant │
│ │ │lock). │
├───────┼────────────┼────────────────┤
│create a │makefml │ │
│template of │bug-report-template ML │not implemented │
│bug report. │send-pr is same. │ │
├───────┼────────────┼────────────────┤
│execute │makefml command ML │not implemented │
│command. │ │ │
├───────┼────────────┼────────────────┤
│set up │makefml delivery_mode ML│not implemented │
│delivery mode.│ │ │
├───────┼────────────┼────────────────┤
│change │ │ │
│configuration │ │ │
│variable in │makefml setq ML │-o options. │
│running │ │ │
│makefml. │ │ │
├───────┼────────────┼────────────────┤
│show │ │ │
│environment │makefml showconfig ML │not implemented / no plan │
│summary where │showconf is same. │ │
│fml runs. │ │ │
├───────┼────────────┼────────────────┤
│show OS │ │ │
│information by│"makefml show". │not implemented / no plan │
│"show COMMAND"│ │ │
│style command.│ │ │
├───────┼────────────┼────────────────┤
│send a file. │makefml resend ML │not implemented / no plan │
├───────┼────────────┼────────────────┤
│upgrade │ │ │
│command: │ │ │
│convert fml │makefml upgrade ML │not needed │
│2.0 to fml │ │ │
│3.0. │ │ │
└───────┴────────────┴────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Difference Between fml4 And fml8: GUI (CGI)
In the case of fml4, you need to set up .cgi scripts and apache configurations
after installation.
In the case of fml8, "makefml newml" generates GUI scripts except for the
apache configurations.
Interface differs a lot. The interface of fml4 GUI is classical. That of fml8
is table based by default.
It is a TODO to select GUI skin dynamically.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
File Naming Convention
See Chapter 16 for the file naming convention. You need not to know the
detail, since the conversion tools convert files from fml4 style to fml8 one.
But it is useful to know it to see files.
The policy to handle member list and recipient list separately is same. But the
file name differs.
The file name is "filename-role" style. The role is abbreviated if the role is
default.
"actives" is renamed to "recipients". The meaning is clear. Instead "members"
is "members".
"members-admin" is same. "recipients-admin" exists virtually but is is not
used.
"etc/passwd" is renamed to "etc/passwd-admin". The format differs a little.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 9. Upgrade And Downgrade Of fml8
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│This chapter describes upgrade and downgrade of fml8. │
│ │
│See Chapter 7 on the upgrade from fml4 to fml8. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Upgrade
Install again.
After fml8 installation, rewrite fml_version line in /usr/local/etc/fml/main.cf
to switch fml to the version installed now. Just when the file is saved, fml is
changed to the new version.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
downgrade.
No need to install. Edit /usr/local/etc/fml/main.cf to back the fml_version to
the previous one.
Just when the file is saved, fml is changed to the new version.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 10. Configure CGI
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│See the section the Section called Method in Chapter 38 for CGI Internal │
│details. │
│ │
│We assumes you use suexec under apache. │
│ │
│Now fml8 provides both the master cgi to control all ML's in one domain and │
│a cgi for each ML. You can add and remove a user, or view member list et.al.│
│by this interface. Editing of configuration on this cgi is incomplete. │
│ │
│If you use postfix and qmail, you do not need to modify MTA configuration │
│for cgi specific reason. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"makefml newml" Creates CGI Script Always
"makefml newml" sets up CGI scripts such as config.cgi under ~fml/public_html
/... directory. There are two types of cgi scripts. One is for the whole
domain, one for each ML.
In creating elena@fml.org ML, makefml creates the following cgi
http://lists.fml.org/~fml/cgi-bin/fml/$domain/admin/config.cgi
[Example]
http://lists.fml.org/~fml/cgi-bin/fml/fml.org/admin/config.cgi
for all ML's of fml.org.
To control only elena ML, please use
http://lists.fml.org/~fml/cgi-bin/fml/$domain/ml-admin/${ml_name}/config.cgi
[Example]
http://lists.fml.org/~fml/cgi-bin/fml/fml.org/ml-admin/elena/config.cgi
[cgi]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Edit .htaccess
.htaccess is created but it is configured to deny all.
http://lists.fml.org/~fml/cgi-bin/fml/$domain/.htaccess
[Example]
http://lists.fml.org/~fml/cgi-bin/fml/fml.org/.htaccess
The default .htaccess is a dummy like this:
AuthName ByPassword
AuthType Basic
require valid-user
Please edit .htaccess properly.
Apache does not support ~user style access by default. Please set up apache to
enable it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Example: Master Cgi
The role of this cgi is same as limited makefml (CUI). Though this cgi permits
ML creation and destruction, all functions makefml has are not supported. The
function is limited.
Eample: TOP MENU
@home.fml.org CGI for configuration
fml admin menu fml CGI interface for @home.fml.org ML's
mailing list:
[elena]
command: .. help message ...
[subscribe ]
[submit][reset]
subscribe
unsubscribe
addadmin
byeadmin
options Language: list
[Japanese] [change] log
newml
rmml
[cgi]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CGI Example: Create ML
Select newml and push "submit". No need to select ML name in this stage.
You find another menu at the center. Specify the ML name you create and push
"submit" at the center.
[cgi]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CGI Example: subscribe
Specify the ML name and select "subscribe", push "submit".
You find another menu at the center. Specify the address to subscribe and push
"submit" at the center.
[cgi]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CGI Skin Selection
config.cgi is TABLE and SELECT based. If you use old style menu, use menu.cgi.
for a whole domain
~fml/public_html/fml/DOMAIN/admin/menu.cgi
for a ml
~fml/public_html/fml/DOMAIN/ml-admin/menu.cgi
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 11. Apache Configuration
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│See the Section called Method in Chapter 38 for the fml8 CGI internals. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Use Suexec Of Apache
Build apache enabled with suexec. Run configure by
(apache 1.x)
configure --enable-suexec --suexec-caller=www
In this case, the user "www" can call suexec. Please prepare a user specific
for suexec-ed environment.
After apache installation, change httpd.conf to allow ~user/cgi-bin/ form.
Example:
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
Order allow,deny
Allow from SPECIFIC_HOST
... snip ...
AddHandler cgi-script .cgi
... snip ...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 12. Test
Before Test
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│Set up MTA properly before test of fml. │
└──────────────────────────────────────┘
In this chapter, fml8 and MTA works on ahodori.fml.org, which is called as the
mail server.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test Of MTA
Firstly, check MTA without fml on ahodori.fml.org.
Prepare one personal user address such as rudo@fml.org. Usually, just create a
user named as "rudo".
# useradd rudo
Check you can send a mail to rudo@fml.org on ahodori.fml.org and rudo receives
the mail.
% echo test |Mail rudo@fml.org
If it not works, check MTA configuration. See /var/log/maillog et.al to track
errors.
Secondary, verify mail delivery over network. Send a mail to rudo@fml.org from
other host (not ahodori.fml.org). If rudo receives the mail, MTA is o.k.
If both work well, MTA configuration must be ok.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Send A Mail To ML
Create elena ML (elena@fml.org) and subscribe rudo@fml.org to elena ML.
% su fml
% makefml newml elena
% makefml add elena rudo@fml.org
Send a test mail to elena@fml.org from on the host and from other host (not
ahodori.fml.org). Verify the header of this test mail should be "From:
rudo@fml.org" since fml8 checks the From: header field.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Checkpoints
If something not work well, check the following points:
check the mail server log (e.g. /var/log/maillog)
check the fml log (e.g. /var/spool/m/elena/log)
fml can pass the message to MTA ? (e.g. /var/spool/m/elena/log)
MTA succeeds to deliver it? (e.g. /var/log/maillog)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Test Of fml8 Itself.
*** not yet implemented ***.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Reset After Test.
It is easy to re-create this mailing list (e.g. test ML).
% su fml
% makefml rmml test
% makefml newml test
The removed ML home is left as /var/spool/ml/@test.$DATE.$SEQUENCE. Please
remove it since this is a test to avoid the duplication in the future.
% rm -fr /var/spool/ml/@test.$DATE.*
III. How To Customise
Topics driven in this part.
Table of Contents
13. What A User Can
14. What Can You Do On The Mailing List Server
15. Modify Configuration Files
16. [Caution] File Names
17. Case Studies Of Customization
18. Header Rewriting
19. Extend Command
20. Filtering
21. Extend Message
22. Be ML Articles public via WWW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 13. What A User Can
Get ML Guide
Send the mail with
guide
to elena-ctl@fml.org address. fml8 sends back the guide message to the sender.
If a file named "guide" is found at $ml_home_dir, it is used as a message
template.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Subscribe
Suppose elena@fml.org ML. Firstly, send the mail with
subscribe YOUR-NAME
to elena-ctl@fml.org address.
fml8 sends back the confirmation to both addresses. Please send back the reply
for the confirmation to elena-ctl@fml.org again. When your reply to the
confirmation is confirmed to be valid, fml8 add the address as a new ML member.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Posting Article
Send a mail to elena@fml.org. MTA running on the mailing list server host (on
e.g. ahodori.fml.org) receives the mail and finally kicks off /usr/local/
libexec/fml/distribute command.
"distribute" command recieves the message from STDIN, rewrites the header, save
it in the spool directory and pass it back to MTA for delivery.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Distribution Process
1) fml8 adds a tag to the subject, update the article sequence number.
Example:
Subject: [elena:00100] teddy bear is cute.
(no tag by default).
2) save article (as a text file).
3) create a HTML version of the article under ~fml/public_html/ directory.
4) update database (udb) on thread.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Variables
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│*** sorry, not yet written *** │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Example: Boot Sequence Of Distribute Process
fml boot loader boots off in the following way.
/usr/local/libexec/fml/distribute command is symlink-ed to /usr/local/libexec/
fml/loader. These files are same.
/usr/local/libexec/fml/loader reads /usr/local/etc/fml/main.cf firstly.
$fml_vesrion such as "current-20010501" is defined in the main.cf. fml8
resolves $fml_version from it and determines the library path as /usr/local/lib
/fml/current-20010501/. fml8 loads perl modules under it.
fml8 sets up @INC properly. fml loader loads FML::Process::Switch module and
check $0 (process name). fml knows the process role from $0. In this case of
distribute, fml loads FML::Process::Distribute module (defined as /usr/local/
etc/fml/$fml_version/modules), switch itself to it and processes distribution.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Help: When You Want To know The Usage
Send the mail with
help
to elena-ctl@fml.org address. It sends back the help message to the sender.
If a file named "help" is found at $ml_home_dir, it is used as a message
template.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Get Past Articles
Send the mail with
get NUMBER
to elena-ctl@fml.org address where NUMBER is the article number. fml8 sends
back articles by mime/multipart form to the sender.
You can use MH style arguments as NUMBER.
[Example]
get 100
get 1-100
get first:3
get last:3
get 1-100,first:3,last:3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unsubscribe
In the case of elena@fml.org ML, send the mail with
unsubscribe YOUR-NAME
to elena-ctl@fml.org (control address).
fml8 sends back the confirmation to the sender. Please send back the reply for
the confirmation to elena-ctl@fml.org again. When your reply to the
confirmation is confirmed to be valid, fml8 removes the address.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Command Mail (Control fml By Sending Mail)
fml8 accepts control commands which is sent as a mail. It is called "command
mail".
Important: The use of CUI (makefml/fml) is basic in fml world. It is
expected you should use CUI if you can login the mailing list server.
The role of command mail is to delegate fml control priviledge to users who
cannot login the mailing list server.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Flow
Consider elena ML. Send the command mail to elena-ctl@fml.org which is the
address for command mail. MTA receives the mail and finally kicks off /usr/
local/libexec/fml/command program. This program receives the mail (command
mail) from STDIN , processes the requests and sends back the result to the
sender. The mail to send back is passed to MTA for delivery via SMTP.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│The result is aggreagated to one msssage as MIME/Multipart. This is │
│different from fml4 behaviour. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Perl Modules For Command Mail
All modules which CUI, GUI and command mail uses are implented as
FML::Command:: class.
In fact, a sub set of FML::Command:: class is allowed as command mail.
$user_command_mail_allowed_commands, $anonymous_command_mail_allowed_commands
and $admin_command_mail_allowed_commands variables defines it.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 14. What Can You Do On The Mailing List Server
On the host which serves ML driver, you can use CUI (makefml and fml) and edit
all configuration files as you like. It implies you are the greatest
administrator :)
"makefml" command of fml8 is same as fml4 as could as possible to preserve
compatibility.
See the Section called Difference Between fml4 And fml8: CUI in Chapter 8 on
the detail of the difference.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
On The Host
You need no confirmation in using makefml.
Person who can login the host of mailing list server has priviledge for all
ML's on the host. So, He/She can edit all configuration files.
But He/She may do wrong operations.
To avoid careless wrong operations, in usual cases you should use CUI (makefml
or fml) to configure fml. Of course you can edit files directly if you can
understand fml structures. By default we recommend you should use CUI always on
the host.
"fml" command is same as "makefml" command except for the argument order.
makefml COMMAND ML OPTIONS
fml ML COMMAND OPTIONS
Please either as you like.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Policy Of Command Creation
fml8 provides a different command for each function. Its policy makes the
number of commands infinite. So, except for some special cases, we should unify
all functions into makefml/fml command since such commands can be shared among
CUI, GUI and commmnd mail.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Operation May Modify The Specific ML (Read + Write)
We should implement sub-command of makefml/fml when some operation may modify
the specific ML.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Operation For Read Only Data Of The Specific ML (Read Only)
We should implement it as a makefml/fml command since it is related to the
specific ML.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Show The General Data (Read Only)
If the data is not related to the specific ML, for example, see the module
manual, aliases on the host, we implement specific commands other than makefml/
fml. This command name begins with "fml" prefix.
fmladdr [-n]
fmlalias [-n]
fmldoc MODULE
fmlconf [-n] ML
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ML Specific But A Command Wrapper
PGP / GPG related command (e.g. fmlpgp) is very command speicific. So, it looks
difficult to incorporate them into "makefml" and "fml" framework. So we
implement it as another command such as fmlpgp, fmlgpg, ...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Misc
We implement specific commands other than makefml/fml. This command name begins
with fml prefix.
For example, "fmlhtmlify" is a conveter from text to html form. This command is
used to convert both fml spool and MH folders.
fmlhtmlify [-I DIR] $src_dir $dst_dir
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Common Command Line Options
Programs under libexec/ and bin/ supports the following common command line
options.
--debug
--help
-c file
-o key=value
Use -c to specify non default main.cf path. -o overwrites configuration
variables. Plural -o are acceptable.
-o key1=value1 -o key2=value2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Create A New ML
% su fml
% makefml newml ML
If ML without @domain part is specified, the domain of the ML is treated as the
default domain. Both ML and ML@DOMAIN form is o.k. for the default domain.
Example: In the case of default domain:
% makefml newml elena
% makefml newml elena@fml.org
In the case of virtual domain, you should specify the address with the domain
such as user@domain form as ML string.
See the section Chapter 5 for more details.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Remove An ML
Example:
% su fml
% makefml rmml ML
fml accepts ML string without @domain as the default domain. Both user and
user@domain syntax is acceptable.
Example: in the case of default domain:
% makefml rmml elena
% makefml rmml elena@fml.org
Please use user@domain syntax for virtual domains.
It reverts the action newml did. It removes ML home directory, alias entries
and ~fml/.qmail-*.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Subscribe and Unsubscribe
Use "useradd" commadn to subscribe the user, "userdel" to unsubscribe the user.
Example:
% su fml
% makefml useradd ML ADDRESS
% makefml userdel ML ADDRESS
fml treats ML without @domain part as one of the default domain.
Examle:
% su fml
% makefml useradd elena rudo@nuinui.net
% makefml userdel elena rudo@nuinui.net
% makefml useradd elena@fml.org rudo@nuinui.net
% makefml userdel elena@fml.org rudo@nuinui.net
For convenience, useradd is an acronym. The following commands,
useradd
adduser
subscribe
add
, are same as useradd. In the same way,
userdel
deluser
bye
remove
resign
signoff
unsubscribe
are same as userdel.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Change the registered address
Example:
% su fml
% makefml chaddr ML OLD-ADDRESS NEW-ADDRESS
fml treats ML without @domain part as one of the default domain. For example,
Example: in the case of a virtual domain
% su fml
% makefml chaddr elena rudo@nuinui.net teddy@nuinui.net
% makefml chaddr elena@fml.org rudo@nuinui.net teddy@nuinui.net
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Stop Realtime Delivery
% makefml off elena ADDRESS
Delivery to ADDRESS is switched to digest.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Start Realtime Delivery
% makefml on elena ADDRESS
Delivery to ADDRESS is switched from digest to real time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
See Log
% makefml log elena
% makefml log elena@fml.org
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
See The Member List
% makefml list elena
It shows recipients of this ML. Also,
% makefml list elena recipient
lists up only recipients of this ML. Instead
% makefml list elena member
shows the list who can post this ML.
You can specify arbitrary MAP as an argument to show it.
% makefml list elena MAP
MAP can be an abbrebiation. For example, you can use "xxx" as MAP to imply
"primary_xxx_map" or "xxx_maps".
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Modify Configuration
Edit config.cf directly now.
Configuration helper tool is incompletely implemented.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Add or Remove A Remote Administrator.
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│A remote administor is a person who cannot login to the mail server but │
│control an ML by sending a command mail (which is called "admin command"). │
│ │
│Please use CUI to control remote administrators. If you use CUI, you can │
│have priviledge to do since the use of CUI needs login to this host. │
└──────────────────────────────────────┘
[Example]
% su fml
% makefml addadmin ML ADDRESS
% makefml deladmin ML ADDRESS
fml treats ML without @domain part as one of the default domain.
[Example: in the case of a virtual domain]
% su fml
% makefml addadmin elena rudo@nuinui.net
% makefml deladmin elena rudo@nuinui.net
% makefml addadmin elena@fml.org rudo@nuinui.net
% makefml deladmin elena@fml.org rudo@nuinui.net
For convenience,
adminadd
addpriv
are same as addadmin.
byeadmin
byepriv
are same as deladmin.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Add or Remove A Modrator
[Example]
% su fml
% makefml addmoderator ML ADDRESS
% makefml delmoderator ML ADDRESS
fml treats ML without @domain part as one of the default domain.
[Example: in the case of a virtual domain]
% su fml
% makefml addmoderator elena rudo@nuinui.net
% makefml delmoderator elena rudo@nuinui.net
% makefml addmoderator elena@fml.org rudo@nuinui.net
% makefml delmoderator elena@fml.org rudo@nuinui.net
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"fml" And "makefml" Command
"fml" (/usr/local/bin/fml) and "makefml" (/usr/local/bin/makefml) is same
except for argument order. Please use it as you like.
% fml ML COMMNAD [OPTIONS]
% makefml COMMAND ML [OPTIONS]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Show Addresses (Users + Aliases)
"fmladdr" (/usr/local/bin/fmladdr) lists up all users on this host. It shows
users defined in /etc/passwd and aliases defined in Postfix.
% fmladdr
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│The difference between "fmladdr" and "fmlalias" is whether it contains users│
│defined at /etc/passwd or not. "fmladdr" contains it but "fmlalias" not. │
│"fmlalias" lists up all users defined at aliases. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Show Alias
fmlalias (/usr/local/bin/fmlalias) shows all aliases. Precisely speaking, it
shows all aliases defined as valid aliases of Postfix.
% fmlalias
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│The difference between "fmladdr" and "fmlalias" is whether it contains users│
│defined at /etc/passwd or not. "fmladdr" contains it but "fmlalias" not. │
│"fmlalias" lists up all users defined at aliases. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Show Configuration
"fmlconf" (/usr/local/bin/fmlconf) takes ML name as an argument. It shows all
variables of the specified ML. If "-n" option specified, it shows variables
different from default ones.
To list up all variable list,
% fmlconf elena
To list up variables different from the default one,
% fmlconf -n elena
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Show Perl Module Document
The usage of fmldoc is same as perldoc. This is a wrapper for perldoc.
To see FML::Process::Kernel perl module document,
% fmldoc FML::Process::Kernel
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Convert Articles To HTML Form
By default, fml converts the article to HTML form. "fmlhtmlify" command is a
tool to convert all articles to initialize the html archive.
[Usage]
% fmlhtmlify SPOOL_DIRECTORY HTML_ARCHIVE_DIRECTORY
[Example]
% fmlhtmlify /var/spool/ml/elena/spool /some/where/mlarchive/elena
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recipes
1. I've removed ML accidentally. Can I revive it ? (CUI,CGI,admin command)
2. Add an address who can post (CUI,CGI,admin command)
3. Add an address who receive articles but not post.
4. Change registered address.
1. I've removed ML accidentally. Can I revive it ? (CUI,CGI,admin command)
If you have removed ML by running "makefml rmml", please use
% makefml reviveml ML
Same as CGI.
When you use admin command (remote administration), you cannot use this
operation.
If you have removed ML by running "rm -fr /var/spool/ml/elena", you cannot
revive it. Please revive ML from back-up.
2. Add an address who can post (CUI,CGI,admin command)
Usually run
% makefml add ML ADDRESS
If you post from both office and home but want to receive article at office, it
is better to add an address who can post but not receive. It implies we should
add the address to only member_maps.
On the mailing list server host, use makefml.
% makefml addmember ML ADDRESS
The following 4 commands are same function: add2member add2members addmember
addmembers
When you use "admin command", as in same way.
To: elena-ctl@fml.org
Subject:
admin pass PASSWORD
admin addmember ML ADDRESS
CGI does not provide this function now.
3. Add an address who receive articles but not post.
The usage of address, who cannot post but can receive articles, is for such as
mail magazine case.
n the mailing list server host, use makefml.
% makefml addrecipient ML ADDRESS
This ADDRESS is added to only recipient_maps. The following 4 commands are same
function: add2recipient add2recipients addrecipient addrecipients
The usage is same in "admin command".
To: elena-ctl@fml.org
Subject:
admin pass PASSWORD
admin addrecipient ML ADDRESS
CGI does not provide this function.
4. Change registered address.
On the mailing list server host, use makefml.
% makefml chaddr ML OLD-ADDRESS NEW-ADDRESS
The usage is same in "admin command".
To: elena-ctl@fml.org
Subject:
admin pass PASSWORD
admin chaddr ML OLD-ADDRESS NEW-ADDRESS
"chaddr" command is available in using CGI.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 15. Modify Configuration Files
Change Default For All ML's On Thie Host
Edit /usr/local/etc/fml/site_default_config.cf file. The format is same as
config.cf.
This file corresponds to site_force.ph of fml4.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 16. [Caution] File Names
References: fml-devel 205
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Filename Structure
The fundamental syntax is
FILENAME-ROLE
. For example, fml uses the following syntax for address lists.
recipients-ROLE
members-ROLE
Other than address lists, fml uses similar manner for other type of files. For
example,
passwd-admin
passwd-moderator
passwd-cgiadmin
for several password files.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: Address List
primary_recipient_maps = recipients
# add actives for backward compatibility
recipient_maps = recipients
actives
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: List Of Remote Administrators
recipients-admin
members-admin
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: List Of Moderators
recipients-moderator
members-moderator
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: Remote Administrator Password Files
etc/passwd-admin
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│etc/passwd, lack of role name, was used in the case of fml4. │
└──────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Chapter 17. Case Studies Of Customization
Case Study: Auto File Responder
Modify delivery process ( libexec/distribute ) to send back /some/where/help
file. For example, when a user can send anything to help@fml.org, fml sends
back the help file to the sender.
In this case, set the following at config.cf
article_post_restrictions = permit_anyone
and define the following hook after =cut line.
$distribute_run_start_hook = q{
$curproc->reply_message( {
type => "text/plain; charset=iso-2022-jp",
path => "/some/where/help",
filename => "help",
disposition => "help example",
});
$curproc->stop_this_process();
};
The last
$curproc->stop_this_process();
method of fml8 corresponds to the statement
$DO_NOTHING = 1;
of fml4. After this statement, the normal processing stops.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: Anyonen Can Use Command Mail.
$command_mail_restrictions defines who can use command mail. By default user
registerd as a poster can use command mail. To enable that anyone can use
command mail, set
command_mail_restrictions = permit_anyone
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Recipes
1. Anyone can use command mail.
2. Anyone except system accounts can use command mail.
3. nobody use command mail.
1. Anyone can use command mail.
command_mail_restrictions = permit_anyone
2. Anyone except system accounts can use command mail.
command_mail_restrictions = reject_system_accounts
permit_anyone
3. nobody use command mail.
command_mail_restrictions = reject
There are other methods to disable command mail. See the Section called Case
Study: Disable Command Mail for more details.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: Disable Command Mail
It is most safe to remove command mail entries from aliases.
Another 2nd best solution follows:
use_command_mail_function = no
In this case, /usr/local/libexec/fml/command runs once but does not work and
ends as soon as possible.
The following solution may be possible.
use_command_mail_function = yes
command_mail_restrictions = reject
When fml receives the incoming command mail, it inform the rejection to the
sender in all cases.
This configuration works but it evalutates each line. It is useless.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Case Study: Mail Magazine (1)
┌──────────────────────────────────────┐
│ Warning │
├──────────────────────────────────────┤
│Please use PGP auth if could, though we describe header based auth here. │
│Also please set up MTA properly e.g. to disable smtp interfaces as could as │
│possible. │
│ │
│It is a problem that PGP auth requires user's skill at some level. │
└──────────────────────────────────────┘
In the case of header based auth, you can create a mail magazine by using the
asymmetirc member list. Consider asymmetric case of member list (list of
persons who can post) and recipient list below.
Firstly, remove $primary_member_map from $member_maps. Instead, define
$ml_home_dir/members-mailmag who can post to $member_maps.
member_maps = $ml_home_dir/members-mailmag
The use of "subscribe" command is same as default one since "subscribe" command
changes $primary_member_map not $member_maps. It is a little tricky but crafty
use of $primary_XXX_map and $XX_maps enhances fml8 configuration.
In this case, when a new user is subscribed, the user address is added to both
$ml_home_dir/members ($primary_member_map) and $ml_home_dir/recipinets
(