Tag: Ubuntu

Installation of mail system on Ubuntu

I assume that you have installed system with basic configuration and SSH running. After login to system we can install dovecot-postfix package, which is described as fully functional mail server:

drfugazi@charr:~% sudo aptitude install dovecot-postfix
[sudo] password for drfugazi:
Reading extended state information
Initializing package states... Gotowe
The following NEW packages will be installed:
  dovecot-common{a} dovecot-imapd{a} dovecot-pop3d{a} dovecot-postfix
0 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 7957kB of archives. After unpacking 15,1MB will be used.
Do you want to continue? [Y/n/?] y
Configuring dovecot-common (1:1.2.9-1ubuntu6.1) ...
Creating config file /etc/dovecot/dovecot.conf with new version
Creating config file /etc/dovecot/dovecot-ldap.conf with new version
Creating config file /etc/dovecot/dovecot-sql.conf with new version

Now we should check if Dovecot is running and we can connect to IMAP server on localhost:

Installation and configuration of OpenLDAP

Installation and basic configuration of LDAP directory service (OpenLDAP) on Ubuntu:

sudo aptitude install slapd ldap-utils

This description is based on HowtoForge document for Karmic Koala. I used to be to configure of OpenLDAP in slapd.conf file, but this is old method. Here we have possibility to modify LDAP configuration without restart of LDAP server.

cd /etc/ldap

At first I suggest you to add some schemas, which contains objectclasses and attributes useful later:

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif

If you have problem with addition of above because of insufficient permissions then switch to root with sudo su - or sudo -i