Difference between revisions of "Instalasi Squirrelmail di Ubuntu 16.04"

From OnnoWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
'''WARNING:''' Squirrelmail bermasalah dengan PHP 7.0. Downgrade ke PHP 5.6
 +
 +
 +
 +
 +
 +
 
Siapkan [[POP3]], [[IMAP]] & [[SMTP]] [[Server]]
 
Siapkan [[POP3]], [[IMAP]] & [[SMTP]] [[Server]]
  
 +
 +
==Siapkan Repo Tambahan==
 +
 +
sudo add-apt-repository ppa:ondrej/php
 +
sudo apt-get update
  
 
==Ubuntu 16.04==
 
==Ubuntu 16.04==
Line 8: Line 20:
 
  apt-get install apache2 php7.0 php7.0-xmlrpc php7.0-mysql php7.0-gd php7.0-cli \
 
  apt-get install apache2 php7.0 php7.0-xmlrpc php7.0-mysql php7.0-gd php7.0-cli \
 
  php7.0-curl mysql-client mysql-server dovecot-common dovecot-imapd \
 
  php7.0-curl mysql-client mysql-server dovecot-common dovecot-imapd \
  dovecot-pop3d postfix squirrelmail squirrelmail-decode
+
  dovecot-pop3d postfix squirrelmail squirrelmail-decode php7.0 php5.6 \
 +
php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring \
 +
php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
 +
 
 +
Downgrade ke php5
 +
 
 +
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
  
 
Memberitahukan apache bahwa ada squirrelmail
 
Memberitahukan apache bahwa ada squirrelmail
  
 
  sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf
 
  sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf
 +
 +
Edit file /etc/apache2/sites-available/squirrelmail.conf
 +
 +
vi /etc/apache2/sites-available/squirrelmail.conf
 +
 +
#users will prefer a simple URL like http://webmail.example.com
 +
<VirtualHost *:80>
 +
  DocumentRoot /usr/share/squirrelmail
 +
  ServerName korban.com
 +
</VirtualHost>
 +
 +
Enable squirrelmail
 +
 +
sudo a2ensite squirrelmail.conf
  
 
==Konfigurasi Squirrelmail==
 
==Konfigurasi Squirrelmail==
Line 105: Line 137:
 
* http://www.squirrelmail.org/plugins.php
 
* http://www.squirrelmail.org/plugins.php
 
* http://ubuntuforums.org/showthread.php?t=1149842 - User Self Registration
 
* http://ubuntuforums.org/showthread.php?t=1149842 - User Self Registration
 +
* http://tz.ucweb.com/4_7a0l
  
 
==Pranala Menarik==
 
==Pranala Menarik==

Latest revision as of 03:10, 7 April 2017

WARNING: Squirrelmail bermasalah dengan PHP 7.0. Downgrade ke PHP 5.6




Siapkan POP3, IMAP & SMTP Server


Siapkan Repo Tambahan

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Ubuntu 16.04

sudo locale-gen id_ID.UTF-8
apt-get install apache2 php7.0 php7.0-xmlrpc php7.0-mysql php7.0-gd php7.0-cli \
php7.0-curl mysql-client mysql-server dovecot-common dovecot-imapd \
dovecot-pop3d postfix squirrelmail squirrelmail-decode php7.0 php5.6 \
php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring \
php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0

Downgrade ke php5

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

Memberitahukan apache bahwa ada squirrelmail

sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf

Edit file /etc/apache2/sites-available/squirrelmail.conf

vi /etc/apache2/sites-available/squirrelmail.conf
#users will prefer a simple URL like http://webmail.example.com
<VirtualHost *:80>
  DocumentRoot /usr/share/squirrelmail
  ServerName korban.com
</VirtualHost>

Enable squirrelmail

sudo a2ensite squirrelmail.conf

Konfigurasi Squirrelmail

Konfigurasi Domain Squirrelmail

/usr/sbin/squirrelmail-configure
2 -> 1 -> domain.id -> S -> Q


Ubuntu versi 11.10 ke atas, edit konfigurasi Dovecot

vi /etc/dovecot/conf.d/10-mail.conf 
mail_location = mbox:~/mail:INBOX=/var/mail/%u


Restart Server di ubuntu 14.04

service dovecot restart
/etc/init.d/apache2 restart
/etc/init.d/postfix restart


Webmail dapat di akses melalui

http://ip-address-server/squirrelmail

Konfigurasi SMTP Postfix

Sebaiknya SMTP Server Postfix diberitahu domain, relayhost, IP lokal

vi /etc/postfix/main.cf
mydestination = sekolah, localhost.localdomain, localhost, sekolah.sch.id
relayhost = smtp.telkom.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/16


Memancing e-mail ke INBOX

Kirim email menggunakan telnet ke port 25

telnet localhost 25
helo test.com
mail from: <test@test.com>
rcpt to: <user@domain.com>
data
From: <test@test.com>
To: <user@domain.com>
Subject: test

test

.

quit


Ganti user@domain.com dengan e-mail yang anda buat. Misalnya korban.com

telnet localhost 25
helo test.com
mail from: <test@test.com>
rcpt to: <onno@korban.com>
data
From: <test@test.com>
To: <onno@korban.com>
Subject: test

test

.

quit

Error

Problem IPv6

Kalau ada masalah dengan IPv6 tambahkan di main.cf

inet_protocols = ipv4

Referensi

Pranala Menarik