The Perfect Server - Fedora 10 [ISPConfig 3] - Page 4

On this page

10 Install Courier-IMAP, Courier-Authlib, And Maildrop

Unfortunately there are no rpm packages for Courier-IMAP, Courier-Authlib, and Maildrop, therefore we have to build them ourselves.

RPM packages should not be built as root; courier-imap will even refuse to compile if it detects that the compilation is run as the root user. Therefore we create a normal user account now (compileuser in this example) and give him a password:

useradd -m -s /bin/bash compileuser
passwd compileuser

We will need the sudo command later on so that the user compileuser can compile and install the rpm packages. But first, we must allow compileuser to run all commands using sudo:

Run

visudo

In the file that opens there's a line root ALL=(ALL) ALL. Add a similar line for compileuser just below that line:

[...]
root ALL=(ALL) ALL
compileuser ALL=(ALL) ALL
[...]

Now we are ready to build our rpm package. First become the user compileuser:

12 Configure Courier

When courier-imap is started for the first time, it automatically creates the certificate files /usr/lib/courier-imap/share/imapd.pem and /usr/lib/courier-imap/share/pop3d.pem from the /usr/lib/courier-imap/etc/imapd.cnf and /usr/lib/courier-imap/etc/pop3d.cnf files. Because the .cnf files contain the line CN=localhost, but our server is named server1.example.com, the certificates might cause problems when you use TLS connections. To solve this, we delete both certificates...

cd /usr/lib/courier-imap/share/
rm -f imapd.pem
rm -f pop3d.pem

... and replace the CN=localhost lines in /usr/lib/courier-imap/etc/imapd.cnf and /usr/lib/courier-imap/etc/pop3d.cnf with CN=server1.example.com:

Suggested articles

2 Comment(s)

Comments

## Sudoers allows particular users to run various commands as## the root user, without needing the root password.

Which would mean that:

compileuser ALL=(ALL) ALL

will probably give away all the same rights to this user as like root himself, making a second root user that even not need to type the root password. If that is true I not need sudo at all but can directly act as root. Moreover I created a potential security lack!

Fact is, except of installing an rpm package to the system I normaly not need root rights at all. A default user in Fedora can run tools like 'make', 'gcc', 'rpmbuild' and even 'rpm -Uvh my_package.src.rpm' without any additional rights.

For installing a single package it should be sufficient enough to to a

# su -c 'rpm -Uvh my_package.rpm'

which would ask me for the root password before installing but should not hurt for that single file. If you already work anyway as a root user we can do the install directly and not need to bother about sudo, but then the question is why I use sudo at all.

Also a good idea might be to use on fedora

# yum localinstall my_package.rpm

which does the same as the rpm install but keep track of the package in yum and as well install dependency if necessary.

I tried to install it on CentOS 6.5 but unsuccesfull. I installed
courier-unicode-1.1.tar.bz2 and then I tried to install
courier-authlib-0.66.1.20140114.tar.bz2 but not well.

I got error:

"The Courier Unicode Library appears not to be installed. You may need to
install a separate development subpackage, in addition to the main package
error: Bad exit status from /var/tmp/rpm-tmp.LecCXX (%prep)".

I don´t know what I can do for now because unicode devel I installed succesfull but still
is missing. Could somebody help me, please?