安裝前準備
sudo apt-get update sudo apt-get upgrade
安裝套件
sudo apt-get install squirrelmail squirrelmail-locales 各國語系 squirrelmail-lockout 登入失太多次鎖定某段時間,不讓其登入,以避免密碼字典攻擊 squirrelmail-logger 操作記錄
複製一份virtual host設定檔到apache底下
sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf
編輯squirrelmail.conf
vi /etc/apache2/sites-available/squirrelmail.conf
Alias /squirrelmail /usr/share/squirrelmail <Directory /usr/share/squirrelmail> Options FollowSymLinks <IfModule mod_php5.c> php_flag register_globals off </IfModule> <IfModule mod_dir.c> DirectoryIndex index.php </IfModule> # access to configtest is limited by default to prevent information leak <Files configtest.php> order deny,allow deny from all allow from 127.0.0.1 </Files> </Directory> # users will prefer a simple URL like http://webmail.example.com <VirtualHost *:80> DocumentRoot /usr/share/squirrelmail ServerName squirrelmail.example.com </VirtualHost> # redirect to https when available (thanks [email protected]) # # Note: There are multiple ways to do this, and which one is suitable for # your site's configuration depends. Consult the apache documentation if # you're unsure, as this example might not work everywhere. # #<IfModule mod_rewrite.c> # <IfModule mod_ssl.c> # <Location /squirrelmail> # RewriteEngine on # RewriteCond %{HTTPS} !^on$ [NC] # RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L] # </Location> # </IfModule> #</IfModule>
將設定好的virtual host軟連結一份到/etc/apache2/sites-enables/
sudo ln -s /etc/apache2/sites-available/squirrelmail /etc/apache2/sites-enabled/
重新啟動apache2
sudo service apache2 reload
開啟瀏覽器 輸入
http://yourip/squirrelmail
設定squirrelmail的相關參數
1.直接編輯/etc/squirrelmail/config.php
2.使用內建的組態編輯器sudo squirrelmail-configure
設定Server Settings 按下2 可以設定server的相關參數
外掛安裝
將下載好的外掛放在/usr/share/squirrelmail/plugins
/usr/share/squirrelmail/config ./conf.pl
輸入Available Plugins可用的外掛數字
返回主選單記得按s存檔
後台Option就會看到新增的外掛項目
首頁登入畫面
參考文章
https://www.linode.com/docs/email/clients/installing-squirrelmail-on-ubuntu-12-04
http://myip.tw/itsmw/index.php?title=SquirrelMail