Howto - Change the default Scalix ldap port from 389
Scalix 11
In Scalix 11, the switch to using the ldapmapper daemon rather than smtpd added a new requirement to running the LDAP daemon omslapd on a port other than 389.
Why do it?
So why does anyone want change the default LDAP port from port 389? There are a number of reasons for this, but the most common are:
- Co-hosting with another LDAP server (e.g. for running a Samba-LDAP (smbldap) server on the same host)
- Network or firewall restrictions
How is it done?
The LDAP port is specified in a number of files for Scalix, each used by different parts of the total solution. e.g. the mail server needs to know, so does the Admin Console, and so does the Web Appliciation. And, with the introduction of ldapmapper in Scalix 11, the ldapmapper needs to know what port its mapping to (it'll assume the default port, 389).
Files to edit
The files you need to edit to make it all work with the new port are:
Note: The code snippets are not the complete files - they are just to highlight the relevant lines.
/var/opt/scalix/ml/s/sys/slapd.conf
- --OMSLAPDHEADER--
- server specific data
subschemaSubentry "cn=subSchema,o=Scalix" altServer "" portNum 3890
/var/opt/scalix/ml/caa/scalix.res/config/ubermanager.properties
- Port number for the Scalix LDAP servers. The default is 389.
- If you change this number make sure all the sladp.conf file on
- all Scalix LDAP servers are changed to the same port here.
ubermanager.query.server.port=3890
/var/opt/scalix/ml/webmail/swa.properties
NOTE: This file has two lines that specify port number.
swa.ldap.1.port=3890
swa.ldap.1.baseDN=o=scalix
.
.
swa.ldap.2.port=3890
swa.ldap.2.baseDN=o=MyContacts
/var/opt/scalix/ml/platform/platform.properties
- ldap port (since 10.0.1 this can be different from 389)
ldap.port=3890
/etc/sysconfig/ldapmapper
Finally, don't forget to change the ldapmapper. This is the complete file, as it only has one config line. Notice the ldapmapper(8) part - there's a man page, so go check it out too if you're interested!
- Scalix ldapmapper(8) options
LDAPMAPPER_OPTIONS="-L ldap://%s:3890"
After the edits
Restart the all the Scalix processes.
/etc/rc.d/init.d/scalix restart /etc/rc.d/init.d/scalix-tomcat restart
You can verify which port the LDAP server is running on. First, check its not on 389:
- lsof -i :389
That should return nothing, unless you've already jumped ahead and started openldap or some other LDAP server!
Then check the new port:
- lsof -i :3890
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME omslapd 20092 root 8u IPv4 725279 TCP *:ndsconnect (LISTEN)
And you're all done - you can then set up whatever else you want to, or retire happily for a quiet beer.