Pustaka Taratsa

Baca teks (EPUB): SquirrelMail: Installation on Ubuntu 16.04 (en)

1 bagian

Teks ini diambil langsung dari berkas EPUB; tata letak dan gambar tidak disertakan. Untuk tampilan lengkap, silakan merujuk pada dokumen asli.

Daftar isi
  1. SquirrelMail: Installation on Ubuntu 16.04 (en)
  2. Set Up Additional Repo
  3. Ubuntu 16.04
  4. SquirrelMail Configuration
  5. SMTP Postfix Configuration
  6. Fetching Emails to INBOX
  7. Error
  8. IPv6 Problem
  9. References
  10. Interesting Links

SquirrelMail: Installation on Ubuntu 16.04 (en)

Sumber: https://onnocenter.or.id/wiki/index.php/SquirrelMail:_Installation_on_Ubuntu_16.04_(en)

WARNING: Squirrelmail has issues with PHP 7.0. Downgrade to PHP 5.6

Set up POP3, IMAP & SMTP Server

Set Up Additional Repo

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 to php5:

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

Inform Apache about the presence of squirrelmail:

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

Edit the 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 example.com
</VirtualHost>

Enable squirrelmail:

sudo a2ensite squirrelmail.conf

SquirrelMail Configuration

Configure Domain Squirrelmail:

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

For Ubuntu version 11.10 and above, edit Dovecot configuration:

vi /etc/dovecot/conf.d/10-mail.conf

mail_location = mbox:~/mail:INBOX=/var/mail/%u

Restart Server in Ubuntu 14.04:

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

Webmail can be accessed through:

http://ip-address-server/squirrelmail

SMTP Postfix Configuration

Ideally, the SMTP Server Postfix should be informed about the domain, relayhost, and local IP:

vi /etc/postfix/main.cf
mydestination = school, localhost.localdomain, localhost, school.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

Fetching Emails to INBOX

Send email using telnet to port 25:

telnet localhost 25

helo test.com
mail from: <[email protected]>
rcpt to: <[email protected]>
data
From: <[email protected]>
To: <[email protected]>
Subject: test

test 

.

quit

Replace [email protected] with the email you created. For example, victim.com:

telnet localhost 25

helo test.com
mail from: <[email protected]>
rcpt to: <[email protected]>
data
From: <[email protected]>
To: <[email protected]>
Subject: test

test

.

quit

Error

IPv6 Problem

If there is an issue with IPv6 add to main.cf:

inet_protocols = ipv4

References