There is a new version of this tutorial available for Ubuntu 20.04 (Focal Fossa).

The Perfect Server - Ubuntu 10.04 [ISPConfig 3] - Page 5

20 Install SquirrelMail

To install the SquirrelMail webmail client, run

aptitude install squirrelmail

Then create the following symlink...

ln -s /usr/share/squirrelmail/ /var/www/webmail

... and configure SquirrelMail:

squirrelmail-configure

We must tell SquirrelMail that we are using Courier-IMAP/-POP3:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- D


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server
    gmail       = IMAP access to Google mail (Gmail) accounts

    quit        = Do not change anything
Command >>
 <-- courier


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server

    quit        = Do not change anything
Command >> courier

              imap_server_type = courier
         default_folder_prefix = INBOX.
                  trash_folder = Trash
                   sent_folder = Sent
                  draft_folder = Drafts
            show_prefix_option = false
          default_sub_of_inbox = false
show_contain_subfolders_option = false
            optional_delimiter = .
                 delete_folder = true

Press any key to continue...
 <-- ENTER


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- S


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >> S

Data saved in config.php
Press enter to continue...
 <-- ENTER


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color on
S   Save data
Q   Quit

Command >>
 <-- Q

Afterwards you can access SquirrelMail under http://server1.example.com/webmail or http://192.168.0.100/webmail:

 

21 Install ISPConfig 3

To install ISPConfig 3 from the latest released version, do this:

cd /tmp
wget http://downloads.sourceforge.net/ispconfig/ISPConfig-3.0.2.1.tar.gz?use_mirror=
tar xvfz ISPConfig-3.0.2.1.tar.gz
cd ispconfig3_install/install/

(Replace ISPConfig-3.0.2.1.tar.gz with the latest version.)

The next step is to run

php -q install.php

This will start the ISPConfig 3 installer. The installer will configure all services like postfix, sasl, courier, etc. for you. A manual setup as required for ISPConfig 2 (perfect setup guides) is not nescessary.

[email protected]:/tmp/ispconfig3_install/install# php -q install.php
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0


--------------------------------------------------------------------------------
 _____ ___________   _____              __ _
|_   _/  ___| ___ \ /  __ \            / _(_)
  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _
  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |
 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| |
 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, |
                                              __/ |
                                             |___/
--------------------------------------------------------------------------------


>> Initial configuration

Operating System: Debian Squeeze/Sid or compatible

    Following will be a few questions for primary configuration so be careful.
    Default values are in [brackets] and can be accepted with <ENTER>.
    Tap in "quit" (without the quotes) to stop the installer.


Select language (en,de) [en]:
 <-- ENTER

Installation mode (standard,expert) [standard]: <-- ENTER

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <-- yourrootsqlpassword

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Generating a 2048 bit RSA private key
...............+++
............................+++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
 <-- ENTER
State or Province Name (full name) [Some-State]: <-- ENTER
Locality Name (eg, city) []: <-- ENTER
Organization Name (eg, company) [Internet Widgits Pty Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, YOUR name) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring BIND
Configuring Apache
Configuring vlogger
Configuring Apps vhost
Configuring Firewall
Installing ISPConfig
ISPConfig Port [8080]:
 <-- ENTER

Configuring DBServer
Installing Crontab
no crontab for root
no crontab for getmail
Restarting services ...
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart mysql
mysql start/running, process 24840
 * Stopping Postfix Mail Transport Agent postfix
   ...done.
 * Starting Postfix Mail Transport Agent postfix
   ...done.
 * Stopping SASL Authentication Daemon saslauthd
   ...done.
 * Starting SASL Authentication Daemon saslauthd
   ...done.
Stopping amavisd: amavisd-new.
Starting amavisd: amavisd-new.
 * Stopping ClamAV daemon clamd
   ...done.
 * Starting ClamAV daemon clamd
   ...done.
 * Stopping Courier authentication services authdaemond
   ...done.
 * Starting Courier authentication services authdaemond
   ...done.
 * Stopping Courier IMAP server...
   ...done.
 * Starting Courier IMAP server...
   ...done.
 * Stopping Courier IMAP-SSL server...
   ...done.
 * Starting Courier IMAP-SSL server...
   ...done.
 * Stopping Courier POP3 server...
   ...done.
 * Starting Courier POP3 server...
   ...done.
 * Stopping Courier POP3-SSL server...
   ...done.
 * Starting Courier POP3-SSL server...
   ...done.
 * Restarting web server apache2
 ... waiting ..   ...done.
Restarting ftp server: Running: /usr/sbin/pure-ftpd-mysql-virtualchroot -l mysql:/etc/pure-ftpd/db/mysql.conf -l pam -H -E -b -O clf:/var/log/pure-ftpd/transfer.log -8 UTF-8 -u 1000 -A -B
Installation completed.
[email protected]:/tmp/ispconfig3_install/install#

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterwards you can access ISPConfig 3 under http://server1.example.com:8080/ or http://192.168.0.100:8080/. Log in with the username admin and the password admin (you should change the default password after your first login):

The system is now ready to be used.

 

21.1 ISPConfig 3 Manual

 

22 Additional Notes

If the Ubuntu server that you've just set up in this tutorial is an OpenVZ container (virtual machine), you should do this on the host system (I'm assuming that the ID of the OpenVZ container is 101 - replace it with the correct VPSID on your system):

VPSID=101
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
  vzctl set $VPSID --capability ${CAP}:on --save
done

 

Share this page:

Suggested articles

39 Comment(s)

Add comment

Comments

By: Anonymous

ypu say after install webmail you can access SquirrelMail under http://server1.example.com/webmail or http://192.168.0.100/web

but i can't access to it with root  or any user :

Unknown user or password incorrect.

there is any special user to acces it

regards.,

 

 

By: Anonymous

To login to squirrel mail do this User-name: [email protected] pass: enter password entering just user name/pass doesn't work. It hope it helps.

By: Anonymous

Thanks a lot – it works like a charm and was really easy to follow.

I would like to point out the same as salami did regardng Hetzner minimal Ubuntu on 9.10:

looks like hetzner's ubuntu 9.10 image isn't as minimal as it sounds :) it seems to have a crippled postfix package already installed, and the ispconfig install will fail because there is no /etc/postfix/main.cf.

to work around this issue, you can remove the package completely before starting with this guide using:

  • aptitude remove --purge postfix
  • dpkg --purge postfix
(the --purge in the first command should also take care of the config files... but it doesn't. calling dpkg manually cleans all the config files.)  after that the guide works perfectly if you start from step 4.

By: Anonymous

Try setting up an email domain and mailbox from the ISPConfig interface first.

By: Anonymous

I can't configure the squirrel Mail "Command >> <-- S "

Acess denied config.php

By: chrees

try typing:

 sudo squirrelmail-configure

By: Richard Correia

Hi,

I have done  setup in exact manner described in this document. All things are working fine.

 I am unable to access the webmail using browser.

e.g. http://www.dsvtrust.org/webmail

I can see the link webmail -> /usr/share/squirrelmail/    in    my /var/www directory.

The site is working fine, the phpmyadmin alias is working fine.

Please suggest.

By: Anonymous

Great tutorial! Works awesome! Could you also post how to install with roundcube webmail instead of squirrelmail? Thank you once again!

By: Sergio Portari

Thanks a lot! Works perfectly. All commands and instructions are clear and working!!!

 very very very thanks!

Now I want to change my windows server to ubuntu server.

By: Anonymous

I cant complete the install. I get stuck with this after running php -q install.php command, then pressing enter for everything.

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

By: Brendan Paradis

To anyone getting an error about disconnecting from imap immediately after you have logged in on squirrelmail:

I had a corresponding system user for my accunt so I'm not sure if it only takes the bottom portion to fix this for vmail

If you aren't using a system account then myuser for chmod and chown is obviously your mail username (not with your tld)


sudo maildirmake.dovecot /etc/skel/Maildir

sudo maildirmake.dovecot /etc/skel/Maildir/.Drafts

sudo maildirmake.dovecot /etc/skel/Maildir/.Sent

sudo maildirmake.dovecot /etc/skel/Maildir/.Trash

sudo maildirmake.dovecot /etc/skel/Maildir/.Templates

sudo cp -r /etc/skel/Maildir /home/myuser/

sudo chown -R myuser:usergroup /home/myuser/Maildir

sudo chmod -R 700 /home/myuser/Maildir

chmod -R 777 /var/vmail/my.hostname/myuser/

chown -R 5000:5000 /var/vmail/my.hostname/myuser/


This got me into a working installation

Everything is loading pretty slowly so I'm going to look into the cause of that, anyone else have that issue?

By: bokcmho

I'm using vmware in windows vista to create the Ubuntu server for practice, and I think I have successfully gone through all the steps of installation except I need to use dhcp in order to get all the packages through web during installation.  Could I simply change the /etc/network/interfaces back to the suggested static IP after all?  How to get the squirrelmail and ispconfig accessible through the browser in my host windows system?

By: Pedrotech Informática

I made the virtual server fully visible to the external network by replicating the physical network card to the virtual machine and configuring the router ip redir tables

By: Anonymous

Thanks, tanks, tanks! This is a great tutorial, i can't belive, in half a day i have a great hosting platform working. Really great work!

By: Anonymous

.. for save my work amount :D

 My virtual provider were set locale to US by default but I want it to be  fi_FI, so I have to set those also before begin. So, if locale need to be changed. Here you go...

apt-get install language-pack-fi

apt-get install language-pack-en

dpkg-reconfigure locales

dpkg-reconfigure tzdata

 exit --> re - login

locale

If last command work with out warnings you modification were successful.

By: sashman

On my 10.04 x64 installation I had to copy the postfix distribution sample to /etc/postfix/main.cf prior the ispconfig installation (and after installing the postfix package).

Otherwise ispconfig will not find the config file and fail to configure postfix properly.

By:

After running through all the steps in this install guide, my installation will not allow me to access the admin area.  When I go to http://domain.TLD:8080 the page times out.  Any ideas?

By: DisAvowed

im getting the exact same error, cant seem to fix it

By: Vlad

use ip-address to get your machine untill you have no dns-zone working properly


 

By: Carlos Lopez

Thank  you Falko, so far so good, took me almost a hold day but is working now.

By: mikael

The tutorial work great! Just one thing, i cant access phpmyadmin. "http://adress/phpmyadmin" do not work..

By: Anonymous

Try http://server:8080/phpmyadmin

By: Anonymous

sudo vim /etc/phpmyadmin/apache.conf

and remark following lines like this and save the file, and the PhpMyAdmin should work.

 

# Authorize for setup
#<Directory /usr/share/phpmyadmin/setup>
#    <IfModule mod_authn_file.c>
#    AuthType Basic
#    AuthName "phpMyAdmin Setup"
#    AuthUserFile /etc/phpmyadmin/htpasswd.setup
#    </IfModule>
#    Require valid-user
#</Directory>

By: Mathias

Test this if you get 404. Do the following to include the phpMyadmin-shipped Apache configuration into Apache:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

Tip from: https://help.ubuntu.com/community/phpMyAdmin

By:

Great addition Mathias,

Got it working now

By: u4david

Can anyone confirm that falowing this guide your su-php and su-exec is working and you can run the services as a user.

 

I will need to use custom rules for adomain and i can do that with suPHP andf directives.

 

But in this how to i'm missing somethink like this:

For Debian and Ubuntu, the package libapache2-mod-suphp exists, however the problem with this package is that it doesn't support the suPHP_UserGroup directive (which is used by ISPConfig) because it wasn't compiled using the --with-setid-mode=paranoid switch. Therefore we must build mod_suphp manually.

First we disable the normal PHP5 module (as root):

a2dismod php5
/etc/init.d/apache2 restart

Then we install the prerequisites needed to build mod_suphp:

apt-get install php5-cgi apache2-prefork-dev

Now we can download and build suPHP as follows:

cd /tmp
wget http://www.suphp.org/download/suphp-0.6.2.tar.gz
tar xvfz suphp-0.6.2.tar.gz
cd suphp-0.6.2
./configure --prefix=/usr --sysconfdir=/etc --with-apache-user=www-data --with-setid-mode=paranoid --with-apxs=/usr/bin/apxs2
make
make install

Finally we add the suPHP module to our Apache configuration...

vi /etc/apache2/httpd.conf

LoadModule suphp_module       /usr/lib/apache2/modules/mod_suphp.so

... and restart Apache:

/etc/init.d/apache2 restart

 Can someone tell me what is up wit that?

By: Nicolás

how can i change the vmail folder (/var/vmail) by another one (/home/vmail)?

 

tanks you very much!

By:

I was not able to download and install the ispconfig 3. I had to reconfigure the commands. Here is the commands for whoever needs them. cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xvfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install
php -q install.php

I hope this helps. Cruz

By: xasx

Good job Cruz.

 

Thanks for the info. I've had this problem every time I set up ISPConfig3. Your help was much appreciated.

 

xasx

 

By:

agree. thanks for the info.

 

By: Anonymous

This is a great how-to.. compliments!

By:

ISPConfig 3.0.3, on ubuntu 10.04

I copied the phpmyadmin.conf  to webmail.conf in :/etc/apache2/conf.d directory

 changed the alias inside webmail.conf and I can use the http://www/domain.com/webmail link

By: jali

The entire installation went without any problem.

I added a first client and the client0 folder is created (/var/www/clients/client0)

When I add the second client or webdomain there is no client1 folder and also the user is not created. Only the email-domain is working but the website doesn't appear in /var/www

What is going wrong ???

(Ubuntu 10.04 32bit)

By: Dane Leckey

Just would like to say thankyou for putting the time into producing this howto. 

 I followed it from start to finish and every single aspect of it worked perfectly.

 Thanks!

By:

Hi , i Execute all command its works fine but I can send & receive email from this Domain only. I can recive email f rom other domain like gmail , yahoo. But i cant send email from this domain to other domain like yahoo , gmail etc.
I 'm getting error after put this command .

tail -f  /var/log/mail.log

 Mar  6 00:51:26 mail postfix/smtp[31393]: connect to gmail-smtp-in.l.google.com[                                                                             74.125.43.27]:25: Connection timed out
Mar  6 00:51:47 mail postfix/smtp[31393]: connect to alt1.gmail-smtp-in.l.google                                                                             .com[74.125.155.27]:25: Connection timed out
Mar  6 00:52:08 mail postfix/smtp[31393]: connect to alt2.gmail-smtp-in.l.google                                                                             .com[74.125.65.27]:25: Connection timed out
Mar  6 00:52:29 mail postfix/smtp[31393]: connect to alt3.gmail-smtp-in.l.google                                                                             .com[74.125.45.27]:25: Connection timed out
Mar  6 00:52:50 mail postfix/smtp[31393]: connect to alt4.gmail-smtp-in.l.google                                                                             .com[74.125.115.27]:25: Connection timed out
Mar  6 00:52:50 mail postfix/smtp[31393]: 6D29F33C0FEC: to=<[email protected]>                                                                             , relay=none, delay=57368, delays=57262/0.02/106/0, dsn=4.4.1, status=deferred (                                                                             connect to alt4.gmail-smtp-in.l.google.com[74.125.115.27]:25: Connection timed o                                                                             ut)
Mar  6 00:55:01 mail pop3d: Connection, ip=[::1]
Mar  6 00:55:01 mail pop3d: Disconnected, ip=[::1]
Mar  6 00:55:01 mail imapd: Connection, ip=[::1]
Mar  6 00:55:01 mail imapd: Disconnected, ip=[::1], time=0
Mar  6 00:55:01 mail postfix/smtpd[31518]: connect from localhost[127.0.0.1]
Mar  6 00:55:01 mail postfix/smtpd[31518]: lost connection after CONNECT from localhost[127.0.0.1]
Mar  6 00:55:01 mail postfix/smtpd[31518]: disconnect from localhost[127.0.0.1]

By: Mark

I just tried this on a VPS server that had basic LAMP already configured, and received the following errors in the process.....

 

1)

I was never given the option 

Configure database for phpmyadmin with dbconfig-common? <-- No 

How can I verify the setting?

 

 2)

When restarting Apache ...

apache2: Syntax error on line 204 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/scgi.load: Cannot load /usr/lib/apache2/modules/mod_scgi.so into server: /usr/lib/apache2/modules/mod_scgi.so: cannot open shared object file: No such file or directory

Does this file come from the installation of a package that can be reinstalled?

 

 3)

 # quotacheck -avugm
quotacheck: WARNING -  Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING -  Quotafile //aquota.group was probably truncated. Cannot save quota settings...
quotacheck: Scanning /dev/sda1 [/] quotacheck: lstat Cannot stat `//home/administrator/.gvfs': Permission denied
Guess you'd better run fsck first !
exiting...
 

 

4)

 # quotaon -avug
quotaon: Cannot find quota file on / [/dev/sda1] to turn quotas on/off.
quotaon: Cannot find quota file on / [/dev/sda1] to turn quotas on/off.

 

 

Any help with these issues appreciated. I need my web server back up!

 

By: Muslim

Need help. I installed ISPConfic according to this tut but after installation couldn't login into the panel with Login: admin Pass: admin. It gives error 'Wrong password'....

Thanks...

By: Fran

Hi,

After following this installation instructions I'm facing problems with email. I've created a client and an email box under ISPConfig, and the user can send emails without problems even from SquirrelMail, but when I sent a test message to the same mail account it's  discarded by the server with "unknown user" message.

It's a bit weird, since as I told I can sent messages with that user without problems.

 Dec  2 02:48:01 jaire postfix/local[3937]: 4F7BA2E487: to=<[email protected]>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "pepe")

 

Please, note that I must use a subdomain for this host, so host.domain.com form is correct (of course these are NOT my real host and domain name's, I do not put they here because it's for a customer and I think I must respect his privacy).

Any hints? 

Thanks a lot in advance,

 

By: Fran

Great How to, I have followed it an everything goes right but squirrelmail. When I try to enter for first time with one of my email users I get the following error message:

Error opening ../config/default_pref

Could not create initial preference file!
/var/lib/squirrelmail/data/ should be writable by user www-data
Please contact your system administrator and report this error.

I have double checked that www-data has permissions to write into /var/lib/squirrelmail/data

I even have done a su www-data, enter into that directory without problems and even create a file within it with 'touch foo', so www-data user has no problems to write on that directory, although SquirrelMail continues showing its error message and does not let the user see his mail box.