Configuration SquirrelMail on FreeBSD Operating system
Procedure of Configuration SquirrelMail on FreeBSD Operating system
Table of content
SquirrelMail
- Introduction to SquirrelMail
- SquirrelMail requirement
Apache
- Installation of Apache22 web server
PHP5
- Introduction to PHP5
- Installation of PHP5
- Configure Apache22 web server for PHP5
Postfix
- Introduction to Postfix
- Installation Postfix
- Configuration Postfix
Dovecot
- Introduction to dovecot
- Install Dovecot IMAP server
- Configure Dovecot
SquirrelMail installation and configuration
- Installation of SquirrelMail
- Configure SquirrelMail
Virtual Host
- Introduction to virtual host
- Configure Virtual Host for mail server
MySQL server
- Install MySQL server
- Configure MySQL server
Postfix Admin
- Install Postfix Admin
- Configure Postfix Admin
- Example of Adding new domain
Introduction to SquirrelMail
SquirrelMail is a standards-based web mail package written in PHP. It includes built-in pure PHP support for the IMAP and SMTP protocols, and all pages render in pure HTML 4.0 (with no JavaScript required) for maximum compatibility across browsers. It has very few requirements and is very easy to configure and install. SquirrelMail has all the functionality you would want from an email client, including strong MIME support, address books, and folder manipulation.
SquirrelMail requirement
In order to install and configure SquirrelMail there are some requirement:
- SquirrelMail
- Apache22
- PHP5
- Dovecot
- Postfix
- Postfix Admin
- MySQL server
Installation of Apache22 web server
1. Install Apache HTTP Server 2.20 by using FreeBSD Ports Collection:
# cd /usr/ports/www/apache22
[pic]
# make install clean
[pic]
2. A Apache HTTP Server script apache22.sh is located at /usr/local/etc/rc.d to provide Apache HTTP Server start and shutdown service. To enable Apache web server to automatically start whenever after server reboots, issue the following command at CLI:
echo ‘apache22_enable =”YES”‘ >> /etc/ rc.conf
[pic]
3. To start Apache HTTP web server immediately, use:
# /usr/local/sbin/apachectl start
or
# /usr/local/etc/rc.d/apache22.sh start
or
# apacheclt restart
[pic]
4. Testing apache service
Open web browser and type ”
The result is “It work!”
5. Apache installation finished.
Introduction to PHP5
PHP is a scripting language originally designed for producing dynamic web pages. It has evolved to include a command line interface capability and can be used in standalone graphical applications.
Installation of PHP5
1. Install by enter the following commands on FreeBSD OS command line #/usr/ports/lang/php5
[pic]
#make install
[pic]
2. If you’re prompted, select “use Apache 2.x instead”.
3. Continue with the following commands to install PHP5 extensions and modules to enable the support of the modules in Apache:
#cd /usr/ports/lang/php5-extensions
[pic]
#make config
[pic]
4. At Options for php5-extension 1.0 menu, select all PHP extensions and modules that you may use with Apache web server. This is a part of the configuration for PHP, where you need to enable features of PHP that come in modules, such as ability to manage user sessions, interface with databases and many others. Default extensions such as ctype functions support, HASH Message Digest Framework support, session support and etc have been selected. Other popular extensions that you most likely to be in used are MySQL database support and GD library support. Use space bar to select or unselect the extensions and press Enter when done.
5. Continue the installation of php5-extensions with the following commands:
# make install
Configure Apache22 web server
1. Edit the Apache configuration file in order to enable Apache web server to load the PHP modules when initialization:
2. Go to Apache configuration file location by
# cd /usr/local/etc/apache2/
[pic]
3. Edit Apache configuration file by
# ee httpd.conf
[pic]
4. Search for LoadModule lines, after the last LoadModule line, but within the same section, add the following lines:
DirectoryIndex index.php index.php3 index.html
DirectoryIndex index.php3 index.html
DirectoryIndex index.php index.html index.htm
DirectoryIndex index.html
[pic]
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
[pic]
Note: After you install PHP5 the LoadModule php5_module line will add automatic it mean that your php5 is work with apache
[pic]
5. Copy /usr/local/etc/php.ini-dist to /usr/local/etc/php.ini (in same directory), which will enable you to tune and change the default settings of behaviors of PHP.
[pic]
6. Start the Apache HTTP web server by using apachectl start (or restart Apache HTTP web server by using apachectl restart). apachectl is located in /usr/local/sbin, if you encounter
[pic]
Command not found problem, try to change directory to its location.
7. PHP5 installation done.
8. Testing php installation by change to path /usr/local/www/apache22/data
#cd /usr/local/www/apache22/data
Create file and then add content below
#ee test.php
Open web browser and type “”
The page information display means that php5 is successful installed on your computer
[pic]
Introduction to Postfix
Postfix is a free and open source mail transfer agent (MTA), a computer program for the routing and delivery of email. It is intended as a fast, easy-to-administer, and secure alternative to the widely-used Sendmail MTA.
Installation Postfix
1.Change directory to /usr/ports/mail/postfix
#cd /usr/local/mail/postfix [pic]
2. Start installation postfix
# make install
[pic]
it will connect to internet to download package to install on your computer(so you have to connect your computer have connection with internet first) but if you have package it already you can copy this package into /usr/ports/distfiles all the necessary package will load from this location
3. Select package to install
[pic]
Important packet
SASL 2
TLS
MySQL
[pic]
4. Edit rc.conf file
[pic]
Add the following line
sendmail_enable=”NO”
sendmail_submit_enable=”NO”
sendmail_outbound_enable=”NO”
sendmail_msp_queue_enable=”NO”
postfix_enable=”YES”
[pic]
5. Restart postfix service
[pic]
Note: In the distfiles folder is all package that use to install postfix so you can copy this package into /usr/ports/distfiles it no need to download any package for another installation
Configuration Postfix
1. Change directory to /usr/local/etc/postfix/
# cd /usr/local/etc/postfix/
2. Edit file main.cf
# ee main.cf
Add your domain name in line 77
[pic]
Add your network in line 254
[pic]
Add host name of your computer
[pic]
Add ip address of your mail server
[pic]
Add masquerade_domains
[pic]
Restart Postfix server
[pic]
Testing Postfix
[pic]
Introduction to dovecot
Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind. Developed by Timo Sirainen, Dovecot was first released in July 2002. Dovecot primarily aims to be a lightweight, fast and easy to set up open source mailserver.
Install Dovecot
1. Change directory to /usr/ports/mail/dovecot
# cd /usr/ports/mail/dovecot
2. Install dovecot packet
# make install
Configure Dovecot
1. Change directory to /usr/local/etc
# cd /usr/local/etc
2. Copy configuration file
# cp dovecot-example.conf dovecot.conf
3. Edit file dovecot.conf
# ee dovecot.conf
Make sure that protocols is imap and pop3 on line 24
[pic]
Checkout “#” from socket listen in line 985
[pic]
Checkout “#” from client in line 990
[pic]
Add the following line at client {
[pic]
Edit /etc/rc.conf file and add this line in order to enable dovecot service
[pic]
Installation of SquirrelMail
1. Chang directory to /usr/ports/mail/squirrelmail
# cd /usr/ports/mail/squirrelmail
2. Install SquirrelMail packet
# make install
Configure SquirrelMail
1. Change directory to /usr/local/www/squirrelmail
# cd /usr/local/www/squirrelmail
2. Configure SquirrelMail
# ./configure
[pic]
You can defines your Organization Preferences, Server setting, folder Defaults and other information depend on you requirement of your Company/Organization
Example:
setting on Organization
type 1 press enter key
type 1 press enter key
Write your Organization Name. press enter key.
Example: SquirrelMail press enter key
press S to save setting.
press R to return to main menu.
Example: Change domain name setting .
press key 2
press key 1
enter your domain name for example .kh
press s to save configuration
press r to return back
3. Create /usr/local/etc/apache22/Includes/squirrelmail.conf file with below content :
Alias /squirrelmail/ "/usr/local/www/squirrelmail/"
AllowOverride None
Options None
Order allow,deny
Allow from all
4. Open web browser and type
[pic]
5. Login in to SquirrelMail
[pic]
Introduction to virtual host
Virtual hosting is a method that servers such as web servers use to host more than one domain name on the same computer, sometimes on the same IP address.
Configure Virtual Host for mail server
1. Change directory to /usr/local/etc/apache22/
# cd /usr/local/etc/apache22/
2. Edit httpd.conf
# ee httpd.conf
Edit on line 455 add Include file
[pic]
3. Change directory to /usr/local/etc/apache22/extra/
# cd /usr/local/etc/apache22/extra/
4. Copy the template Virtual host configuration file
# cp httpd-vhosts.conf mail..kh.conf
5. Edit mail..kh.conf file
Add ip address for mail server into Name Virtual host
[pic]
Add Virtual host information
[pic]
6. Restart apache service
# apachectl restart
Restart dovecot service
# /usr/local/etc/rc.d/dovecot restart
7. Access to mail web site
Open web browser with
[pic]
Introduction to MySQL
MySQL is a relational database management system (RDBMS)[1] which has more than 11 million installations.[2] The program runs as a server providing multi-user access to a number of databases.
Install MySQL server
1. Change directory to /usr/ports/databases/mysql50-server/
# cd /usr/ports/databases/mysql50-server/
2. Install MySQL packet
# make install
Configure MySQL server
1. Restart MySQL service
# /usr/local/etc/rc.d/mysql-server restart
2. Add MySQL admin user and password
# mysqladmin -u root -p password P@ssw0rd
3. Login MySQL
# mysql –p
Note: MySQL command useful
1. To create database: create database database-name;
2. View database: show databases;
3. Delete database: drop database database-name;
Introduction to postfix admin
Postfix Admin is a web based interface used to manage mailboxes, virtual domains and aliases. It also features support for vacation/out-of-the-office messages.
Install Postfix Admin
1. Change directory to /usr/ports/mail/postfixadmin/
# cd /usr/ports/mail/postfixadmin/
2. Install PostfixAdmin packet
# make install
Configure Postfix Admin
1. Change directory to /usr/local/www/postfixadmin/images/
#cd /usr/local/www/postfixadmin/images/
2. Assign permissions
#chmod 777 *.gif *.png
3. Change directory to /usr/local/www/postfixadmin/languages/
# cd /usr/local/www/postfixadmin/languages/
4. Assign permission
#chmod 777 *.lang
5. Change directory to /usr/local/www/postfixadmin/templates/
# cd /usr/local/www/postfixadmin/templates/
6. Assign permission
#chmod 640 *.tpl
7. Change directory to /usr/local/www/postfixadmin/users/
# cd /usr/local/www/postfixadmin/users/
8. Assign permission
#chmod 777 *.php
9. change directory to /usr/local/www/postfixadmin
#cd /usr/local/www/postfixadmin
10. Add MySQL database
#mysql -u root < DATABASE_MYSQL.TXT
11. Change directory to /usr/local/www/postfixadmin/
# cd /usr/local/www/postfixadmin/
12. Configure PostfixAdmin file
# ee config.inc.php
Find like below and add this content
$CONF['default_language'] = 'en';
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'postfixadmin';
$CONF['database_name'] = 'postfix';
$CONF['encrypt'] = 'md5crypt';
$CONF['domain_path'] = 'YES';
$CONF['domain_in_mailbox'] = 'NO';
$CONF['quota'] = 'YES';
$CONF['footer_text'] = 'Return to mail..kh‘;
$CONF['footer_link'] = '';
13. Open web browser and type:
it require username and password of postfixadmin user
[pic]
Add New domain via Postfix admin
1. Open postfixadmin page => select New Domain and then add new domain name
[pic]
2. Change directory to /etc/namedb
[pic]
3. Add new zone configuration for .kh domain
[pic]
4. change directory to /etc/namedb/master
[pic]
5. create new zone for .kh
[pic]
6. Add configuration for .kh zone
[pic]
7. Open web browser and type
[pic]
The End!
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- configuration squirrelmail on freebsd operating system
- treasury pa
- stockton university
- cost sheet format
- p11 form united nations personal history form
- hippo texture analysis at your fingertips
- the format of the ijopcm first submission
- oracle 10g rac on linux using vmware server
- part 1 introduction temple mis
Related searches
- free operating system downloads
- operating system memory management
- memory management operating system ppt
- operating system memory management pdf
- ti 84 operating system download
- operating system structure
- operating system structure pdf
- web operating system ppt
- operating system powerpoint
- free linux operating system downloads
- operating system ppt download
- operating system ppt presentation