PEP Based Mailing Lists
Please consider switching to our new and improved hosting service: Islandhosting.com
For support call:     778-410-2454

PEP Based Mailing Lists


The DISTRIBUTE action can be used to forward a message to a list of up to 10,000 recipients, but what if you want a more elaborate mailing list? One that lets people subscribe (with confirmation) and unsubscribe, among other things?

Well, it's possible to create a complex set of PEP rules that will handle all this for you. But to save you the work, we've created a set of rules already and all you have to do to set up your own mailing list is to specify a few settings, create three "canned" email messages, and include our ready-made rule set.

NOTE: this mailing list system requires that you have your own domain name!

For this example, let's say your domain name is "example.com" and you want to set up a mailing list called "TeaDrinkers". You start by adding something like this to your mailrule file:

ListName=teadrinkers
DomainName=example.com
SubjectTag=[TeaDrinkers]
AdminAddress=me@example.com
ListType=closed
ReplyToList=yes
KeepCopy=yes
Subscribe=yes

include mailinglist

Listname is the name of your mailing list. One word, all lower case. It will form the initial part of the various email addresses that are used to post, subscribe, and unsubscribe.

DomainName is one of your domain names. This setup requires that you use one of your own domains, not one of ours.

SubjectTag is a keyword or phrase that will be added to the Subject: line of any messages that get posted to the list. Set this to "none" if you don't want to use this feature.

AdminAddress is the email address of the list admin (you). Email from this address can always be posted to the list, even if it's not an actual member of the list. It is also included as a contact address in the message headers.

ListType can be "oneway" for a list that ONLY the admin can post to, "closed" for a list that the admin plus subscribers are allowed to post to, or "open" for a list that ANYONE can post to (subscribed or not).

ReplyToList should be "yes" if you want replies to list messages to go back to the list, or "no" if you want replies to go back to the original sender.

KeepCopy should be "yes" if you want to keep a copy of all posted messages, or "no" if you don't want a copy.

Subscribe should be "yes" if you want to allow people to subscribe themselves to the list, or "no" if you don't want to allow unattended subscriptions. If you set this to "no" then the only way to get on the list is to have you add the addresses manually.

You will also need to create three canned email messages:

teadrinkers.confirm is a reply message that gets sent back to the sender when they send a subscription request. It should look something like this:

Reply-to: teadrinkers-subscribe/{PEP_ID}@example.com
From: teadrinkers-subscribe/{PEP_ID}@example.com
To: {senderaddress}
Subject: Subscription Request

We have received a request from [{IP}] to add the email address
{senderaddress} to the TeaDrinkers mailing list.

If this was you, please reply to this message to complete the
subscription process.  If it was NOT you, ignore this message
and you will NOT be added to the list.

teadrinkers.subscribed is a reply message that gets sent back when a subscription is successful. it should look something like this:

Reply-to: teadrinkers@example.com
From: teadrinkers@example.com
To: {senderaddress}
Subject: Welcome to TeaDrinkers

Welcome to TeaDrinkers!

You have successfully subscribed the following address:

{senderaddress}

teadrinkers.unsubscribed is similar to the file above, but it is sent when a person successfully Unsubscribes.

The system will also create a few files when the first person subscribes:

teadrinkers.members contains the list of subscribers, with one email address per line. You can edit this file directly, but it should contain no blank lines, no comments, and only pure email addresses.

teadrinkers.posters is an optional list of email addresses (similar to the members list) that are allowed to post to the list, even if it's a "oneway" list. These addresses do not need to be subscribed to the list, unless they also want to receive copies of posted messages.

teadrinkers.log is a log file that tracks subscriptions and unsubscriptions.

And finally, it creates temporary files in your "temp" directory (which must exist) to track pending subscription confirmations. You will want to periodically delete old files.

All the "magic" happens inside the "mailinglist" rule set. Although you don't need to know what's in there in order to create and use mailing lists, those that are interested in how it works and possibly in customizing it can get a copy here.

Note: If you have a closed address mapping file on your domain, a closed map file is one that has the last entry of *:! in your map.domainname.com file, then you will need to make sure that the list email address is mapped to the account containing the mailing list. Eg, the teadrinkers mailing list in this example is configured in the mailrule in the account iliketea@islandnet.com so in the map.example.com file we add before the last line of *:! the following entry:

teadrinkers*: >iliketea
*:!

This means that anything addressed to teadrinkers@example.com, teadrinkers-subscribe@example.com or teadrinkers-unsubscribe@example.com and emails including the teadrinkers-subscribe/{pepid}@example.com will be directed to the mail account iliketea@islandnet.com so the mailing mailrule can be triggered.

Useful additional information:

Turn on PEP Logging by adding "enable logging" to the beginning of the mailrule will create entries in a pep.log file whenever a mailrule is triggered so you can debug the mailing list.

You can manually add or remove email addresses from the listname.members file , be sure the email addresses are on separate lines and that your adding them with the permission of the email owner, adding emails without permission means you will be spamming the recipients and if Islandnet.com receives complaints it may result in account suspension.

On your email try and state how someone can subscribe and unsubscribe to the mailing list so people have an option to leave the list if they want.

Example:

----------------------------------------------------------
To subscribe to the Tea Drinkers mailing list email:
 teadrinkers-subscribe@example.com
To unsubscribe to the Tea Drinkers mailing list email: 
 teadrinkers-unsubscribe@example.com
To request manual removal or if you have questions email:
 info@example.com
----------------------------------------------------------