Installing Maildrop on CentOS 7

Установка Maildrop

This tutorial demonstrates how to build and install Courier-IMAP, Courier-Authlib, and Maildrop on 7 (this tutorial will also work for systems built on distributions – , RedHat and CentOS).

Installation process

Install dependencies:

yum groupinstall ' Tools'
yum groupinstall 'Development Libraries'
yum install rpm-build gcc -devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap- libtool gdbm-devel pam-devel gamin-devel

Create a new user (the Courier-IMAP RPM package cannot be built as a root user. An error will be generated during compilation, so you need to log in or create a new account):

useradd - -s /bin/ usr1
passwd usr1

Next, you need to add the rights to use sudo to the new user. Run the command:

visudo

In the file that opens, find the line:

root ALL=(ALL) ALL

and add the following line after :

usr1 ALL=(ALL) ALL

Building Maildrop, Courier-Authlib and Courier-IMAP packages:

su usr1

Create a build environment:

mkdir $HOME/rpm
mkdir $HOME/rpm/SOURCES
mkdir $HOME/rpm/SPECS
mkdir $HOME/rpm/BUILD
mkdir $HOME/rpm/SRPMS
mkdir $HOME/rpm/RPMS
mkdir $HOME/rpm/RPMS/i386
echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros

Create directories for downloading Courier and download the latest versions:

mkdir $HOME/downloads
cd $HOME/downloads
wget http://prdownloads.sourceforge.net/courier/courier-authlib-0.60.2.tar.bz2
wget http://prdownloads.sourceforge.net/courier/courier-imap-4.2.1.tar.bz2
wget http://prdownloads.sourceforge.net/courier/maildrop-2.0.4.tar.bz2

Building the Courier-Authlib package. From the $HOME/downloads directory run the command:

sudo rpmbuild -ta courier-authlib-0.60.2.tar.bz2

After successful assembly, the finished package will be placed in the directory:

$HOME/rpm/RPMS/i386

To view the available RPM packages, go to the directory:

cd $HOME/rpm/RPMS/i386

and run the following command:

ls -l

After executing this command, you will see a list of packages available for installation:

-rw-r–r– 1 root root 137335 2007-11-13 18:02 courier-authlib-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root 323827 2007-11-13 18:02 courier-authlib-debuginfo-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  34201 2007-11-13 18:02 courier-authlib-devel-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  18039 2007-11-13 18:02 courier-authlib-ldap-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  14258 2007-11-13 18:02 courier-authlib-mysql-0.60.2-1.fc8.i386.rpm

Building the Courier-IMAP package. Go to the directory with the downloaded sources:

cd $HOME/downloads

Run the rpmbuild command without sudo:

rpmbuild -ta courier-imap-4.2.1.tar.bz2

After the package has been successfully created, it will be located in the following directory $HOME/rpm/RPMS/i386. Let’s go to it:

cd $HOME/rpm/RPMS/i386

We look at the packages available for installation with the command:

ls -l

-rw-r–r– 1 root root 137335 2007-11-13 18:02 courier-authlib-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root 323827 2007-11-13 18:02 courier-authlib-debuginfo-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  34201 2007-11-13 18:02 courier-authlib-devel-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  18039 2007-11-13 18:02 courier-authlib-ldap-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  14258 2007-11-13 18:02 courier-authlib-mysql-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  13602 2007-11-13 18:02 courier-authlib-pgsql-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root   8336 2007-11-13 18:02 courier-authlib-pipe-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root root  36859 2007-11-13 18:02 courier-authlib-userdb-0.60.2-1.fc8.i386.rpm
-rw-rw-r– 1 falko falko 383455 2007-11-13 18:21
courier-imap-4.2.1-1.8.i386.rpm
-rw-rw-r– 1 falko falko 917771 2007-11-13 18:21 courier-imap-debuginfo-4.2.1-1.8.i386.rpm

Building the Maildrop package. Go to the directory with the downloaded sources:

cd $HOME/downloads

Run the following command using sudo:

sudo rpmbuild -ta maildrop-2.0.4.tar.bz2

After successfully building Maildrop, move to the folder with the built packages:

cd $HOME/rpm/RPMS/i386

We look at the packages available for installation:

ls -l

-rw-r–r– 1 root  root 324618 2007-11-13 18:02 courier-authlib-debuginfo-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 137343 2007-11-13 18:02 courier-authlib-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 34208 2007-11-13 18:02 courier-authlib-devel-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 18042 2007-11-13 18:02 courier-authlib-ldap-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 13599 2007-11-13 18:02 courier-authlib-pgsql-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 14254 2007-11-13 18:02 courier-authlib-mysql-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 8339 2007-11-13 18:02 courier-authlib-pipe-0.60.2-1.fc8.i386.rpm
-rw-r–r– 1 root  root 36855 2007-11-13 18:02 courier-authlib-userdb-0.60.2-1.fc8.i386.rpm
-rw-rw-r– 1 falko falko 383455 2007-11-13 18:21 courier-imap-4.2.1-1.8.i386.rpm
-rw-rw-r– 1 falko falko 917771 2007-11-13 18:21 courier-imap-debuginfo-4.2.1-1.8.i386.rpm
-rw-r–r– 1 root  root 752872 2007-11-13 18:35 maildrop-debuginfo-2.0.4-1.8.i386.rpm
-rw-r–r– 1 root  root 299030 2007-11-13 18:35 maildrop-2.0.4-1.8.i386.rpm
-rw-r–r– 1 root  root 136235 2007-11-13 18:35 maildrop-devel-2.0.4-1.8.i386.rpm
-rw-r–r– 1 root  root 58439 2007-11-13 18:35 maildrop-man-2.0.4-1.8.i386.rpm

Installing packages:

sudo rpm -ivh courier-authlib-0.60.2-1.fc8.i386.rpm
sudo rpm -ivh courier-authlib-devel-0.60.2-1.fc8.i386.rpm
sudo rpm -ivh courier-authlib-mysql-0.60.2-1.fc8.i386.rpm
sudo rpm -ivh courier-imap-4.2.1-1.8.i386.rpm
sudo rpm -ivh maildrop-2.0.4-1.8.i386.rpm

After installing all the packages, you need to exit the usr1 user with the following command:

exit

This completes the assembly and installation of Courier and Maildrop.

 

Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!