0% found this document useful (0 votes)
69 views10 pages

Tutorial Email Service

This document provides instructions for setting up an email server on Ubuntu Server 20.04 using Postfix, Dovecot, and Squirrelmail. The instructions include steps to install and configure each component, set up two user accounts, test email functionality, and access the webmail interface. The overall duration of the activity is estimated to be 3 hours.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views10 pages

Tutorial Email Service

This document provides instructions for setting up an email server on Ubuntu Server 20.04 using Postfix, Dovecot, and Squirrelmail. The instructions include steps to install and configure each component, set up two user accounts, test email functionality, and access the webmail interface. The overall duration of the activity is estimated to be 3 hours.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER

ADMINISTRATION

EMAIL SERVICES (Postfix, Dovecot and Squirrelmail)

CODE & COURSE : DFN 50303


PROGRAMME : DNS
SUB-TOPIC : 2.5
CLO : CLO1: Construct different type of services using open source
application server that can provide efficient and control access
to all resources in a Campus Area Network (CAN). (P4, PLO3)
DURATION : 3 HOURS

Activity Outcomes:
By the end of this hands-on session, you should be able to:
a) Setting up a Mail Server on Ubuntu Server 20.04
b) Understand how Email services works

Duration: 3 hours

Activity 4A-01: Configure Webmail using Postfix, Dovecot and Squirrelmail


In this activity, you have to install Postfix, Dovecot and Squirrelmail in completing the mail
server implementation.

1. After your Linux system has been loaded.

2. Run the Terminal application.

3. Before we install postfix, we need to be sure that firewall is NOT distracting our jobs. For
learning purpose only, we will stop firewall for temporary use.

4. Check the network status for the server. At the command prompt, type service systemd-
networkd status and press Enter.
Is there any Standard Output and/or Standard Error displayed on the terminal screen? Why?

5. Update server. At the command prompt, type sudo apt-get update and press Enter.
Is there any Standard Output and/or Standard Error displayed on the terminal screen? Why?

6. Login as root. At the command prompt, type sudo -i and press Enter.
Is there any Standard Output and/or Standard Error displayed on the terminal screen? Why?
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION

7. Allow in firewall, type sudo ufw allow postfix and press Enter.

8. Edit hostname file. At the command prompt, type nano /etc/hostname and press Enter. Type
the new mail domain as shown by the example below.
Input Replace: mailpkt.com

9. Next, add new host entry in hosts file. At the command prompt, type nano /etc/hosts and
press Enter.
Input Replace: 127.0.0.1 localhost
127.0.1.1 mailpkt.com
10.20.30.128 mailpkt.com

10. Install the postfix service. At the command prompt, type apt-get install postfix and press Enter.

11. A configuration dialogue will be prompted out and need to be configured to continue the
installation. Follow the steps below to continue the installation process of Postfix.
Configuration file can be edit thru /etc/postfix/main.cf or can be implement thru CLI using
command: dpkg-reconfigure postfix
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION
System mail configuration type:
Input Replace: Internet Site

System mail name:


Input Replace: mailpkt.com

Root and postmaster mail recipient:


Input Replace: postmaster
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION
Other Destinations to Accept mail for (Blank for none):
Input Replace: mailpkt.com, localhost.mailpkt.com, localhost

Local networks detail:


Input Replace: 10.20.30.0/24 10.20.30.128/24 <-- IP address server
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION

12. Reload postfix configuration in server. At the command prompt, type service postfix reload and
press Enter.

13. At the command prompt, type apt-get install dovecot-common in order to install dovecot SASL.

14. Continue to install package imap and pop3 in dovecot. At the command prompt, type apt-get
install dovecot-imapd dovecot-pop3d and press Enter.

15. Change directory location to /etc/dovecot/conf.d/. Create a backup file for 10-master.conf and
10-auth.conf before editing the main file.

16. Follow this step to configure dovecot. Open file 10-master.conf using editor and modify
the following parameters.

17. Follow this step to configure dovecot. Open file 10-auth.conf using editor and modify
the following parameters.

18. To reload the new file configuration in server, at the command prompt, type service dovecot
restart and press Enter.

19. Adding TWO (2) new user to the system. (hint: adduser)
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION
20. Verify the email agent Mail Transfer Agent (MTA) are running successfully using command line.
Test SMTP-AUTH protocols by telnet the mail address domain.

21. This lab continues from LAMP server configuration. If you did not install LAMP package, please
install package apache, mysql and php before proceed this configuration.

22. Change directory to /var/www/html. Verify the location using command pwd at the terminal
prompt.

23. Install Squirrelmail service as our webmail. Download package Squirrelmail at the command
prompt.
Type: wget http://downloads.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-
webmail-1.4.22.zip

24. Install unzip package to open the compress file. At the command prompt, type apt-get install
unzip.
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION
25. Unzip the package using command unzip squirrelmail-webmail-1.4.22.zip.

26. Rename the folder squirrelmail-webmail-1.4.22 to mail.

27. Modify the permission and ownership folder mail to give access control for server to manage the
service. At the command prompt type:
chown –R www-data:www-data mail
chmod –R 755 mail

28. Copy file /var/www/html/mail/config_default.php to a new name


/var/www/html/mail/config.php.

29. Edit the file using suitable editor. Change the parameters according to variable below:

30. To reload the new file configuration in server, at the command prompt, type service apache2
restart and press Enter.

31. Identify your location in terminal prompt. Current location should be /var/www/html/mail.
Configure the Squirrelmail by using the steps below. At the command prompt, type: ./configure
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION
DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION

32. Next, restart the Apache services. At the command prompt, type service apache2 restart

33. The final output will be shown as below.


DFN 50303 OPEN SOURCE SERVER GUIDE 4: EMAIL SERVER
ADMINISTRATION

You might also like