Support #178
Updated by Daniel Curtis over 11 years ago
h2. Installing the Mail Server It is a good idea to *synchronize the system clock with an NTP* (network time protocol) server over the Internet. Simply run: <pre> apt-get -y install ntp ntpdate </pre> *Install postfix, dovecot and MySQL* with: <pre> apt-get -y install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d </pre> Enter the new password for mysql when requested by the installer and answer the next questions as decsribed below: > General type of configuration? <-- *Internet site* > Mail name? <-- *mail.mydomain.com* To *install amavisd-new, SpamAssassin, and ClamAV* run: <pre> apt-get -y install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 arj nomarch lzop cabextract apt-listchanges libnet-ldap-perl libauthen-sasl-perl clamav-docs daemon libio-string-perl libio-socket-ssl-perl libnet-ident-perl zip libnet-dns-perl </pre> If you want to use mailinglists on your server, then *install mailman*. This step is *+optional+*. mailman requires a apache webserver, so +if you dont want to run a apache instance on your mailserver, then dont install mailman.+ <pre> apt-get -y install mailman </pre> The apt installer for mailman will ask you then to select the languages for the mailing list. Enable all languages that you want to use for mailman. Next create the "mailman" mailinglist. <pre> newlist mailman </pre> Enter the email address and new password for the mailinglist administrator. Thats the last step of the mailman install. The next command to install php has to be executed on every server, independently if you installed mailman or not. Then *install the commandline version of PHP* to be able to run PHP-based shell scripts for ISPConfig: <pre> apt-get -y install php5-cli php5-mysql php5-mcrypt mcrypt </pre> *Install fail2ban*: This is optional but recommended, because the ISPConfig monitor tries to show the log: <pre> apt-get install fail2ban </pre> To make fail2ban monitor PureFTPd and Dovecot, create the file @/etc/fail2ban/jail.local@: <pre> vi /etc/fail2ban/jail.local </pre> > [dovecot-pop3imap] > > enabled = true > filter = dovecot-pop3imap > action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp] > logpath = /var/log/mail.log > maxretry = 5 Then create the following filter file: <pre> vi /etc/fail2ban/filter.d/dovecot-pop3imap.conf </pre> > [Definition] > failregex = (?: pop3-login|imap-login): .*(?:Authentication failure|Aborted login \(auth failed|Aborted login \(tried to use disabled|Disconnected \(auth failed|Aborted login \(\d+ authentication attempts).*rip=(?P<host>\S*),.* > ignoreregex = *Restart fail2ban* afterwards: <pre> service fail2ban restart </pre> h2. Install ISPConfig 3*on this server To get the download URL of the latest ISPConfig 3 stable release, please visit the ISPConfig website: http://www.ispconfig.org/ispconfig-3/download/ *Download the latest ISPConfig 3*** stable release: <pre> cd /tmp wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz tar xfz ISPConfig-3-stable.tar.gz cd ispconfig3_install/install/ </pre> Then start the install script: <pre> php -q install.php </pre> > Select language (en,de) [en]: <-- *en* > Installation mode (standard,expert) [standard]: <-- *expert* > Full qualified hostname (FQDN) of the server, eg server1.example.com [mail.example.com]: <-- *mail.example.com* > MySQL server hostname [localhost]: <-- *localhost* > MySQL root username [root]: <-- *root* > MySQL root password []: <-- Enter your *MySQL root password* here > MySQL database to create [dbispconfig]: <-- *dbispconfig* > MySQL charset [utf8]: <-- *utf8* > Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: <-- *y* > MySQL master server hostname []: <-- *web.example.com* > MySQL master server root username [root]: <-- *root* > MySQL master server root password []: <-- Enter the *root password of the master server* here > MySQL master server database name [dbispconfig]: <-- *dbispconfig* > Configure Mail (y,n) [y]: <-- *y* > > Country Name (2 letter code) [AU]: <-- *US* (Enter the ISO country code where you live here) > > State or Province Name (full name) [Some-State]: <-- *Idaho* (Enter the state where you live here) > > Locality Name (eg, city) []: <-- *Boise* (Enter the city here) > > Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- *ENTER* > > Organizational Unit Name (eg, section) []: <-- *ENTER* > > Common Name (eg, YOUR name) []: <-- *ENTER* > > Email Address []: <-- *ENTER* > Configure Jailkit (y,n) [y]: <-- *n* > Configure FTP Server (y,n) [y]: <-- *n* > Configure DNS Server (y,n) [y]: <-- *n* > Configure Apache Server (y,n) [y]: <-- *n* > Configure Firewall Server (y,n) [y]: <-- *y* > Install ISPConfig Web-Interface (y,n) [y]: <-- *n* Remove the ISPConfig interface link in the @/var/www@ directory: Run <pre> rm -f /var/www/ispconfig </pre> to remove the ISPConfig interface link in the @/var/www@ directory. Clean up the install directories: <pre> rm -rf /tmp/ispconfig3_install/install rm -f /tmp/ISPConfig-3-stable.tar.gz </pre>