[PREV] | [UP] | [NEXT]

Sympa has on our servers been replaced by Mailman, so both this installation text and the implementation in dischosting might not be 100% up to date!


Getting and Installing Sympa

The Sympa versions before 3.4.x do not include full ldap support with authenticated binds, so you need a newer one. If you use sources you can simply choose the right release, It also seems, that the implementation of Sympa has changed from version 3.x to version 4.x. At the moment we cannot confirm whether Sympa 4.x versions will work the same way, so we recommend staying with 3.x. if you are using a Debian install, you have to get Sympa as source from unstable with apt-get sourxce sympa and you will get the right release.

Postfix configuration

Change the alias maps for sympa:
virtual_alias_maps = ldap:aliases regexp:/etc/postfix/virtual-regex
alias_maps = hash:/etc/aliases,hash:/etc/mail/sympa_aliases,ldap:aliases
alias_database = hash:/etc/aliases,hash:/etc/mail/sympa_aliases

Those are pretty straightforward in the context: In addition to the virtual aliases (for users) we also need system internal aliases (like aliases for root). Note that also aliases that are stored in LDAP can be used for local delivery. The sympa_aliases file is a special case. We already defined a regular expression alias table above under the virtual delivery agent configuration. Now we need to cover the local side of the same thing: Mailinglists. We will revisit that again below. The normal /etc/aliases file should only contain aliases for system accounts (root, postmaster and such).

Configuring LDAP Support:

Sympa supports user authentication via LDAP. For that, an auth.conf file has to be located in /etc/sympa, it is not there by default. The auth.conf file should have the following content.

ldaphost timeout 0 bind_dn uid=vmail,ou=system-users,dc=dot bind_password XXXX suffix dc=dot

get_dn_by_uid_filter (uid=[sender]) get_dn_by_email_filter (|(mail=[sender])(maildrop=[sender]))

email_attribute mail alternative_email_attribute maildrop scope sub

Sympa authenticates users either via email address or via their username. That is evident by the two get_dn directives above and the email attributes. The rest of the directives are pretty much the usual parameters you encounter elsewhere in LDAP implementation.

Source Code Edits:

Sympa claims that it can automatically create mailinglist aliases, but that is not fully supported by the code (the facilities are there, but not fully written out properly for some reason). Because we cannot have users log into a shell and copy the aliases into an alias file themselves, we have to edit the code accordingly.
We start by editing the included module /usr/lib/sympa/bin/wwslib.pm has to be edited under the header ## Load WWSympa configuration file. Add the following two parameters there:

alias_manager => '/usr/lib/sympa/bin/alias_manager.pl',
auto_aliases => 1,

This will define an alias manager and set automatic alias creation as the default.

The /usr/lib/sympa/bin/alias_manager.pl also has to be edited to enable automatic alias writing and the necessary virtual --> local alias translation for Postfix's virtual delivery account. First add the following line to the variable definitions at the beginning:

my $regexp_table = '/etc/postfix/virtual-regexp';

This rule introduces a new file to be read for aliases, namely the same virtual-regexp file we have defined above in the virtual transport alias configuration for Postfix.

Then, in the same section of alias_manager.pl, change the aliaswrapper setting to use postfix aliases:

my $alias_wrapper = '/usr/sbin/postalias -o hash:/etc/mail/sympa_aliases';

Then, look further down the code until you find the section:

unless (open ALIAS, ">> $alias_file") {

print STDERR "Unable to append to $alias_file\n"; exit(5);


      foreach (@aliases) {

        print ALIAS "$_";

      } close ALIAS;

Edit that section to look like this:

unless (open ALIAS, ">> $alias_file") {

      print STDERR "Unable to append to $alias_file\n"; exit(5);


      if (open REGEXP, ">> $regexp_table") {

        print REGEXP "/^$listname\@$domain\$\/ $domain-$listname";

        } else { print STDERR "Unable to append to $regexp_table\n";



      foreach (@aliases) {

        print ALIAS "$_";

      } close ALIAS; close REGEXP;

With this edit, you will ensure that the aliaswrapper reads and uses not only the standard alias files but also the regular expression table of Postfix.

Finally /usr/lib/cgi-bin/sympa/wwsympa.fcgi also has to be edited to account for the fact that the postfix postalias command does not deliver the same exit status as the sympa aliaswrapper (which only works properly with sendmail aliases). This creates an undefined error, so we add the following condition in the install_aliases subroutine of wwsympa.fcgi:

}elsif ($status == '255') {

&wwslog('info','Aliases installed with undefined error messages') ;

      $param->{'auto_aliases'} = 1;

Sympa Virtual Hosts:

Every domain virtual host needs a subdirectory in /etc/sympa/[domain] which is not created automatically but it is created by the adminscripts on DISC as soon as a new hosted domain is created through the Admin Interface.

This directory needs to contain a file called robot.conf, this configures the virtual host. A robot.conf file can override certain directives given in the Sympa.conf file (like who the listmaster is, for example) Since we will not be hosting any mailinglists on the machine's own name, but only for users and their subdomains, those files are quite essential.
Here's an example of a robot.conf file.

http_host www.example.org
host example.org
listmaster helpdesk@example.org,domainadmin@example.org
title example.org email list server
create_list listmaster
default_home lists

The essential pieces of information for the handling of virtual hosts for the listserver admin interface are:

Aliases Implementation:

We have already seen that there are two files handling aliases for mailinglists. Sympa expects the existence of an /etc/mail/sympa_aliases file and a corresponding sympa_aliases.db. Those files have to be created and owned by the sympa user. You can use the postalias or postmap functions of postfix to create the initial db file, after that, the Sympa aliaswrapper will take care of it automatically. We also have to provide a regular expression alias file, though. This is because we are using the virtual delivery agant of Postfix, and that delivery agent does not understand pipes in aliases. So, in adition to the normal alias directives in /etc/aliases for every mailinglist, virtual-regexp is given a translation expression for each mailinglist in the following form:

/^[listname]@[domain]$/ [domain]-[listname]

Here are some further essential points to look after:

With that, your Sympa configuration is done.

[PREV] | [UP] | [NEXT]