This article shows a step-by-step example to work with mailing lists in AXIGEN
Solution
To implement a mailing list using AXIGEN you need to complete these steps:
- Creation of the mailing list.
- Configuration of the mailing list.
- [optional] Management of the mailing list.
Creation of the mailing list.
The recommended method for list creation is using the WebAdmin service. Log in as the user "admin" on your server. Select the "Lists" tab, and click on the "Show lists" button for the domain which you want to create the list in (example.org in this example). Type the name of the list (just type "news" for this example) in the "Mail-list name" text field, and click "Add new list".
Configuration of the mailing list.
To configure the mailing list you just created you need to select the "Lists" tab, and click on the "Show lists" button for the domain which contains the list you just created. Identify the list and select the "Edit" button. This will take you to the "General" tab in the list's options. In the "name" field you will find the value you assigned to the list when you created it earlier ("news" in this case). The name of the list is in fact the address where users will find the list. If a user wants to send an e-mail he will use the address "news@example.org". The general rule is:
<list.name>@<domain.name>
Just underneath the list name you have the services enabled for the list. The password is used to log into the mailing list account and manually subscribe users that make requests. We will cover this later on. The "description" field gives the detailed name of the list. It is the description the users see when they recive an e-mail from the list. Use "News Mailing List" for this example. The three following fields are generated automatically based on the name you chose for your list. They are used to subscribe users, unsubscribe them and recive requests. The default values are commonly used and easy to remember. The "Enabled RCPTs" section lets you select what recipients are active for the list. Leave all of them activated for the purpose of this example:
subscribeRcpt: news-subscribe
unsubscribeRcpt: news-unsubscribe
requestRcpt: news-request
The rule used to generate these fields is as follows:
<list.name>-subscribe@<domain.name>
<list.name>-unsubscribe@<domain.name>
<list.name>-request@<domain.name>
To automatically subscribe users to the list select the "adminConfirm" option and change it to "no". You then have to fill in the "Request needs confirmation" field as follows:
Subject:%i Subject text From: %l-request@%d To: %e
Do not use any quotation marks. The only thing you can edit here is "Subject text". The fields must be filled in using standard mail format. The "%<letters>" are variables used to generate addresses and other usefull strings. For example:
%l - this is the mailing list's name value. In this example after the "From:" the line will expand to "news-request"
%d - this expands to the domain name, "example.org".
So, when generating the e-mail you get the line: "From: news-request@example.org" which is exactly what we want to get. The complete list of macros that can be used can be found here. You are also not restricted only to the the "Subject", "From" and "To:" fields of the mail header. You can use complex expressions to generate responses based on the result you desire. The only thing we really need here is the "%i" macro and the "From:" field. The "%i" macro generates a validation code used to auto-subscribe the sender. This has to be in the message subject. The "From:" field is important because the user sends his subscription email to "news-subscribe@example.org" and recives a message back containing the validation code. He then has to reply to that e-mail in order to complete the subscripton. The "From" address would be left blank if we don't specify otherwise. Also important is that we make the user reply to "news-request" not to the original "news-subscribe" address. The request we pass to the list is actually the code generated before. This process can be described as:
(name in the subject) 1. user ------> news-subscribe@example.org (code and new reply address) 2. news-subscribe@example.org ------> user (code) 3. user ------> news-request@example.org (welcome message) 4. news@example.org ------> user
Users have to send their name in the subject of the first e-mail. This will become their username in the list's users database. Then they have to reply to the message they recive to confirm their adherence to the list. The rest is done by the list.
[optional] Management of the mailing list
To manually manage the mailing list go to the "Advanced" tab while editing your list. You have to select the "adminConfirm" option and change it to "yes". All subscribers will then need to be accepted by the mailing list administrator in order to join the list. They need to send an e-mail to "news-subscribe@example.org" with their name as the subject. Then, the administrator will have to log into the list account ("news" for us) and check if there are new subscription requests. New subscription requests can be found in the "Requests" folder on the account. To accept a subscription the e-mail has to be manually moved to the "ConfirmedRequests" folder.