LISTSERV at Work
AboutSubscriptionArchivesContact Us

Tech Tip (LISTSERV) – Issue 4 – 2005

Q: How can I add a one-click unsubscribe link to the footer of my LISTSERV list postings?

Answer by Liam Kelly
Senior Consulting Analyst
L-Soft

Most LISTSERV list owners are interested in making it as easy as possible for subscribers to join or leave their lists. Thanks to the new Embedded Mail-Merge (EMM) feature of LISTSERV 14.4, unsubscribing from a LISTSERV list has never been easier. List owners can now easily add a banner to each list posting containing a Web link that subscribers may click to be automatically removed from the list – even if they don't know under what email address they're subscribed. Adding an automatic unsubscribe link to list postings is a three step process:

1. Configure LISTSERV to use the new Embedded Mail-Merge feature
2. Configure the LISTSERV list to send list postings as mail-merged messages
3. Add a footer template that includes an unsubscribe URL

Let's look at each step in a bit more detail:

1. Configure LISTSERV to use the new Embedded Mail-Merge feature

Starting with LISTSERV 14.4, LISTSERV can use Embedded Mail-Merge (EMM) to send individualized messages to subscribers through any standard SMTP server. Enabling embedded mail-merge is as simple as adding a single setting to the LISTSERV site configuration file (SITE.CFG or go.user):

VM:

EMBEDDED_MAIL_MERGE = 1

VMS:

EMBEDDED_MAIL_MERGE "1"

unix:

EMBEDDED_MAIL_MERGE=1
export EMBEDDED_MAIL_MERGE

Win:

EMBEDDED_MAIL_MERGE=1

The LISTSERV site administrator will need to restart LISTSERV after adding this setting in order for it to take effect.

(Note that Mail-Merge is not available in LISTSERV Lite. For more information about Embedded Mail-Merge, see the LISTSERV 14.4 Release Notes at www.lsoft.com/manuals/1.8e/relnotes/LISTSERV14.4-Release-Notes.html).

2. Configure the LISTSERV list to send list postings as mail-merged messages

Now that the LISTSERV server is configured to use Embedded Mail-Merge, the list itself needs to be configured to take advantage of the mail-merge features of LISTSERV. Add the following line to the list header configuration:

* Mail-Merge=Yes

This tells LISTSERV to send all list postings as mail-merge jobs, meaning that the messages can now be customized for each individual recipient. (Incidentally, this also means that anyone who has permission to post to the list can also send a mail-merged message to the list. For more information about the list-based mail-merge features, see the LISTSERV Developer's Guide.)

3. Add a footer template that includes an unsubscribe URL

Now that the list is configured to use mail-merge, we need to add a personalized banner containing a unique unsubscribe link for each user. Suppose we want to include a bottom banner on each list posting. Either through the LISTSERV Web interface or through email, we would edit the BOTTOM_BANNER template, and include text with a specially formatted command ticket URL:

*******
To unsubscribe, click the following link:
&*TICKET_URL(LISTNAME,SIGNOFF);
*******

In the example above, replace 'LISTNAME' with the name of the list. LISTSERV will turn the string '&*TICKET_URL(LISTNAME,SIGNOFF);' into a specially formatted URL containing an encoded 'ticket' that is unique for each recipient of the message. When a subscriber clicks on the link in the bottom banner, they are automatically removed from the mailing list – even if the message has been forwarded from one email account to another.

If the mailing list is one that permits HTML postings to the list, it would also be a good idea to include a similar link in the bottom banner template for HTML postings (BOTTOM_BANNER_HTML):

*****
<p>
To unsubscribe, <a href="&*TICKET_URL(LISTNAME,SIGNOFF);">click here</a>.
</p>
*****

Again, substitute the name of the list for 'LISTNAME'.

There should now be an automatic unsubscribe link automatically added to the bottom of all list postings. This ultimately makes it easier for users to remove themselves from the list and reduces the need for list owner intervention in the process.

For more information about editing LISTSERV's mail templates, see the LISTSERV List Owner's Manual or the Web Interface task-oriented Wizard "Add banners to each message". For more information about command tickets, see the LISTSERV Developer's Guide. Both manuals are available online at: www.lsoft.com/resources/manuals.asp.

Copyright 2005 L-Soft