3

I tried this command sudo apt-get install squirrelmail and got this output

Reading package lists... Done
Building dependency tree 
Reading state information... Done
E: Unable to locate package squirrelmail

Why does this happen? How can I install squirrelmail?

I am using Ubuntu 18.04.

I saw a similar question with no answers: How can I install Squirrelmail in Ubuntu?

Zanna
  • 70,465
GHOST
  • 347
  • 1
    Squirrelmail is available for 14.04 & 16.04 (https://packages.ubuntu.com/search?keywords=squirrelmail) but not 18.04. It's development stopped some time ago, and 16.10 (EOL) was the last supported release for it. I'd suggest using another mail program – guiverc Jul 24 '18 at 08:50
  • 1
    you would have find that result without error if you had done a little apt search squirrelmail before the install :P – damadam Jul 24 '18 at 08:54

2 Answers2

4

Note: Installing squirrelmail is not recommended since it is no longer being patched for vulnerabilities and hence would be security risk on an internet facing server, with critical exploits that have still not been patched. A better, more recent replacement that works identically with no problems is roundcube which is also found in the repositories for easy setup

However, you if for some reason you still do want to install it, you must do it from source as follows. Open up a Terminal ( Ctrl+Alt+T) and follow along

  • Install a a webserver as well as PHP (sudo apt-get install apache2 php libapache2-mod-php php-mcrypt php-mysql)

  • Install an IMAP server

  • Make a directory on the webserver root by using mkdir /var/www/html/sqmail

  • Download and extract sqmail by using

    wget -qO- https://netix.dl.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-webmail-1.4.22.tar.gz | tar xz -C /var/www/html/sqmail --strip-components 1 && chown -r www-data /var/www/html/sqmail

  • Select a data-dir and attachment dir, outside the webtree (e.g. in /var). The data-dir (for user prefs) should be owned by the user the webserver runs as (e.g. www-data). The attachment dir (for uploading files as attachments) should be file mode 0730 and in the same group as the webserver.

  • Configure sqmail by running /var/www/html/sqmail/configure

Now visit http://localhost/sqmail to use it

Amith KK
  • 13,412
  • doesn't seem to be the case now, CVE-2019-12970 was patched at 24 july 2019, https://sourceforge.net/p/squirrelmail/code/14829/ – hanshenrik Sep 28 '19 at 09:56
  • and the CVE-2017-7692 that you linked to was actually pached upstream at 24 April 2017, https://sourceforge.net/p/squirrelmail/code/14650/ – hanshenrik Sep 28 '19 at 09:58
1

Let's Take An Advanced Approach to setup squirrelmail rather than using package manager.

  1. Download SquirrelMail from here on the squirrelmail site.
  2. Open Terminal and navigate to Downloads:

    cd Downloads
    
  3. Unzip downloaded zip file.

    unzip squirrelmail-webmail-1.4.22.zip
    
  4. Run configure file:

    ./configure
    

    and configure SquirrelMail as per your preferences.

Zanna
  • 70,465
  • 1
    squirrelmail has to be installed at the www-root since it's a bunch of php scripts. Running configure in your downloads folder will not allow it to be accessed. Furthemore the zip archive doesn't preserve the executable bit that's required for ./configure to run without a chmod +x – Amith KK Jul 24 '18 at 17:06