- To restrict posting to a list from a certain address, put the following in the listdirectory/editor file:
|/usr/bin/ezmlm-reject |([ $SENDER = validaddress@domain ] && exit 0 ; sed '1,/^$/s/^\(Subject: \)/\[INTERCEPT] /' | forward validaddress; exit 99) |/usr/bin/ezmlm-send '/u/validaddress/brain' |/usr/bin/ezmlm-warn '/u/validaddress/brain' || exit 0- Another way to restrict posting to a list from a certain address, using the listdirectory/editor file:
|egrep "^From:.*validaddress@validdomain" || (echo "This is an outgoing list only"; exit 100) |.... (keep the standard lines)....- To create a backdoor address for mailing to a mail list (for example, for the list alist@domain.net posting will be done through alist-secret@domain.net):
- Create a link .qmail-alist-secret to alist/editor.
- Then, add the word to to the alist/headerremove file. This ensures that the secret address is removed from the message on posting. Also, you can add return-path, return-receipt-to, content-length, from (if required), received, x-mailer and x-originating-ip to the same file.
- Then, add To: alist@domain.net (and From: alist@domain.net is it was removed above) to the alist/headeradd file.
- Finally, link alist/.qmail to alist/owner, or to contain any delivery instructions for the owner or moderator, or even to a autoresponder. So, any mail sent to the secret address will be posted to the list, with the secret removed, while any mail sent to the list will be forwarded to the owner.
ezmlm mailing list commands by mail
ezmlm has a different address for each command. In essence, the address is the list name and the command. This is straight forward to interpret and therefore very fast. It also makes it very easy to send commands from the command line without having to worry about the subject and the message body (which are ignored).
Messages to the list address itself are sent to all subscribers and should never be used for administrative requests. If you have forgotten everything, send a message to mailinglist-help@example.org for the list mailinglist@example.org. If the instructions returned do not help you solve the problem, send a message to mailinglist-owner@example.org for human help, forwarding a message from the list and including any relevant information.
If you want to interact administratively with the ezmlm mailing list mailinglist@example.org, send an empty message (contents and subject are ignored) to mailinglist-command@example.org, replacing ``command'' with the desired command. For some commands, you can add arguments.
Destination address Result mailinglist-subscribe@example.org Subscribe sender. ezmlm will send you a confirmation request, and once you reply to it a message confirming that you are a subscriber. mailinglist-subscribe-user=gol.com@example.org Subscribe user@gol.com. Here the default subscriber address (the one you send from) is overridden by an argument to the -subscribe command. To subscribe any address of type user.name@host.dom just replace the ``@'' in the address with ``='' and add it after a hyphen to the command. In this case mailinglist-subscribe-user.name=host.dom@example.org. Of course, ezmlm will ask user.name@host.dom to confirm the request. mailinglist-unsubscribe@example.org Unsubscribe sender. ezmlm will send a confirmation request to your address and remove the address once you reply. mailinglist-unsubscribe-user=gol.com@example.org Unsubscribe user@gol.com. mailinglist-get.123@example.org Get message 123 from the archive. If you specify a number that is larger than the highest message number in the archive, you'll receive the latest message.
ezmlm mailing list commands on the command line
To create a list ezmlm-make [-aApP] dir dot local host -a (default) The list is archived (the file dir/archived is created, making ezmlm-send archive each message in dir/archive) -A List not archived -p (default) The list is public (the file dir/public is created) -P The list is private, subscriptions and unsubscriptions can only be done trough ezmlm-sub and ezmlm-unsub dir Absolute pathname for directory where the list is to be created dot Dot-qmail file controlling the list (the files dot, dot-owner, dot-return-default and dot-default are created in the given path) local List name host List host
Typical use Normal user
(logged in as himself)ezmlm-make ~/SOS ~/.qmail-sos joe-sos isp.net Creates the joe-sos@isp.net list Alias ezmlm-make ~alias/SOS ~alias/.qmail-sos sos isp.net
chown -R alias.qmail ~alias/SOSCreates the sos@isp.net list
List the subscriptions to a list ezmlm-list dir dir Absolute pathname of the directory where the list resides
To subscribe someone to the list ezmlm-sub dir box@domain ... dir Absolute pathname of the directory where the list resides box@domain Address(es) to subscribe to the list
To unsubscribe someone from the list ezmlm-unsub dir box@domain ... dir Absolute pathname of the directory where the list resides box@domain Address(es) to unsubscribe from the list
file or directory Function Used by... DIR/ Directory where the list resides DIR/.qmail-default Usually links to DIR/manager qmail system DIR/.qmail-owner Usually links to DIR/owner qmail system DIR/.qmail-return-default Usually links to DIR/bouncer qmail system DIR/.qmail Usually links to DIR/editor qmail system DIR/Log Advisory (not guaranteed to be complete) log file of subscriptions and unsubscriptions to the mailing list DIR/Mailbox The Mailbox file for the list owner DIR/archive/ Contains the message archive of the list ezmlm-manage DIR/archived The list will archive the messages if the file is present ezmlm-send DIR/bounce/ Archives bounced messages to subscribers. If a distribution bounce here is more than 10 days old, the bounce will be deleted, and a bounce warning will be issued. Is a bounce warning here is more than 10 days old, the bounce is deleted and a probe is issued. Bounced probes will remove the subscriber ezmlm-warn DIR/bouncer Linked from the .qmail files, usually has instructions to handle bounce messages, by invoking ezmlm-return and ezmlm-warn DIR/editor Linked from the .qmail files, usually has instructions to invoke ezmlm-send and ezmlm-warn DIR/headeradd All new fields contained here are added to the message ezmlm-send DIR/headerremove All fields listed here are removed from the message ezmlm-send DIR/inhost The list management accepts commands if this file's contents match the message sender domain part of the address (see $HOST) ezmlm-manage DIR/inlocal This file contains the list name ezmlm-manage DIR/key Random garbage used in generating confirmation numbers ezmlm-send DIR/lock Empty file, locked by any program that read or writes the subscriber lists or adds messages to the archive DIR/mailinglist The contents of this file is copied into a Mailing-List field in the header of the response ezmlm-manage,
ezmlm-sendDIR/manager Linked from the .qmail files, usually has instructions to handle administrative messages, by invoking ezmlm-manage and ezmlm-warn DIR/outhost Contain the outgoing domain of the mailing list ezmlm-manage,
ezmlm-sendDIR/outlocal Contain the outgoing name of the mailing list ezmlm-manage,
ezmlm-sendDIR/owner Linked from the .qmail files, usually has instructions to handle messages for the mailing list owner, such as storing incoming messages in DIR/Mailbox and invoking ezmlm-warn DIR/public The list will accept administrative requests such as subscribe if this file is present. Also controls archive retrievals ezmlm-manage DIR/sublist Controls sublists, the first line is the name of the parent list ezmlm-send DIR/subscribers/ Contains the subscriber lists DIR/text/ Contains files used in response to administrative requests. The files here are processed so that
- !A
- is replaced in any file by the subscription address
- !R
- is replaced in sub-confirm and unsub-confirm by the destination address for the confirmation
ezmlm-manage DIR/text/bottom Text added at the end of each message (usually explaining use) ezmlm-manage DIR/text/bounce-bottom Text separating the bounce message from the received message ezmlm-manage DIR/text/bounce-num Text explaining that ezmlm has kept a list of bounced message numbers ezmlm-manage DIR/text/bounce-probe Text mentioning that a warning message has bounced ezmlm-manage DIR/text/bounce-warn Text mentioning that messages have been bouncing ezmlm-manage DIR/text/get-bad Text rejecting a bad archive retrieval request ezmlm-manage DIR/text/sub-bad Text rejecting a bad subscription confirmation number ezmlm-manage DIR/text/sub-confirm Text explaining how to confirm a subscription request ezmlm-manage DIR/text/sub-nop Text acknowledging subscribing for an address already on the list ezmlm-manage DIR/text/sub-ok Text acknowledging successful subscribing ezmlm-manage DIR/text/top Text added at the start of each message (usually introducing ezmlm) ezmlm-manage DIR/text/unsub-bad Text rejecting a bad unsubscription confirmation number ezmlm-manage DIR/text/unsub-confirm Text explaining the unsubscription procedures ezmlm-manage DIR/text/unsub-nop Text acknowledging unsubscribing for an address not on the list ezmlm-manage DIR/text/unsub-ok Text acknowledging successful unsubscribing ezmlm-manage
Given a list alist@domain.net, ezmlm accepts messages to the following addresses:
address handled by DIR/ which is linked to DIR/ actions taken alist@domain.net .qmail editor DIR/editor contains something similar to (paths omitted for clarity, DIR to be replaced by the directory of the list):
|ezmlm-reject
|ezmlm-send 'DIR'
|ezmlm-warn 'DIR' || exit 0Therefore, a message sent to the main address of the list is (trough ezmlm-reject) checked for conformity with the list. That means that (by default) it must not have a command in the subject (HELP, SUBSCRIBE or UNSUBSCRIBE). The possible options for ezmlm-reject are:
-c Commands not permitted in the subject (default) -C Commands permitted in the subject -s Must have a non-empty subject (default) -S May have a empty subject Then, is the message is not rejected, ezmlm-send sends it to the mailing list, its sole argument being the full path to the directory where the list lives.
Finally, ezmlm-warn is executed, which scans the bounce directory and checks for messages bounced more that 10 days ago, and so on. This phase is not directly connected to the message, it just ensures the maintenance of the list in terms of bounces and so on.
alist-subscribe@domain.net .qmail-default manager alist-sc.cookie@domain.net alist-subscribe-user=address@domain.net alist-unsubscribe@domain.net alist-uc.cookie@domain.net alist-unsubscribe-user=address@domain.net alist-get.number@domain.net alist-anything@domain.net DIR/manager contains something similar to:
|ezmlm-manage 'DIR'
|ezmlm-warn 'DIR' || exit 0Therefore, the message is handed to ezmlm-manage. This analyzes the local part of the destination address (in this case, alist-subscribe, alist-subscribe-user=address, etc) and acts on it. The possible formats for the local part of the address are:
Local part Target Action alist-subscribe message sender Generates a subscription confirmation message, sent from alist-sc.cookie@domain.net, where cookie encodes the target. This message if not generated unless a DIR/public file exists alist-subscribe-user=address user@address alist-sc.cookie decoded cookie The target is added to the list of subscriptions alist-unsubscribe message sender Generates a unsubscription confirmation message, sent from alist-sc.cookie@domain.net, where cookie encodes the target. This message if not generated unless a DIR/public file exists alist-unsubscribe-user=address user@address alist-uc.cookie decoded cookie The target is removed from the list of subscriptions alist-get.number message sender The message with the given number is retrieved from DIR/archive and forwarded to the target alist-anything message sender A help message is sent to the target Finally, ezmlm-warn is executed, as above.
alist-return-@domain.net .qmail-return-default bouncer alist-return-msg-@domain.net alist-return-msg-user=address@domain.net alist-return-warn-cookie-user=address@domain.net alist-return-probe-cookie-user=address@domain.net DIR/bouncer contains something similar to:
|ezmlm-warn 'DIR' || exit 0
|ezmlm-weed
|ezmlm-return 'DIR'Therefore, ezmlm-warn is called, to scan the bounce directory as above.
Next, the incoming message is processed by ezmlm-weed, which discards it if it looks like a MTA warning message.
If it doesn't look like a MTA warning message, it is passed to ezmlm-return. This analyzes the local part of the destination address (in this case, alist-return-, alist-return-msg-user=address, etc) and acts on it. The possible formats for the local part of the address are:
Local part Target Action alist-return- none Ignored, a help message or subscription acknowledgment bounced alist-return-msg- as per message parsing This is a distribution bounce, the message number msg bounced from the target. Will store the message in the DIR/bounce directory alist-return-msg-user=address user@address alist-return-warn-cookie-user=address user@address This is a warning bounce, a warning from ezmlm-warn bounced. No action will be taken, as the original bounced message will be in DIR/bounce and aging. cookie will be validated. alist-return-probe-cookie-user=address user@address This is a probe bounce, a probe from ezmlm-warn bounced. The target will be removed from the list. cookie will be validated to ensure that this is not a spoofed message. alist-owner@domain.net .qmail-owner owner DIR/owner contains something similar to:
DIR/Mailbox
|ezmlm-warn 'DIR' || exit 0So, a message to the owner of the list is stored in the Mailbox file, and then ezmlm-warn is called, as above.
Links | top |
- Author's home page
- See also Qmail home page
Last update: Wed, 2 Nov 2005 10:16:21 GMT | top |