Mailing lists - University of Auckland

How do I link to external member lists?

There are several different types of external datasources you can use for mailing list membership. You can attach to zero or more external sources, of any type; if you view the membership list, it will tell you which source(s) a member has been obtained from.

Using external sources does not prevent you from also allowing users to self-subscribe or unsubscribe from the list, according to the subscription scenario you have chosen. Members pulled from an external source who unsubscribe are added to the exclusions list.

Available external datasource types are:

  • LDAP lookups: This can be a NetAccount group on the EC LDAP server, or any other lookup from another server.
  • SQL Queries: Currently, we can support MySQL, Postgres, and Microsoft SQL Server (though this latter requires some additional work to be done by the ListMaster)
  • Text lists via HTTP: We can retrieve a list of members from an HTTP or HTTPS URL, and add these to the mailing list.
  • Another Sympa mailing list: You can reference another Sympa mailing list - even on another server - and pull its membership into this list. Note this is not the same as chaining the lists; it is a copy of the membership list.

How often is the list updated?

By default, external datasources are checked every day. This is because NetAccount typically updates its LDAP groups on a daily basis. However, additional updates may be done if requested by the list owner or moderator via the web interface, or if the applications deems it to be necessary.

You can (if you are a privileged list owner) reduce the TTL and Distribution TTL for a list in the list configuration. This will cause the list membership to be automatically updated from the detasources more frequently; however, this should only be done if necessary, since it can place a higher load on the Sympa server.

Linking to an LDAP source

To obtain data from an LDAP source, you will need to give not only the server name, but a set of credentials to authenticate with. If you wish to use SSL (recommended) you can specify use SSL.

The extracted attribute is the LDAP attribute holding the email address; typically, this would be mail. Since this may be a multi-valued field, the selection (if multiple) option allows you to choose whether to add ALL values or just the first.

Finally, the gecos attribute specifies the descriptive name for this member; typically, this would be set to displayName. You can leave this blank if you wish; it will just result in the user record not having a name.

You need to specify your LDAP filter string in LDIF format. If you are not familiar with this, then you can read up on it elsewhere as it is a rather large topic. An example search string would be:

(groupMembership=cn=UniStaff,ou=ec_group,dc=ec,dc=auckland,dc=ac,dc=nz)

Standard credentials are available for most uses. Normally, for EC LDAP and NetAccount groups, you would want to use the following configuration options:

LDAP Query Inclusion
Short name: Netaccount groupname
Remote host: ldap-vip.auckland.ac.nz
SSL ciphers: ALL
Use SSL: yes
SSL Version: sslv3
Remote password: contact servicedesk
Remote user: cn=sympa,ou=webapps,ou=ec,o=uoa
Suffix: ou=ec_users,dc=ec,dc=auckland,dc=ac,dc=nz
Search scope: sub
Connection timeout: 600
Filter: (groupMembership=cn=Netaccount groupname,ou=ec_group,dc=ec,dc=auckland,dc=ac,dc=nz)
Extracted attribute: mail
Selection: first
Gecos attribute: displayName

Linking to a text source via HTTP

An external text file can be picked up via HTTP or HTTPS. If necessary, you can specify login credentials for standard HTTP authentication (not shibboleth or CoSign authentication though).

The file downloaded should be text, with one email address per line. Optionally, you can include a display name for the subscriber on the same line as their email address, after a space. For example:

sidney@auckland.ac.nz Sidney Bloggs

Linking to an SQL source

External SQL datasources need to be on a database for which we have the appropriate drivers. For the time being, this means one of

  • MySql: This is fully supported. Use driver mysql. Specify the servername, port, database name and credentials.
  • Postgres: This is fully supported. Use driver pgsql. Specify the servername, port, database name and credentials.
  • Microsoft SQL Server: This is supported via ODBC. Use driver ODBC, and specify the DSN in the Database Name field. Leave the Server Name, and Port blank. You will need to let ITS know the servername and database name so that a DSN can be defined on the system.

The first column returned will hold the email addresses; if a second column is returned, it will be assumed to hold the Subscriber Name. For future compatibility, it is Best Practice to label the two fields as mail and gecos respectively.

Here is an example for a MySQL database:

SQL Query Inclusion
Database type: mysql
Remote host: myserver.auckland.ac.nz
Database port: 3306
Database name: mydb
Remote user: sympa
Remote password: xxxxxxx
SQl Query: SELECT DISTINCT `user_email` AS mail,`comment_admin` AS gecos FROM `member_table`

Here is an example for a Microsoft SQL Server database:

SQL Query Inclusion
Database type: ODBC
Database name: mydsn
Remote user: sympa
Remote password: xxxxxxx
SQl Query: SELECT user_email AS mail, comment_admin AS gecos FROM member_table

Linking to another list

If you wish to include the members of another list, you should never make the other list a subscriber of your parent list. This can cause confusion, as well as have many problems with posting access rights on the sub-lists.

Instead, you should include the sub-list as an external datasource of your main list. Specify the list by its full name, listname@domainname, and the members will be copied into your parent list on a regular basis.


Top of page