'\" t .\" .\" .\" Title: couriermlm .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 10/28/2020 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" .TH "COURIERMLM" "1" "10/28/2020" "Courier Mail Server" "Double Precision, Inc." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" couriermlm \- The Courier mailing list manager .SH "SYNOPSIS" .HP \w'\fBcouriermlm\fR\ 'u \fBcouriermlm\fR {\fIcommand\fR} {\fIdirectory\fR} [\fIarg\fR...] .SH "DESCRIPTION" .PP \fBcouriermlm\fR is the Courier mail server\*(Aqs mailing list manager\&. This command sets up, maintains, and manages mailing lists\&. \fBcouriermlm\fR automatically handles requests to subscribe and unsubscribe list members, detects undeliverable addresses and removes them from the subscription rolls\&. Mailing lists managed by \fBcouriermlm\fR require zero human administrative oversight\&. \fBcouriermlm\fR supports digests, write\-only posting aliases, and moderated mailing lists\&. .SS "CREATING A MAILING LIST" .PP Anyone can use \fBcouriermlm\fR, not just the system administrator\&. The Courier mail server mail server translates an address list\-name@domain as a local address with a corresponding \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file\&. Anyone that can install a \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file, and can schedule \fBcron\fR(8) jobs, can run a \fBcouriermlm\fR mailing list\&. .PP Note that the system administrator can optionally remove the \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 support from the the Courier mail server\&. \fBcouriermlm\fR will not work in that case\&. .PP Setting up a mailing list consists of the following steps: .PP Run \fBcouriermlm create\fR .RS 4 Use this command to create a directory where \fBcouriermlm\fR keeps all mailing list related files\&. .RE .PP Configure the mailing list .RS 4 The \fBcouriermlm create\fR command initializes the mailing list subdirectory with some default template responses\&. It is necessary to customize them for your mailing list, and it may be necessary to issue some additional commands in order to configure appropriate mailing list options \-\- such as enabling unrestricted posting privileges, and enabling moderation\&. .RE .PP Create \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files .RS 4 Set up to run \fBcouriermlm\fR to distribute mailing list messages, and process requests\&. .RE .PP Set up \fBcron\fR(8) .RS 4 You need to set up \fBcron\fR(8) jobs to run the \fBcouriermlm hourly\fR and \fBcouriermlm daily\fR commands, which perform regular mailing list maintenance\&. .RE .PP Enable SMTP pre\-filtering .RS 4 This step configures a hook that runs \fBcouriermlm\fR as part of the SMTP transaction when receiving mail to a mailing list address, and rejects the mail if it would not be accepted to the mailing list instead of receiving the message and then generating a non\-delivery report\&. .sp This is an optional step that adds some complexity, but reduces mailing list management issues\&. .RE .PP Back up subscription lists .RS 4 As part of your daily job you should also run the \fBexport\fR command, in order to back up the mailing list subscriber information\&. In the event that the mailing list database gets corrupted or lost, you can restore it from this backup file\&. See the \fBexport\fR command for more information\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP Setting up a digest for the mailing list requires additional steps\&. See "\m[blue]\fBSetting up a mailing list digest\fR\m[]\&\s-2\u[2]\d\s+2" below for more information\&. .sp .5v .RE .PP The first step is to run the following command: .sp .if n \{\ .RS 4 .\} .nf couriermlm create \fIdirectory\fR ADDRESS=\fIlist@domain\fR .fi .if n \{\ .RE .\} .PP \fIdirectory\fR is the mailing list directory that will be managed by \fBcouriermlm\fR\&. This directory should not be created in advance, this command creates this directory, and initializes it\&. .PP \fIlist@domain\fR is the mailing list\*(Aqs address, the address that sends messages to the mailing list\&. .PP An additional setting, URL may also be specified: .sp .if n \{\ .RS 4 .\} .nf couriermlm create \fIdirectory\fR ADDRESS=\fIlist@domain\fR URL=\fIurl\fR .fi .if n \{\ .RE .\} .PP \(lqurl\(rq would be the URL of the WebMLM web page for this mailing list\&. See \m[blue]\fB\fBwebmlmd\fR(1)\fR\m[]\&\s-2\u[3]\d\s+2 for more information\&. .PP The directory created by \fBcouriermlm create\fR is initialized to contain a number of text files that \fBcouriermlm\fR sends back as replies to administrative commands\&. It is necessary to edit these template files and adjust the text in those files for this mailing list\&. All template filenames end with \&.tmpl, and their contents are self explanatory\&. Some important template files are: .PP help\&.tmpl .RS 4 This text is returned in response to the help command\&. This text must be modified depending upon whether this mailing list is a moderated mailing list, has a digest version, or if any other non\-default configuration options are set for the mailing list\&. .RE .PP sub\&.tmpl .RS 4 This is the reply that\*(Aqs sent back in response to a subscription request\&. Less important is unsub\&.tmpl, which is the response to a request to unsubscribe\&. .RE .PP sub2\&.tmpl .RS 4 This is the successful subscription confirmation\&. A brief overview of the mailing list might be appropriate here\&. .RE .PP \fBcouriermlm\fR has rudimentary support for non\-English templates\&. The \fBcouriermlm create\fR command has a single, optional parameter, \fB\-\-lang=\fR\fB\fIsuffix\fR\fR The option must be specified after the mailing list directory\*(Aqs name: .sp .if n \{\ .RS 4 .\} .nf couriermlm create \fIdirectory\fR \-\-lang=es ADDRESS=\fIlist@domain\fR URL=\fIurl\fR .fi .if n \{\ .RE .\} .PP The templates for the stock text files come from /usr/lib/courier/couriermlm\&. This directory contains all the *\&.tmpl and *\&.html template files that \fBcouriermlm create\fR installs in the new mailing list \fIdirectory\fR\&. .PP Translated versions of template files are installed in the same directory, /usr/lib/courier/couriermlm\&. The translated version of \fIfile\fR must be installed as \fIfile\fR\&.\fIsuffix\fR, for example: help\&.tmpl\&.es is the translated version of help\&.tmpl, with the \(lqes\(rq suffix\&. .PP The \fB\-\-lang=\fR\fB\fIsuffix\fR\fR option installs the the \&.suffix version of each text template file, if available\&. If not, the stock English template file gets copied, as usual\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP Do not remove the English template files, even if you never use them\&. They must be left in place, in /usr/lib/courier/couriermlm, for \fBcouriermlm create\fR to work correctly\&. .sp .5v .RE .PP Example: .sp .if n \{\ .RS 4 .\} .nf couriermlm create /home/lists/users\-list \-\-lang=es \&.\&.\&. .fi .if n \{\ .RE .\} .PP This example installs the *\&.es versions of mailing list template files\&. Only the stock, English template files come with the Courier mail server\&. This mechanism only provides an easy integration ability with template files from other sources\&. .PP There are some additional configuration files that can be modified to suit your taste: .PP headeradd .RS 4 This file can be initialized to contain any mail headers that will be automatically added to every mailing list message\&. The contents of this file are simply prepended to every message that goes out\&. Blank lines are not allowed\&. .RE .PP headerdel .RS 4 This file lists any headers that will be automatically removed from every mailing list message before it\*(Aqs sent\&. List each header one per line, including the : character\&. For example, to remove all \fIReceived:\fR and \fIDate:\fR headers from every message, initialize this file to contain the following two lines: .sp .if n \{\ .RS 4 .\} .nf Received: Date: .fi .if n \{\ .RE .\} .RE .PP Both the headeradd and headerdel files can be used to implement a popular feature of setting the replies to every message to go to the mailing list\&. Having "Reply\-To:" in headerdel, removes any existing \fIReply\-To:\fR header, and then having "Reply\-To: \fIlist@domain\fR" in headeradd appends a fixed \fIReply\-To:\fR header to every message\&. .PP The \fIcreate\fR command also creates the following subdirectories in the mailing list directory: .PP sublist .RS 4 This subdirectory has the database files that contain the mailing list\*(Aqs subscription list\&. .RE .PP unsublist .RS 4 This subdirectory stores files that contain information about addresses that have been unsubscribed from the mailing list\&. This information might be of some use when tracking down an old subscription\&. The contents of this directory are not automatically purged, you must set up your own purging mechanism for this directory\&. .RE .PP commands, commands\&.dat .RS 4 These directories store temporary files that contain pending (unconfirmed) commands for the mailing list manager\&. The \fBcouriermlm\fR commands \fIhourly\fR and \fIdaily\fR must be executed regularly in order to periodically purge stale entries\&. .RE .PP modqueue .RS 4 Messages awaiting moderator approval (for moderated lists)\&. .RE .PP archive .RS 4 Messages received by this mailing list will be stored here, in addition to being forwarded to subscribers\&. \fBcouriermlm\fR does not automatically do any purging on this subdirectory, you must set up your own archiving mechanism that cleans out this subdirectory\&. .RE .PP The last step involves installing a couple of \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files that run \fBcouriermlm\fR to receive mailing list messages and administrative commands\&. The mailing list address, \fIlist@domain\fR, corresponds to some \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file\&. For example, if your system account is \fIjohn\fR, and your mail domain is \fIexample\&.com\fR, then the \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file for the mailing list \fI\fR is $HOME/\&.courier\-list\&. .PP Let\*(Aqs say that the \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file is $HOME/\&.courier\-list\&. To properly support the mailing list, the following \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files will have to be initialized as follows: .PP $HOME/\&.courier\-list .RS 4 This file should be initialized to contain the following delivery instruction: .sp .if n \{\ .RS 4 .\} .nf | /usr/bin/couriermlm msg \fIdirectory\fR .fi .if n \{\ .RE .\} \fIdirectory\fR is the created mailing list directory\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Messages to \(lqPOST=subscribers\(rq lists from non\-subscribers get rejected by \fBcouriermlm\fR resulting in delivery failure\&. This generates a undeliverable message report, a \(lqbounce\(rq\&. Unfortunately this can be abused to generate a bandwidth amplification attack\&. Append "; exit 0" to the \&.courier command, to suppress bounces from delivery failures: .sp .if n \{\ .RS 4 .\} .nf | /usr/bin/couriermlm msg \fIdirectory\fR; exit 0 .fi .if n \{\ .RE .\} This will suppress all bounces, though, not just the ones resulting from messages from non\-subscribers\&. A better solution is to configure SMTP pre\-filtering, as described below\&. SMTP pre\-filtering checks each message before it\*(Aqs accepted from the sending SMTP server\&. A rejected message does not generate a bounce message, but returns an error to the sending SMTP server, leaving it on the hook for generating bounces\&. .sp .5v .RE .RE .PP $HOME/\&.courier\-list\-owner .RS 4 This file should contain the appropriate delivery instructions for forwarding all mail addressed to to the address of the owner of the mailing list\&. This can be another E\-mail address, or a mailbox specification\&. .RE .PP $HOME/\&.courier\-list\-default .RS 4 This file should be initialized to contain the following delivery instruction: .sp .if n \{\ .RS 4 .\} .nf | /usr/bin/couriermlm ctlmsg \fIdirectory\fR .fi .if n \{\ .RE .\} \fIdirectory\fR is the created mailing list directory\&. This \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file provides support for all other addresses of the form , where \fIcommand\fR is a mailing list administrative command\&. Commands are sent to this mailing list manager by sending a message to one of several special addresses, described more fully in "\m[blue]\fBMailing list commands\fR\m[]\&\s-2\u[4]\d\s+2", below\&. .RE .SS "Configuring SMTP pre\-filtering of mailing list messages" .PP This is an optional step that implements filtering of mailing list messages before each message is received from the sending SMTP server\&. Otherwise, Courier accepts all messages, and the rejected ones generate a non\-delivery report\&. The report gets E\-mailed to the purported sender\&. Another option is to quietly ignore the rejections, as described above\&. Either way, non\-delivery notifications can sometimes be problematic\&. This step adds some complexity to the mailing list configuration, but mostly eliminates this problem\&. .PP SMTP pre\-filtering uses the \m[blue]\fB\fBlocalmailfilter\fR(7)\fR\m[]\&\s-2\u[5]\d\s+2 interface\&. The following instructions repeat some of the information from the \fBlocalmailfilter\fR(7) documentation, for convenience\&. See that documentation for complete information\&. .PP The following instructions reference a typical mailing list configuration setup: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} A reserved system account called \(lqlists\(rq\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} A mailing list\*(Aqs address of \(lqlists\-announcements@example\&.com\(rq, set up by installing $HOME/\&.courier\-announcements and $HOME/\&.courier\-announcements\-default (and $HOME/\&.courier\-announcements\-owner) in lists\*(Aqs home directory, as described above\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The mailing list directory (created by \fBcouriermlm create\fR) is $HOME/announcements\&. .RE .PP The first two steps enable SMTP mail filtering using \fBmaildrop\fR, and this should be done as root: .sp .if n \{\ .RS 4 .\} .nf # echo /usr/bin/maildrop >/etc/courier/maildropfilter .fi .if n \{\ .RE .\} .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP This enables SMTP mail filtering to all local mailboxes\&. All local mailboxes will be able to specify their SMTP mail filters, as explained in \fBlocalmailfilter\fR(7)\&. .sp .5v .RE .PP The second step installs \fBcouriermlm\fR wrappers for SMTP filters: .sp .if n \{\ .RS 4 .\} .nf # mkdir /etc/courier/maildroprcs # d="/usr/lib/courier/couriermlm" # ln \-s $d/couriermlm\-rcptfilter\-ctlmsg /etc/courier/maildroprcs # ln \-s $d/couriermlm\-rcptfilter\-msg /etc/courier/maildroprcs # ln \-s $d/couriermlm\-smtpfilter\-ctlmsg /etc/courier/maildroprcs # ln \-s $d/couriermlm\-smtpfilter\-msg /etc/courier/maildroprcs .fi .if n \{\ .RE .\} .PP The remaining steps are done while logged in as the mailing list owner\*(Aqs account: .sp .if n \{\ .RS 4 .\} .nf $ mkdir $HOME/\&.mailfilters $ chmod 700 $HOME/\&.mailfilters .fi .if n \{\ .RE .\} .PP Each mailing list needs four \fBmaildrop\fR scripts installed in \&.mailfilters\&. Using the \(lqlists\-announcements@example\&.com\(rq list as an example, owned by lists\*(Aqs account: .sp .if n \{\ .RS 4 .\} .nf $ cd $HOME/\&.mailfilters $ cat rcptfilter\-announcements LISTDIR="announcements" include \*(Aq/etc/courier/maildroprcs/couriermlm\-rcptfilter\-msg\*(Aq $ cat rcptfilter\-announcements\-default LISTDIR="announcements" FILENAMEPREFIX="rcptfilter\-announcements" include \*(Aq/etc/courier/maildroprcs/couriermlm\-rcptfilter\-ctlmsg\*(Aq $ cat smtpfilter\-announcements LISTDIR="announcements" include \*(Aq/etc/courier/maildroprcs/couriermlm\-smtpfilter\-msg\*(Aq $ cat smtpfilter\-announcements\-default LISTDIR="announcements" FILENAMEPREFIX="smtpfilter\-announcements" include \*(Aq/etc/courier/maildroprcs/couriermlm\-smtpfilter\-ctlmsg\*(Aq .fi .if n \{\ .RE .\} .PP And the permissions must be nailed down, as always: .sp .if n \{\ .RS 4 .\} .nf $ chmod 600 $HOME/\&.mailfilters/* .fi .if n \{\ .RE .\} .PP Each \fBmaildrop\fR script sets the \fILISTDIR\fR variable before invoking the \fBcouriermlm\fR wrapper\&. \fILISTDIR\fR is the name of the mailing list\*(Aqs directory, in the account\*(Aqs home directory\&. In this case the mailing list directory, created by \fBcouriermlm create\fR is $HOME/announcements, so \fILISTDIR\fR is announcements\&. It\*(Aqs possible to put mailing list directories in a subdirectory, and reference the subdirectory here\&. Mailing list directories\*(Aq names cannot contain periods\&. .PP Additionally, the two \-default scripts must set \fIFILENAMEPREFIX\fR to their own names, with the \(lq\-default\(rq suffix stripped off\&. .PP The easiest way to test this configuration is to use the default mailing list configuration that allows messages only from the list\*(Aqs subscribers, then attempt to send a message to the mailing list, from another SMTP server, using a return address that\*(Aqs not subscribed to the list\&. The resulting non\-delivery report should come from the other SMTP server, and not \fBcouriermlm\fR\*(Aqs mail server\&. .SS "MANUAL COMMANDS" .PP \fBcouriermlm\fR may also be run manually from the command line as follows: .sp .if n \{\ .RS 4 .\} .nf /usr/bin/couriermlm \fIcommand\fR \fIdirectory\fR [ options\&.\&.\&. ] .fi .if n \{\ .RE .\} .PP \fIcommand\fR is a command from the following list\&. \fIdirectory\fR is the mailing list directory\&. The commands are: .PP create .RS 4 Create a mailing list\&. .RE .PP update .RS 4 Update/restore mailing list templates\&. The original, default, mailing list message template files (*\&.tmpl and *\&.tmpl\&.html) are reinstalled into the mailing list directory\&. This command must be processed for every mailing list directory after upgrading to the Courier server version 0\&.55, or later, from earlier versions (but see below)\&. \fBcouriermlm\fR in version 0\&.55 of the Courier mail server uses updated templates files, which must be installed in every mailing list directory\&. Although the names of many template files have not changed, the embedded markup codes in the template files work differently\&. .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Begin by making a backup copy of all *\&.tmpl files in the existing \fBcouriermlm\fR mailing list directory\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Run the \(lqupdate\(rq command on the list directory\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} Review the backed up template files, identify your customized changes, then retype them into new template files installed by the \(lqupdate\(rq command\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} Proceed to the next mailing list directory\&. .RE .sp Yes, this is going to be a pain\&. This is the first overhaul of \fBcouriermlm\fR\*(Aqs infrastructure in many years\&. Once a decade, some elbow grease must be sacrificed in the name of progress\&. It\*(Aqs not the end of the world\&. .sp In an extreme emergency, preserve the \fBcouriermlm\fR from the previous version of the Courier mail server\&. Mass\-update all existing lists\*(Aq \&.courier\-\fIlist\fR and \&.courier\-\fIlist\fR\-default files to run the old \fBcouriermlm\fR\&. Then, migrate each mailing list on a predetermined schedule\&. After migrating each list, put the default path back into the list\*(Aqs \&.courier files\&. .sp Keep in mind the following issues, while migrating the lists: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The help\&.tmpl template file is usually the one that gets customized the most\&. In most cases, large bits and pieces of this file, that document certain list options that do not apply to this list, must be removed\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} There are several new template files, including a number of *\&.html files that refer to new HTML\-formatted responses from \fBcouriermlm\fR, and the WebMLM interface\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Be aware of updated mail headers declared in several template files\&. The MIME character set is now given as utf\-8\&. Some templates no longer contain the Mime\-Version and Subject headers\&. The Subject headers are moved to separate template files\&. Many existing template files now contain both a plain text and an HTML\-formatted version of the \fBcouriermlm\fR response\&. Always scroll to the end of each template file, to reveal any appended HTML portion of template\*(Aqs text\&. .RE .RE .PP set .RS 4 Set mailing list options, see below\&. .RE .PP sub .RS 4 Manually subscribe an address to the mailing list\&. .RE .PP unsub .RS 4 Manually unsubscribe an address from the mailing list\&. .RE .PP lsub .RS 4 List all the subscribers to this mailing list\&. .RE .PP laliases .RS 4 List write\-only aliases for this mailing list\&. .RE .PP export .RS 4 Export mailing list subscriber information\&. .RE .PP import .RS 4 Import mailing list subscriber information\&. .RE .PP ctlmsg .RS 4 Receive and interpret a control message\&. .RE .PP info .RS 4 Display a subscription record\&. .RE .PP msg .RS 4 Post a message to the mailing list\&. .RE .PP hourly .RS 4 Perform hourly maintenance\&. It is necessary to set up a \fBcron\fR(8) job to execute the \fIhourly\fR command once an hour\&. .RE .PP daily .RS 4 Perform daily maintenance\&. It is necessary to set up a \fBcron\fR(8) job to execute the \fIdaily\fR command once a day\&. .RE .PP digest .RS 4 Create a digest\&. See "\m[blue]\fBSetting up a mailing list digest\fR\m[]\&\s-2\u[2]\d\s+2" below for more information\&. .RE .SS "MANUAL SUBSCRIPTION MANAGEMENT" .PP The sub, unsub, lsub, laliases, export, and import commands allow manual subscription list management\&. Normally, subscription\-related commands are done by sending an appropriate mailing list command, see "\m[blue]\fBMailing List Commands\fR\m[]\&\s-2\u[4]\d\s+2", below\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm sub \fIdirectory\fR \fIuser@domain\fR .fi .if n \{\ .RE .\} .PP This command adds the address to the subscription list\&. \fBcouriermlm\fR will now read a free\-form comment or a note from standard input, terminated by an end\-of\-file (usually CTRL\-D)\&. The free\-form comment is stored in the subscription database, together with the address, and is shown by the "info" command\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm unsub \fIdirectory\fR \fIuser@domain\fR .fi .if n \{\ .RE .\} .PP This command remove the address from the subscription rolls\&. \fBcouriermlm\fR will also read a free\-form comment, which is added to the subscription record\&. After removing this address from the subscription rolls, its subscription record is archived in the \fIdirectory/unsublist\fR directory\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm lsub \fIdirectory\fR .fi .if n \{\ .RE .\} .PP This command lists all the addresses subscribed to the list, on standard output, one per line\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm laliases \fIdirectory\fR .fi .if n \{\ .RE .\} .PP This command lists all write\-only aliases that have been subscribed to the list, together with the subscriber address that added each alias\&. See "\m[blue]\fBWrite\-Only Aliases\fR\m[]\&\s-2\u[6]\d\s+2" for more information\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm export \fIdirectory\fR .fi .if n \{\ .RE .\} .PP The \fIexport\fR command lists the contents of the subscription database on standard output\&. The export command produces the following output format: .sp .if n \{\ .RS 4 .\} .nf \fIaddress\fR \fIsubscription information\fR \&.\&.\&. \fIaddress\fR \fIsubscription information\fR \&.\&.\&. .fi .if n \{\ .RE .\} .PP "\fIaddress\fR", is an address subscribed to the mailing list\&. This is followed by its corresponding subscription information, usually a copy of the subscription request that was used to add the address to the mailing list\&. The subscription information is terminated by a line containing a single period\&. Any lines in the subscription information that begin with a period have an extra period prepended to them\&. .sp .if n \{\ .RS 4 .\} .nf couriermlm import \fIdirectory\fR .fi .if n \{\ .RE .\} .PP The \fIimport\fR command reads on standard input a previously exported mailing list subscription database, and adds those addresses to the indicated mailing list\&. .PP It is highly recommended to make a regular backup of subscriber information using the \fIexport\fR command, in the event that the subscription database gets corrupted\&. In which case the \fIimport\fR command can be used to rebuild the subscription database, in absence of any direct backups of the database files\&. .SS "SETTING MAILING LIST OPTIONS" .PP The \fIset\fR command sets various list options: .sp .if n \{\ .RS 4 .\} .nf couriermlm set \fIdirectory\fR \fIoption=value\fR \fIoption=value\&.\&.\&.\fR .fi .if n \{\ .RE .\} .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP Setting the ADDRESS or the URL options, described below, automatically updates the contents of the headeradd configuration file\&. Its existing \(lqList\-\(rq headers are removed and replaced by updated \(lqList\-\(rq headers that reflect the revised list address or URL\&. .sp .5v .RE .PP One or more options can be set with the same command\&. The available options are: .PP ADDRESS=\fIaddress\fR .RS 4 The base E\-mail address for this mailing list\&. .RE .PP URL=\fIaddress\fR .RS 4 The URL of WebMLM web page for this mailing list\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br WebMLM determines its own URL automatically, by reading its HTTP headers\&. This setting is used by \fBcouriermlm\fR, which has no knowledge of the web server\*(Aqs configuration, and needs to know the correct URL to insert into generated messages\&. .sp .5v .RE .RE .PP CASESENSITIVE=\fIflag\fR .RS 4 If flag is "1", the userid portion of E\-mail addresses are case\-sensitive\&. The domain address portion is always case\-insensitive\&. The default setting is "0" making both userid and domain address portions of E\-mail addresses case\-insensitive\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Be careful when changing this setting on an active list\&. Changing this option to \(lqCASESENSITIVE=1\(rq, forces all existing subscribers to make sure their addresses are lowercase\-only, otherwise they will no longer be recognized as subscribers\&. Changing this option to \(lqCASESENSITIVE=0\(rq blocks all subscribed addresses that have uppercase characters in the userid portion of their E\-mail address\&. They will continue to receive mailing list traffic, but unable to post messages to the list, or unsubscribe from it\&. It will not be possible to unsubscribe those addresses even by running the \fBcouriermlm\fR command manually\&. .sp .5v .RE .RE .PP DIGEST=\fIdirectory\fR .RS 4 Enable digests\&. \fIdirectory\fR is the pathname to the previously\-createddigest list directory\&. See "\m[blue]\fBSetting up a mailing list digest\fR\m[]\&\s-2\u[2]\d\s+2" below for more information\&. .RE .PP KEYWORD=\fIkeyword\fR .RS 4 Set the subject line keyword for mailing list messages\&. If set, \fBcouriermlm\fR inserts "[keyword]" into the subject of every mailing list message, to aid sorting by the recipients\&. .RE .PP MAXBOUNCES=\fIn\fR .RS 4 Maximum number of bounce notifications sent by the \fIhourly\fR command, in order to prevent the mail system from being overloaded\&. The default is 20 bounce notifications\&. Any unsent notifications will be carried over to the next hourly job\&. .RE .PP MAXMODNOTICES=\fIn\fR .RS 4 Maximum number of moderation reminders sent by the \fIhourly\fR command, in order to prevent the mail system from being overloaded\&. The default is 20 moderation reminders\&. Any unsent reminders will be carried over to the next hourly job\&. .RE .PP MAXFETCHSIZE=\fIK\fR .RS 4 Maximum size, in kilobytes, of a response to the \fIfetch\fR command\&. The default is 100Kb\&. This option is used to minimize the impact of abusive requests for the entire archive, with a forged return address\&. .RE .PP NAME=\fIname\fR .RS 4 The name that\*(Aqs listed on the return address of administrative messages\&. Note that if \fIname\fR contains spaces, you should quote this argument in the shell\&. The default value is "Courier Mailing List Manager"\&. .RE .PP NOBOZOS=\fIflag\fR .RS 4 If flag is "0" \fBcouriermlm\fR will not attempt to block misdirected subscribes and unsubscribes that are sent to the mailing list\*(Aqs posting address\&. If flag is "1" (the default), those kinds of messages will be bounced appropriately\&. .RE .PP NODSN=\fIflag\fR .RS 4 If flag is "1" \fBcouriermlm\fR will use a Delivery Status Notification setting of "never" when it sends confirmation requests and help messages: this should reduce the amount of useless failure notifications generated when \fBcouriermlm\fR dutifully replies to spam received by the mailing list administrative addresses, i\&.e\&. \-(un)subscribe and \-help\&. If flag is "0" (the default), a DSN setting of "fail" will be used\&. Please see \fBsendmail\fR(1)\*(Aqs \-n option for more details on the DSN setting\&. .RE .PP POST=\fIoption\fR .RS 4 Set posting options\&. \fIoption\fR is one of three values: "subscribers" \- only subscribers may post messages to this mailing list (this is the default); "all" \- anyone can post messages to this mailing list; "mod" \- only subscribers may post, and messages are sent to the list owner for approval (moderation)\&. .RE .PP UNICODE=\fIflag\fR .RS 4 Accept mailing list messages with Unicode\-formatted headers\&. The default setting of 0 rejects messages with Unicode headers, and rejects subscription requests from E\-mail addresses with Unicode mailbox names\&. .sp Most mail servers on the Internet do not implement support for Unicode messages at this time\&. Accepting a Unicode message and redistributing it to a mailing list results in delivery failures to all mailing list subscribers that do not implement Unicode support, so by default this setting is turned off\&. Set UNICODE to 1 to accept mailing list messages with Unicode headers, and subscription requests from Unicode mailbox names\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br Subscription requests from E\-mail addresses that have an international domain name are always accepted if the internal domain name uses ASCII\-compatible encoding\&. .sp .5v .RE .RE .PP POSTARCHIVE=\fIoption\fR .RS 4 Set access to archived messages\&. \fIoption\fR is either: "all" \- Anyone can access the mailing list archive; or "subscribers" \- only subscribers can access the archive\&. The default is "all"\&. .RE .PP PURGEARCHIVE=\fId\fR .RS 4 Purge archived mailing list messages after \fId\fR days\&. The default is 0 days \- messages are never removed from the archive subdirectory\&. .RE .PP PURGEBOUNCE=\fId\fR .RS 4 Wait \fId\fR days for the probe message, that automatically unsubscribes undeliverable addresses, to bounce (default: 14 days)\&. Probe messages are sent three days (default) after the first message to an address bounces\&. .RE .PP PURGECMD=\fIh\fR .RS 4 Purge unconfirmed subscribe/unsubscribe requests after \fIh\fR hours (default: 48 hours)\&. .RE .PP REMODERATE=\fIh\fR .RS 4 Resend a moderation reminder after \fIh\fR hours (default: 12 hours)\&. .RE .PP REPORTADDR=\fIaddress\fR .RS 4 Mail daily reports of new and removed subscribers to this address\&. Must be set in order to receive reports\&. Provide an empty address to stop reporting\&. .RE .PP SIMPLECONFIRM=\fIn\fR .RS 4 If \fIn\fR is 1, confirmation requests may be acknowledged without adding \(lqyes\(rq to the subject line\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br The text in sub\&.tmpl, unsub\&.tmpl, and help\&.tmpl may need adjusting\&. .sp .5v .RE .RE .PP SUBSCRIBE=\fIoption\fR .RS 4 Set subscription options\&. \fIoption\fR is either "all", meaning that anyone can subscribe, or "mod", meaning moderated subscription requests, where all subscription requests are sent to the mailing list owner for approval\&. The default is "all"\&. .RE .PP STARTPROBE=\fIn\fR .RS 4 Send a probe to a bouncing address \fIn\fR days after receiving the first bounce\&. Basically this means that an address must bounce for at least \fIn\fR days before it gets a probe message\&. The default is 3 days\&. .RE .PP Option names and settings are case sensitive\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .PP If you set up a digest list, you MUST set identical POSTARCHIVE option for both the main list and the digest list\&. .sp .5v .RE .SS "DISPLAYING A SUBSCRIPTION RECORD" .PP The info command displays the subscription record for the requested address: .sp .if n \{\ .RS 4 .\} .nf couriermlm info \fIdirectory\fR \fIuser@domain\fR .fi .if n \{\ .RE .\} .PP This displays the subscription record for "\fIuser@domain\fR", which typically consists of a copy of the initial subscription request, and confirmation\&. .SS "SENDING MESSAGES TO THE MAILING LIST" .PP The \fImsg\fR commands reads an E\-mail message on standard input, and mails the contents of the message to the mailing list\*(Aqs subscribers\&. .PP If the POST option is set to "subscribers", the message is rejected unless the address in its From: header is a subscriber to this mailing list\&. .PP Control files headeradd and headerdel are read, and are applied to the message, as described previously\&. .SS "MAILING LIST COMMANDS" .PP Mailing list commands can be sent via E\-mail to \fBcouriermlm\fR by sending a message to \&. The "default" \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 file runs \fBcouriermlm\fR to receive mail for all addresses of this form\&. .PP \fBcouriermlm\fR reads the \fBDEFAULT\fR environment variable, which is set by the Courier mail server, that indicates the specific command\&. The available commands are: .PP help .RS 4 A simple autoresponder\&. \fBcouriermlm\fR mails the sender the contents of the help\&.tmpl file\&. .RE .PP subscribe .RS 4 A request to subscribe to this mailing list\&. \fBcouriermlm\fR reads the sender\*(Aqs address in order to determine what address to subscribe\&. .RE .PP subscribe\-\fIname=domain\fR .RS 4 Explicitly specify the address to subscribe to the mailing list, instead of using a return address\&. In the previous example, sending a message addressed to would result in a subscription request for \&. Any unusual punctuation characters in the address must be replaced by a plus sign, followed by two hexadecimal digits that represent the punctuation character\*(Aqs ASCII code\&. .RE .PP unsubscribe .RS 4 A request to unsubscribe to this mailing list\&. .RE .PP unsubscribe\-\fIname=domain\fR .RS 4 Explicitly specify the address to unsubscribe from the mailing list\&. .RE .PP alias\-subscribe .RS 4 Set up a write\-only alias (see below)\&. .RE .PP alias\-subscribe\-\fIname=domain\fR .RS 4 Explicitly specify the subscriber address for which a write\-only alias needs to be set up\&. .RE .PP There are other commands that are used internally for maintaining the mailing list\&. .SS "WRITE\-ONLY ALIASES" .PP Write\-only E\-mail aliases can send messages to the mailing list, but they do not receive any mailing list messages themselves\&. A write\-only alias can be set up by any subscriber\&. Only one write\-only alias is allowed per subscribed E\-mail address\&. Write\-only aliases are not needed for mailing list that has the POST=all option set\&. .PP To set up a write\-only alias, the subscriber sends a \fBcouriermlm\fR alias\-subscribe command\&. The subscriber\*(Aqs E\-mail address can be explicitly specified in a similar manner as the subscribe command\&. .PP The subject line of the E\-mail message must contain the E\-mail write\-only alias to be set up, and nothing else\&. \fBcouriermlm\fR responds with a confirmation request, just like when subscribing to the list\&. This request must be acknowledged in the same way\&. .PP A subscriber\*(Aqs write\-only alias can be changed at any time by repeating this procedure\&. The new alias replaces the previous one\&. To prevent abuse, there\*(Aqs a limit of at most one alias\-subscribe command every 30 minutes\&. .PP Leave the subject of the E\-mail message blank in order to remove an existing write\-only alias, .SS "SETTING UP A MAILING LIST DIGEST" .PP \fBcouriermlm\fR supports mailing list digests\&. Mailing list digests are created as a second, separate, mailing list\&. The \fIcreate\fR command initializes a second mailing list directory, and then additional configuration takes place which links the main mailing list to the digest list\&. .PP If the mailing list address is list\-address@example\&.com, the address of the digest version of the mailing list is usually list\-address\-digest@example\&.com, but it doesn\*(Aqt have to be this address\&. The only requirement is that the directory for the digest version of the mailing list must reside on the same file system as the directory for the mailing list itself, and both must be owned by the same userid\&. .PP To set up a mailing list digest, first proceed with the steps to create the mailing list itself\&. After the mailing list is created and configured, proceed as follows: .PP Create the digest list directory .RS 4 Execute the \fIcreate\fR command to create the digest version of the list: .sp .if n \{\ .RS 4 .\} .nf /usr/bin/couriermlm create \e \fI/path/to/digest/list/directory\fR \e ADDRESS=\fIlist\-address\-digest@example\&.com\fR .fi .if n \{\ .RE .\} Use the full pathname to the mailing list directory, and the address of the digest version of the mailing list\&. .RE .PP Configure the digest list .RS 4 Execute the \fIset\fR command to set any appropriate options for the digest list\&. There one important differences to note: messages are not posted to the digest list directly, so there is no moderation option, however the digest version of the list can have moderated subscription requests\&. .RE .PP Link the two lists .RS 4 Set the DIGEST option for the main mailing list, specifying the directory of the digest list\&. This keyword lets \fBcouriermlm\fR know that a digest version is available\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br You MUST set identical POSTARCHIVE option for both the main list, and the digest list\&. .sp .5v .RE .RE .PP Create \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files .RS 4 It is necessary to create \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files for the digest list just like the main list, except for some important differences, which are noted below\&. .RE .PP Create \fBcron\fR(8) jobs .RS 4 It is also necessary to create cron jobs for the digest list exactly like the main list, to run the \fIhourly\fR and \fIdaily\fR cleanup\&. It\*(Aqs possible to set up one set of cron jobs to run \fIhourly\fR and \fIdaily\fR cleanups consecutively for both lists\&. .RE .PP Create a \fIdigest\fR \fBcron\fR(8) job .RS 4 The \fIdigest\fR creates and distributes the digest version of the list\&. It can be executed by a \fBcron\fR(8) job, or the command can be executed manually\&. .RE .PP The main mailing list is supported by three \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files, as previously described: the posting address, the owner forwarding address, and the default address that handles administrative control messages\&. In the following example, the names $HOME/\&.courier\-list, $HOME/\&.courier\-list\-owner, and $HOME/\&.courier\-list\-default are used to represent each one of these files, and the following names are used to represent the \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 files that correspond to the digest version of the mailing list: $HOME/\&.courier\-list\-digest, $HOME/\&.courier\-list\-digest\-owner, and $HOME/\&.courier\-list\-digest\-default\&. Note, however, that the digest version of the mailing list can have any name, not necessary the name of the list, followed by "digest"\&. .PP The contents of both $HOME/\&.courier\-list $HOME/\&.courier\-list\-digest must be the same\&. Sending a message to the digest address should really end up sending a message to the main mailing list\&. Do not put the address of the digest mailing list directory in $HOME/\&.courier\-list\-digest, instead specify the address of the main mailing list directory\&. Just copy $HOME/\&.courier\-list to $HOME/\&.courier\-list\-digest\&. .PP However, the contents of $HOME/\&.courier\-list\-digest\-default must specify the directory of the digest version of the mailing list\&. The digest list is managed separately from the main list, it has its own subscriber list that is separate from the list of subscribers to the main list\&. $HOME/\&.courier\-list\-default can simply be copied to $HOME/\&.courier\-list\-digest\-default, then the directory can be changed in the latter\&. .PP $HOME/\&.courier\-list\-owner may use the same mailing list owner address as $HOME/\&.courier\-list\-digest\-owner, or it can specify a different address\&. The both the digest and the main mailing list can have the same mailing list owner/moderator, or have a different owner/moderator\&. .PP The following command must be executed in order to link the two lists together: .sp .if n \{\ .RS 4 .\} .nf /usr/bin/couriermlm set \e \fI/path/to/main/list/directory\fR \e DIGEST=\fI/path/to/digest/list/directory\fR .fi .if n \{\ .RE .\} .PP Setting the DIGEST option on the main list lets \fBcouriermlm\fR know that a digest version is available\&. The DIGEST option must either use an absolute pathname, or a pathname that\*(Aqs relative to the main list directory (NOT the current directory)\&. .PP When the DIGEST option is set, messages are simultaneously distributed to the mailing list\*(Aqs subscribers, saved in the archive subdirectory of the main list, then placed in the modqueue subdirectory of the digest list\&. Digest list do not employ moderation \-\- any moderation must take place on the main list \-\- so the modqueue subdirectory is recycled to compile individual messages for the digest\&. .PP Finally, something needs to be done in order to actually distribute the digest to the digest list\*(Aqs subscribers\&. This is done by running the following command: .sp .if n \{\ .RS 4 .\} .nf /usr/bin/couriermlm digest \fI/path/to/digest/directory\fR \fIN\fR \fIH\fR .fi .if n \{\ .RE .\} .PP This command creates a digest, and sends it out\&. The \fIN\fR and \fIH\fR arguments are optional\&. The digest is created only if there\*(Aqs at least \fIN\fR messages that are waiting to be sent in the digest list, or if the oldest message is at least \fIH\fR hours old\&. Both options default to 0, so the default behavior is to send a digest with all unsent messages\&. .PP Note that when the digest is created, ALL unsent messages are packaged into the digest, even if some messages are more recent than the time interval specified by the \fIH\fR option\&. A \fBcron\fR(8) job can be set up to run the \fIdigest\fR command, or run it manually\&. .PP \fBcouriermlm\fR automatically provides the From:, To: headers on a message digest\&. Additional headers may be specified by the headeradd file in the digest list directory\&. The headerdel file has no effect\&. Note that the individual messages in the digest are copies of the messages from the main mailing list, and thus have the headeradd and headerdel headers processed from the main mailing list directory\&. .SH "BUGS" .PP \fBcouriermlm\fR will not work if the Courier mail server\*(Aqs support for \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2 extensions is disabled\&. .SH "SEE ALSO" .PP \m[blue]\fB\fBcourier\fR(8)\fR\m[]\&\s-2\u[7]\d\s+2, \m[blue]\fB\fBdot-courier\fR(5)\fR\m[]\&\s-2\u[1]\d\s+2, \m[blue]\fB\fBwebmlmd\fR(1)\fR\m[]\&\s-2\u[3]\d\s+2\&. .SH "AUTHOR" .PP \fBSam Varshavchik\fR .RS 4 Author .RE .SH "NOTES" .IP " 1." 4 \fBdot-courier\fR(5) .RS 4 \%http://www.courier-mta.org/dot-courier.html .RE .IP " 2." 4 Setting up a mailing list digest .RS 4 \%http://www.courier-mta.org/#digest .RE .IP " 3." 4 \fBwebmlmd\fR(1) .RS 4 \%http://www.courier-mta.org/webmlmd.html .RE .IP " 4." 4 Mailing list commands .RS 4 \%http://www.courier-mta.org/#command .RE .IP " 5." 4 \fBlocalmailfilter\fR(7) .RS 4 \%http://www.courier-mta.org/localmailfilter.html .RE .IP " 6." 4 Write-Only Aliases .RS 4 \%http://www.courier-mta.org/#wonly .RE .IP " 7." 4 \fBcourier\fR(8) .RS 4 \%http://www.courier-mta.org/courier.html .RE