LISTSERV Tech Tip

Q: How can I configure my LISTSERV site to use different domain names for different types of lists?

By Jacob Haller
Senior Support Engineer, L-Soft

Organizations with multiple departments that are using a single LISTSERV installation to host all of their email lists may sometimes want to use different domain names for different types of lists. This tech tip shows how to accomplish this without the need for a separate LISTSERV installation. It also explains some of the limitations of this approach so that you can choose the method that's right for you.

In all of the following examples, we'll use listserv.example1.com as the main domain of the server, with lists.example2.com as the alternate domain that will be used for some of the mailing lists. While this example involves just two domains, the same techniques can be used to have mailing lists using as many different domain names as you like.


Limitations to This Approach

While the setup described in this tech tip can be useful, it does have some limitations.

1. It's not possible to have two mailing lists with the same name. With this setup, nameoflist@listserv.example1.com and nameoflist@lists.example2.com are just different email addresses to reach the same mailing list. They can't be used for separate lists with different configurations or subscribers.

2. Administrative mail (things like password confirmations, moderation requests and so on) will all come from the server's main domain. So, for instance, if someone sends a request to listserv@lists.example2.com, the response will still come from listserv@listserv.example1.com.

3. Users will be able to access the LISTSERV web interface using either domain, but some links and text will always refer to the main domain name found in the NODE site configuration setting. In general, links in administrative messages generated by LISTSERV will use the main domain name.

If these limitations are not acceptable, then the only workaround would be to have two separate LISTSERV installations, one for each domain.


Initial Steps

First, you will need to set up the new domain in DNS. Its setup should largely be identical to that of the existing domain. They should have identical A, MX, SPF and DMARC records. DKIM is slightly more complicated and will be discussed at the end of this tech tip.

Additionally, if mail that is sent to LISTSERV first passes through an anti-spam or other mail gateway, then make sure that the mail gateway is configured to accept mail for the new domain and that it will deliver such mail onward to the LISTSERV server.

If this is a LISTSERV for Unix installation, then you may also need to configure postfix (or whatever you're using to accept mail and deliver it to LISTSERV) to also accept mail for the new domain.


LISTSERV Sitewide Settings

Go to "Server Administration" > "Site Configuration" in the LISTSERV web interface and look at the NODE and MYDOMAIN settings. You will want these to be set to:


NODE: listserv.example1.com

MYDOMAIN: listserv.example1.com lists.example2.com



The NODE value is the primary domain that LISTSERV uses to identify itself, while MYDOMAIN contains a space-separated list of domains for which LISTSERV should accept mail – with the NODE domain listed first.

If there are additional domains listed in MYDOMAIN already, then you don't have to remove them. Instead, just make sure that the new domain is also listed and that the NODE domain is the first entry in the setting.

After making any necessary changes, restart LISTSERV. If this is a LISTSERV for Windows installation, then you will also need to restart the LISTSERV SMTP Listener services, which you can find in the Windows Services control panel.

At this point, try sending a plain-text message to listserv@lists.example2.com with help in the body of the message. You should get a response back from LISTSERV in short order. (The response will be from the old domain.) If you get a delivery error, or don't get a response at all, then don't proceed until you've figured out why the mail isn't getting through.


Configuring Mailing Lists to Use the New Domain

At this point, the new domain has been set up. LISTSERV has been configured to accept mail for it, and you've verified that you can successfully send mail to the new domain. You can now configure a mailing list to identify itself using the new domain by adding the following to its configuration:


List-Address= nameoflist@lists.example2.com



Once this setting is in place, mail distributed to the mailing list will have nameoflist@lists.example2.com in the "To" header, with similar changes (where appropriate) to the "Sender" and "Reply-To" headers. If it's appropriate to do so, you can send a test message to the mailing list to verify that everything is working as desired.

Important Note: If you later decide to clone this mailing list, make sure to update the "List-Address" setting for the new list to reflect the new mailing list's name. Otherwise, LISTSERV will try to identify both the old and new mailing lists using the old mailing list's name, which will cause various problems.

If you find yourself in this situation, contact L-Soft support, and include the output of the LISTS command under "Server Administration" > "LISTSERV Command".


Special Considerations with DKIM

If LISTSERV is already set up to sign messages via DKIM, then you'll need to configure it to also sign for the new domain name. Section 12 of the LISTSERV Advanced Topics Manual, has all of the details on how to do this.

After following the instructions in section 12.1 and 12.2 for the new domain, note that, per section 12.3, you will need to create a new .dkim file that will contain the private key for the new domain. You can name it whatever you want. If the new key is for the domain lists.example2.com, then naming it something like lists-example2.dkim might make sense. Make sure to use the new domain in the first line of this file, as described in the documentation above.

Once this file is created, go to "Server Administration" > "Site Configuration" in the LISTSERV web interface and click on the DKIM tab. Once you're there, click on the DKIM_SIGN variable. It most likely currently looks something like:


DKIM_SIGN: listserv.example1.com



Add the new domain name, and the name of the .dkim file that should be used to sign for it, for example:


DKIM_SIGN: listserv.example1.com lists.example2.com(lists-example2)



The above setting tells LISTSERV to use default.dkim to sign for listserv.example1.com, and lists-example2.dkim to sign for lists.example2.com.

Once the DNS entries are set up, you've created the .dkim file, and DKIM_SIGN has been configured, you can restart LISTSERV and check its log file. You should see something like:


14 Aug 2023 15:49:10 Loading DKIM private keys...
14 Aug 2023 15:49:10 -> Loaded DEFAULT (d=LISTSERV.EXAMPLE1.COM; s=DEFAULT; RSA-1024)
14 Aug 2023 15:49:10 -> Loaded LISTS-EXAMPLE2 (d=LISTS.EXAMPLE2.COM; s=DEFAULT; RSA-1024)
14 Aug 2023 15:49:10 DKIM support enabled
14 Aug 2023 15:49:10 DKIM Accelerator enabled



If you see an error, or one of the keys is missing, then contact L-Soft support for assistance. Otherwise, try testing one of the mailing lists that is set up to use the new domain and verify that the signing is working as expected.



Next Steps










Do you like this type of content? Subscribe to the LISTSERV at Work newsletter.





LISTSERV is a registered trademark licensed to L-Soft international, Inc.

See Guidelines for Proper Usage of the LISTSERV Trademark for more details.

All other trademarks, both marked and unmarked, are the property of their respective owners.


Menu