Friday, February 11, 2022

How To install SquirrelMail On Ubuntu 20.04

 in This Tutorial you will learn " How To install & Configure Email Server using PostFix, Dovecot and SquirrelMail on Ubuntu 20.04 Focal Fossa

SquirrelMail is an open source web-based mail client written in PHP with support for SMTP and IMAP protocol.
Ubuntu is a Linux-based operating system.
Homepage - https://squirrelmail.org/
__________________________________________________________________________________________________
Server - Os:  Ubuntu 20.04.3 LTS 64Bit        | IP -192.168.1.80            |Hostname -  ubuntu.example.com
__________________________________________________________________________________________________
lsb_release -d ; hostname ; hostname -I

add-apt-repository ppa:ondrej/php -y ; apt-get update
apt install -y apache2 build-essential mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-cli php7.2-fpm php7.2-cgi php7.2-bcmath php7.2-curl php7.2-gd php7.2-intl php7.2-json php7.2-mbstring php7.2-mysql php7.2-opcache php7.2-sqlite3 php7.2-xml php7.2-zip php7.2-snmp php7.2-imap php7.2-common php7.2-tidy php7.2-pgsql php7.2-ldap php7.2-soap php7.2-xsl php7.2-redis php7.2-xmlrpc  postfix dovecot-imapd dovecot-pop3d

a2enmod rewrite expires ; sed -i "s/;date.timezone.*/date.timezone = Asia\/\Kolkata/" /etc/php/*/apache2/php.ini
systemctl start apache2 mariadb ; systemctl enable apache2 mariadb ; mysql_secure_installation

wget https://sourceforge.net/projects/squirrelmail/files/stable/1.4.22/squirrelmail-webmail-1.4.22.zip
unzip squirrelmail-webmail-1.4.22.zip
mv squirrelmail-webmail-1.4.22 /var/www/html/
mv /var/www/html/squirrelmail-webmail-1.4.22/ /var/www/html/squirrelmail
perl /var/www/html/squirrelmail/config/conf.pl

chown -R www-data:www-data /var/www/html/ ; chmod -R 777 /var/www/html/
nano  /etc/apache2/sites-available/yourdomain.conf
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot  /var/www/html/squirrelmail/
ServerName www.yourdomain.com
<Directory  /var/www/html/squirrelmail/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/yourdomain.com-error_log
CustomLog /var/log/apache2/yourdomain.com-access_log common
</VirtualHost>
a2ensite yourdomain.conf ; a2dissite 000-default.conf  ; apache2ctl configtest ; echo "192.168.1.80 www.yourdomain.com" >> /etc/hosts ; systemctl reload apache2 postfix dovecot

mkdir -p /var/local/squirrelmail/data/ ; chmod -R 777 /var/local/squirrelmail/data
useradd user1
passwd user1
mkdir /var/www/html/user1 ; usermod -m -d /var/www/html/user1 user1 ; chown -R user1:user1 /var/www/html/user1
mv /var/www/html/squirrelmail/config/config_default.php config.php

http://www.yourdomain.com
__________________________________________________________________________________________________


No comments:

Post a Comment