This section covers installing IndiMail from rpm/deb. This is the easy way to install IndiMail. If you are looking for something more simpler, then you need the Install IndiMail for dummies - instructions for which are in the file Quick-INSTALL.
There is also an Installation for Experts, involving source compilation. For that read INSTALL. I would recommend you to go through the file INSTALL so that you undertand IndiMail better. INSTALL gives instructions for installing from source and could be challenging for those who are not accustomed with compilation, make, GNU autotools process.
Please refer to Support Information in README for getting support for IndiMail.
Refer to 'Binary Builds on openSUSE Build Service' section in README for indimail repository information for binary builds.
Refer to 'Docker / Podman Repository' section in README for information on running a docker/podman image of IndiMail.
It depends on whether you are Installing, upgrading or removing IndiMail using the rpm version. Following are the steps carried out during RPM/Deb installation.
- Stops IndiMail services (in case the system already has IndiMail installed)
- Add users (indimail, alias, qmaild, qmaill, qmailp, qmailq, qmailr, qmails, qscand) and groups (indimail, nofiles, qmail, qscand)
- Installs important directories in /var/indimail, binaries in /usr/bin, /usr/sbin, /usr/libexec/indimail, shared libraries in /usr/lib64
- Install plugins, modules in /usr/lib/indimail
- Installs shared files in /usr/share/indimail
- Sets up configuration files in /etc/indimail/control, etc
- Installs services under supervise in /service smtp, smtp - odmr, qmtp, qmqp, qmail-send, imap/pop3, indisrvr, inlookup, pwdlookup, clamav antivirus service, freshclam - virus signature update service, bogofilter spam filter service
- Installs (for installation only) MySQL database for use by IndiMail (database in /var/indimail/mysqldb/data and logs in /var/indimail/mysqldb/logs)
- Installs 5 queues in /var/indimail/queue (queue1, queue2, ... queue5)
- Install MTA as the alterntive MTA. Creates link sendmail in /usr/sbin or /usr/lib to /usr/bin/sendmail
- Creates directory for supervise logs in /var/log/svc
- Configures selinux/apparmor
- Sets up svscan to be run by init (/etc/inittab), upstart (/etc/event.d) or by systemctl (/lib/systemd/system)
- Stops IndiMail services (in case the system already has IndiMail installed)
- Delete users (indimail, alias, qmaild, qmaill, qmailp, qmailq, qmailr, qmails, qscand) and groups (indimail, nofiles, qmail, qscand)
- Removes files/binaries in /var/indimail
- Removes services under supervise in /service smtp, smtp - odmr, qmtp, qmqp, qmail-send, imap/pop3, indisrvr, inlookup, pwdlookup, clamav antivirus service, freshclam - virus signature update service, bogofilter spam filter service
- Remove selinux/apparmor rules
- removes svscan to be run by init (/etc/inittab) or by upstart (/etc/event.d). removes all startup scripts
- Sets the original sendmail as the MTA.
NOTE: MySQL database is not removed, config files in /etc/indimail /etc/indimail/control, /etc/indimail/users, .qmail files in /var/indimail/alias, domain information in /var/indimail/domains are not removed.
- Install and configure MySQL (See How to install MySQL below)
- Configure IndiMail
Note: The RPM installation does attempt installing a minimal MySQL database in /var/indimail/mysqldb/data. But if this does not succeed there are workarounds
Review the email in /var/indimail/alias/.qmail-postmaster, before starting services
% sudo service indimail start # (works on all systems)
or
% sudo systemctl start indimail # (if your system uses systemd - almost all current distros)
or
% sudo /usr/sbin/initsvc -on # (works on all systems)
or
% sudo init q # (if your system uses traditional init)
or
% sudo /sbin/initctl emit qmailstart # (if your system uses upstart - ubuntu/fedora10 &above)
or
% sudo /bin/launchctl load /System/Library/LaunchDaemons/indimail.plist
% sudo service indimail start # (If you are on Mac OSX)
The RPM/Deb installation deliberately installs MySQL and fetchmail services in down state. This is for you to review your MySQL installation and configuration. For fetchmail service to run, you need to create /var/indimail/etc/fetchmailrc file. You can use fetchmailconf for configuring fetchmail. To have these services started automatically during reboot, delete the files /service/mysql.3306/down and /service/fetchmail/down . After deleting the file you can use the following to start MySQL
% sudo /usr/bin/svc -u /service/mysql.3306
NOTE: Please disable MySQL from getting started up by the system by executing the chkconfig command
% sudo chkconfig mysqld off
or
% sudo systemctl disable mysqld.service
Please check your OS documentation on how to disable mysqld from starting automatically. Also I have found that the service name is mysql instead of mysqld on some distros. Another complication could be that the service name could be mariadb instead of mysqld.
If you want to use the MySQL started by the system, then do not delete the file /service/mysql.3306/down and do not issue the above svc command. In such a case you will need to tell IndiMail on how to connect to MySQL.
The information for IndiMail to connect to IndiMail is maintained in the file
/etc/indimail/control/host.mysql # for non-clustered setup
and
/etc/indimail/control/host.cntrl # for clustered setup
/etc/indimail/control/host.master # for clustered setup
The format for this file is
mysql_host:mysql_user:mysql_pass:mysql_socket[:use_ssl]
or
mysql_host:mysql_user:mysql_pass:mysql_port[:use_ssl]
where use_ssl is the keyword "ssl" or "nossl", or it can be omitted entirely.
Proceed to SECTION 8, STEP 2 in the file INSTALL for further instruction on configuring IndiMail
Log files for IndiMail reside under the /var/log/svc directory