<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ssumathi</id>
	<title>ICO wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ssumathi"/>
	<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php/Special:Contributions/Ssumathi"/>
	<updated>2026-05-05T18:35:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Linux_File_Permissions&amp;diff=122553</id>
		<title>Linux File Permissions</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Linux_File_Permissions&amp;diff=122553"/>
		<updated>2017-05-16T14:24:37Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Author           : Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group            : Cyber Security Engineering &lt;br /&gt;
&lt;br /&gt;
Created on       : 29-04-2016&lt;br /&gt;
&lt;br /&gt;
Last Modified on : 01-06-2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Genuine access permissions on files and directories are the most important part of ensuring a secured website. An important security measure for systems on which multiple users (e.g. various clients on a shared server) run their websites is to make sure that one user cannot access files in another client’s web root. Determining the correct file permissions for any specific file requires one to know what type of information contained in the file and the purpose of that information. &lt;br /&gt;
&lt;br /&gt;
= Linux File Permission =&lt;br /&gt;
&lt;br /&gt;
Linux is a multi-user OS that is based on the Unix concepts of &#039;&#039;file ownership&#039;&#039; and &#039;&#039;permissions&#039;&#039; to provide security, at the file system level.Though there are already a lot of good security features built into Linux based systems, one very important potential vulnerability can exist when local access is granted - that is file permission based issues resulting from a user not assigning the correct permissions to the  files and directories.&lt;br /&gt;
&lt;br /&gt;
=== Users ===&lt;br /&gt;
&lt;br /&gt;
In Linux, there are two types of users: &#039;&#039;system users&#039;&#039; and &#039;&#039;regular users&#039;&#039;. Traditionally, system users are used to run non-interactive or background processes on a system, while regular users used for logging in and running processes interactively. When you first log in to a Linux system, you may notice that it starts out with many system users that run the services that the OS depends on--this is completely normal.&amp;lt;ref name=LFP&amp;gt; [https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions] Linux File Permissions&lt;br /&gt;
 &amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An easy way to view all of the users on a system is to look at the contents of the /etc/passwd file. Each line in this file contains information about a single user, starting with its &#039;&#039;user name&#039;&#039; [the name before the first &amp;lt;code&amp;gt; : &amp;lt;/code&amp;gt; ]. Print the passwd file with this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; cat /etc/passwd &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Groups:===&lt;br /&gt;
&lt;br /&gt;
Groups are collections of zero or more users. A user belongs to a default group, and can also be a member of any of the other groups on a server.&lt;br /&gt;
&lt;br /&gt;
An easy way to view all the groups and their members is to look in the /etc/group file on a server &amp;lt;ref name=LFP/&amp;gt;. The following command can be run, if you are curious about your groups:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; cat /etc/group &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Permission Classes =&lt;br /&gt;
&lt;br /&gt;
Each file and directory has three user based permission groups:&lt;br /&gt;
&lt;br /&gt;
=== Owner === &lt;br /&gt;
The Owner permissions (u) apply only the owner of the file or directory, they will not impact the actions of other users.&lt;br /&gt;
&lt;br /&gt;
=== Group === &lt;br /&gt;
The Group permissions (g) apply only to the group that has been assigned to the file or directory, they will not affect the actions of other users.&lt;br /&gt;
&lt;br /&gt;
=== All users ===&lt;br /&gt;
The All Users permissions (o or a) apply to all other users on the system, this is the permission group that you want to watch the most.&lt;br /&gt;
&lt;br /&gt;
= Symbolic Permissions =&lt;br /&gt;
There are sets of three characters, or triads, as they denote the permissions, in symbolic form, that each class has for a given file.&lt;br /&gt;
&lt;br /&gt;
In each triad, read, write, and execute permissions are represented in the following way:&lt;br /&gt;
&lt;br /&gt;
=== Read ===&lt;br /&gt;
The Read permission refers to a user&#039;s capability to read the contents of the file. &lt;br /&gt;
&lt;br /&gt;
Indicated by &amp;quot;&#039;&#039;&#039;r&amp;quot;&#039;&#039;&#039; in the first position.&lt;br /&gt;
&lt;br /&gt;
=== Write === &lt;br /&gt;
The Write permissions refer to a user&#039;s capability to write or modify a file or directory. &lt;br /&gt;
&lt;br /&gt;
Indicated by &amp;quot;&#039;&#039;&#039;w&amp;quot;&#039;&#039;&#039; in the second position.&lt;br /&gt;
&lt;br /&gt;
=== Execute === &lt;br /&gt;
The Execute permission affects a user&#039;s capability to execute a file or view the contents of a directory. &lt;br /&gt;
&lt;br /&gt;
Indicated by &amp;quot;&#039;&#039;&#039;x&amp;quot;&#039;&#039;&#039; in the third position. &lt;br /&gt;
&lt;br /&gt;
In some special cases, there may be a different character here&lt;br /&gt;
&lt;br /&gt;
A hyphen &#039;&#039;&#039;(-)&#039;&#039;&#039; in the place of one of these characters indicates that the respective permission is not available for the respective class. For example, if the &#039;&#039;group&#039;&#039; triad for a file is &#039;&#039;&#039;r--&#039;&#039;&#039;, the file is &amp;quot;&#039;&#039;&#039;read-only&#039;&#039;&#039;&amp;quot; to the group that is associated with the file.&amp;lt;ref name=LFP/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Checking the Permissions =&lt;br /&gt;
&lt;br /&gt;
One can view the permissions by checking the file or directory permissions in any GUI File Manager or also by reviewing the output of the &#039;&#039;&#039;&#039;&#039; &amp;lt;code&amp;gt; ls -l &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; command in the terminal and while working in the directory which contains the file or folder. &amp;lt;ref name=CP&amp;gt;[https://support.rackspace.com/how-to/checking-linux-file-permissions-with-ls/]Checking File Permissions&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The permission in the command line is displayed as: &#039;&#039;&#039;&#039;&#039;_rwxrwxrwx 1 owner:group&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
 ·The first character that is marked with an underscore is the special permission flag that can vary.&lt;br /&gt;
 ·The following set of three characters &amp;quot;&#039;&#039;&#039;rwx&amp;quot;&#039;&#039;&#039; is for the owner permissions.&lt;br /&gt;
 ·The second set of three characters &amp;quot;&#039;&#039;&#039;rwx&#039;&#039;&#039;&amp;quot; is for the group permissions.&lt;br /&gt;
 ·The third set of three characters &amp;quot;&#039;&#039;&#039;rwx&#039;&#039;&#039;&amp;quot; is for the All Users permissions.&lt;br /&gt;
 ·Following that grouping since the integer/number displays the number of hard links to the file.&lt;br /&gt;
 ·The last piece is the Owner and Group assignment formatted as Owner:Group.&lt;br /&gt;
 .Image1 illustrates well about understanding how permission is assigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Checking Permissions.gif|thumb|center|alt = Checking premissions Image.| Image1:Checking Permissions [6]]]&lt;br /&gt;
&lt;br /&gt;
= Modifying the Permissions =&lt;br /&gt;
&lt;br /&gt;
When in the command line, the permissions are edited by using the command &#039;&#039;&#039;&#039;&#039;&amp;lt;code&amp;gt; chmod &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039;. One can assign the permissions explicitly or also by using a binary reference.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Considering a file with permissions set  to &#039;&#039;&#039;_rw_rw_rw,&#039;&#039;&#039; which means that the owner, group and all users have  read and write permission. &lt;br /&gt;
&lt;br /&gt;
Now to remove the read and write  permissions from the all users group, &#039;&#039;&#039;&#039;&#039;&amp;lt;code&amp;gt; chmod a-rw filename &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; should  be executed.&lt;br /&gt;
&lt;br /&gt;
To add the above permissions again, the  command: &#039;&#039;&#039;&#039;&#039;&amp;lt;code&amp;gt; chmod a+rw filename &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; should be used. &amp;lt;ref name=UP&amp;gt; [https://www.linux.com/learn/understanding-linux-file-permissions]Understanding File Permissions&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Setting permissions using Binary References =&lt;br /&gt;
&lt;br /&gt;
Binary representation of the string rwx:  &#039;&#039;&#039;&#039;&#039;r = 4      w = 2            x = 1&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Considering  a file where the owner has read and write permissions, the group has read  permissions, and all other user have no rights to the file. &lt;br /&gt;
&lt;br /&gt;
This  scenario can be represented by &#039;&#039;&#039;&#039;&#039; &amp;lt;code&amp;gt; chmod 640 filename &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; in binary  references. &amp;lt;ref name=UP/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The  numbers should be added to get the binary representation to set the  permission.  &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Advanced Permissions =&lt;br /&gt;
&lt;br /&gt;
The special permissions flag can be marked with any of the following:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;_&#039;&#039;&#039;&#039;&#039; - no special permissions&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;d&#039;&#039;&#039;&#039;&#039; - directory&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;l&#039;&#039;&#039;&#039;&#039;- The file or directory is a symbolic link&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;s&#039;&#039;&#039;&#039;&#039; - This indicated the setuid/setgid permissions. This is not set displayed in the special permission part of the permissions display, but is represented as a &#039;&#039;&#039;s&#039;&#039;&#039; in the read portion of the owner or group permissions.&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;t&#039;&#039;&#039;&#039;&#039; - This indicates the sticky bit permissions. This is not set displayed in the special permission part of the permissions display, but is represented as a &#039;&#039;&#039;t&#039;&#039;&#039; in the executable portion of the all users permissions&lt;br /&gt;
&lt;br /&gt;
= Setuid/Setgid Special Permissions =&lt;br /&gt;
&lt;br /&gt;
The setuid/setguid permissions are used to tell the system to run an executable as the owner with the owner\&#039;s permissions.&lt;br /&gt;
&lt;br /&gt;
The setuid/setgid bit can be assigned only by explicitly defining permissions. The character for the setuid/setguid bit is &amp;quot;&#039;&#039;&#039;s&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To set the setuid/setguid bit on filename.sh,  the command &#039;&#039;&#039;&#039;&#039;&amp;lt;code&amp;gt; chmod g+s filename.sh &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; should be used &amp;lt;ref name=UP/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Sticky Bit Special Permissions =&lt;br /&gt;
&lt;br /&gt;
The sticky bit can be very useful in shared environment because when it has been assigned to the permissions on a directory it sets it so only file owner can rename or delete the said file.&lt;br /&gt;
&lt;br /&gt;
The sticky bit can only be assigned by explicitly defining permissions. The character for the sticky bit is &amp;quot;&#039;&#039;&#039;t&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
To set the sticky bit on a directory, the command &#039;&#039;&#039;&#039;&#039; &amp;lt;code&amp;gt; chmod +t directoryname &amp;lt;/code&amp;gt;&#039;&#039;&#039;&#039;&#039; should be issued &amp;lt;ref name=UP/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Examples of Modes and Permissions =    &lt;br /&gt;
&lt;br /&gt;
[[File:Calculating Permissions in Binary.gif|thumb|right|alt=Calculating Permissions.| Image2: Calculating Permissions in Binary [6] ]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Mode&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Permissions&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Explanation&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0477&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-r--rwxrwx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has read  only, other and group has rwx &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0677&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-rw-rwxrwx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has rw  only, other and group has rwx&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0444&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-r--r--r--&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|all have read  only &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0666&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-rw-rw-rw-&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|all have rw  only &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0400&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-r--------&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has read  only, group and others have no permission&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0600&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-rw-------&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has rw  only, group and others have no permission&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0470&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-r--rwx---&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has read  only, group has rwx, others have no permission &lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0407&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-r-----rwx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has read  only, other has rwx, group has no permission&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0670&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-rw-rwx---&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has rw  only, group has rwx, others have no permission&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0607&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;nowiki&amp;gt;-rw----rwx&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|owner has rw  only, group has no permission and others have rwx&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;0777&#039;&#039;&#039;&lt;br /&gt;
|rwxrwxrwx&lt;br /&gt;
|No restrictions  on permissions. Anybody may do anything. Generally not a desirable setting.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above table illustrates the permissions and explanations of specific mode. &amp;lt;ref name=LC&amp;gt; [http://linuxcommand.org/lts0070.php] Linux Commands&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A list of all numeric permissions from 0000 to 0777 can be found from the &#039;&#039;chmod&#039;&#039; &#039;&#039;commands&#039;&#039; referred below. &amp;lt;ref name=CC&amp;gt; [http://www.askapache.com/security/chmod-stat.html#chmod-0-to-7777]chmod commands&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Image2 illustrates how the permissions are calculated in binary. &amp;lt;ref name=FFP&amp;gt; [http://www.firewall.cx/linux-knowledgebase-tutorials/introduction-to-linux/299-linux-file-folder-permissions.html]File and folder permissions&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=The dangers of 777 =&lt;br /&gt;
&lt;br /&gt;
The importance of this permission issue is how your server is configured. The username you use to FTP or SSH into your server is most likely not the username used by the server application itself to serve pages.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;7&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;7&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;7&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|User&lt;br /&gt;
|Group&lt;br /&gt;
|World&lt;br /&gt;
|-&lt;br /&gt;
|r+w+x&lt;br /&gt;
|r+w+x&lt;br /&gt;
|r+w+x&lt;br /&gt;
|-&lt;br /&gt;
|4+2+1&lt;br /&gt;
|4+2+1&lt;br /&gt;
|4+2+1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Often the Apache server is &#039;owned&#039; by the &#039;&#039;&#039;www-data&#039;&#039;&#039;, &#039;&#039;&#039;dhapache&#039;&#039;&#039; or &#039;&#039;&#039;nobody&#039;&#039;&#039; user accounts. These accounts have a limited amount of access to files on the server, for a very good reason. By setting your personal files and folders owned by your user account to be World-Writable, you are literally making them World Writable. Now the www-data, dhapache and nobody users that run your server, serving pages, executing php interpreters, etc.. will have full access to your user account files.&lt;br /&gt;
&lt;br /&gt;
This provides an avenue for someone to gain access to your files by hijacking basically any process on your server, this also includes any other users on your machine. So you should think carefully about modifying permissions on your machine. Generally its not required more than 767, so when you see 777 ask why its necessary. &amp;lt;ref name=CFP&amp;gt; [http://codex.wordpress.org/Changing_File_Permissions]Changing File Permissions&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== The Worst Outcome ===&lt;br /&gt;
The worst that can happen as a result of using 777 permissions on a folder or even a file, is that if a malicious cracker or entity is able to upload a unethical file or modify a current file to execute code, they will have complete control over your blog, including having your database information and password.&amp;lt;ref name=CFP/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Summary=&lt;br /&gt;
&lt;br /&gt;
Though there are many security attributes inherent in Linux based system, any dormant vulnerability can be induced by issuing local access grant to the files and directories. Proper permissions should be assigned based on the need and it should be administrated on regular basis to avoid security issues. Understanding file permissions is an easy concept, and I hope this article would help in knowing the basic of it.&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/File_system_permissions File System Permissions]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist|30em}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Operatsioonisüsteemide administreerimine ja sidumine]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120380</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120380"/>
		<updated>2017-04-23T15:03:07Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: /* Also see */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
=Information about Thunderbird=&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The images used in this guide is just for example. Don&#039;t configure as it is in the images.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lets start to install on Ubuntu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To install Thunderbird from the default system repositories issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Installing from default repositories will give you older version of Thunderbird. If you want to install most recent version of Mozilla Thunderbird, you can use the PPA maintained by the Mozilla team.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;CTRL + ALT + T&#039;&#039;&#039; from the desktop to open terminal and add the Thunderbird repository under Ubuntu and its derivatives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next, update the system software packages using update command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you’ve updated the system, install it using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the Thunderbird is installed on your Ubuntu machine.&lt;br /&gt;
&lt;br /&gt;
Now we can step into the configuration part of the Thunderbird.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
So once your Thunderbird is installed on your machine, Open the Thunderbird and start to configure it by using following steps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you open the Thunderbird, you can see the Welcome screen, where you can choose/select you email.&lt;br /&gt;
&lt;br /&gt;
To choose your existing email &#039;&#039;&#039;Click on the Skip this and use my existing email&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Skip_this_and_use_existing_email.png|thumb|center|Thunderbird Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, Thunderbird will automatically present you with the Mail Account Setup window.&lt;br /&gt;
&lt;br /&gt;
There your email account needs to be configured.&lt;br /&gt;
&lt;br /&gt;
Type in &#039;&#039;&#039;your name&#039;&#039;&#039; as you wish it to appear on your sent email messages, &#039;&#039;&#039;your email address&#039;&#039;&#039;, and &#039;&#039;&#039;your password&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Continue&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_acc_setup_window.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now Thunderbird will attempt, and likely fail, to configure your email settings automatically. &lt;br /&gt;
&lt;br /&gt;
Click on the &#039;&#039;&#039;Manual Config&#039;&#039;&#039; button to skip this process, and to configure manually.&lt;br /&gt;
&lt;br /&gt;
[[File:Click_manual_config.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, The Thunderbird will connect to the email server and will start downloading your email messages and folders. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_configured.png|thumb|center|Mail account is configured]]&lt;br /&gt;
&lt;br /&gt;
And finally the email account is configured.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
May be sometimes, After downloading Thunderbird, the Menu Bar may not be displayed by default.&lt;br /&gt;
&lt;br /&gt;
In order to show the menu bar you must &#039;&#039;&#039;Right Click in the blank space at the top of the program and check the option for Menu Bar&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Enable_menubar.png|thumb|center|Enable the menu bar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And finally, Your email account configuration has been completed!... ;)&lt;br /&gt;
&lt;br /&gt;
=Reference=&lt;br /&gt;
&lt;br /&gt;
1- [https://support.mozilla.org/en-US/kb/installing-thunderbird-windows?cache=no/ Installing Thunderbird Windows]&lt;br /&gt;
&lt;br /&gt;
2- [https://support.mozilla.org/en-US/kb/make-thunderbird-default-mail-client?cache=no/ Make Thunderbird default mail client] &lt;br /&gt;
&lt;br /&gt;
3- [https://my.hostmonster.com/cgi/help/thunderbird/ Email Client Setup:Mozilla Thunderbird]&lt;br /&gt;
&lt;br /&gt;
4- [http://www.noip.com/support/knowledgebase/setting-up-popimap-on-thunderbird-17-0-5-for-windows/ Setting up pop and imap on Thunderbird]&lt;br /&gt;
&lt;br /&gt;
=Also see=&lt;br /&gt;
&lt;br /&gt;
1- [https://support.mozilla.org/t5/Privacy-and-security-settings/Digitally-Signing-and-Encrypting-Messages/ta-p/16330/ Digitally sign and encrypt messages using Thunderbird]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120379</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120379"/>
		<updated>2017-04-23T15:02:19Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
=Information about Thunderbird=&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The images used in this guide is just for example. Don&#039;t configure as it is in the images.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lets start to install on Ubuntu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To install Thunderbird from the default system repositories issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Installing from default repositories will give you older version of Thunderbird. If you want to install most recent version of Mozilla Thunderbird, you can use the PPA maintained by the Mozilla team.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;CTRL + ALT + T&#039;&#039;&#039; from the desktop to open terminal and add the Thunderbird repository under Ubuntu and its derivatives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next, update the system software packages using update command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you’ve updated the system, install it using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the Thunderbird is installed on your Ubuntu machine.&lt;br /&gt;
&lt;br /&gt;
Now we can step into the configuration part of the Thunderbird.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
So once your Thunderbird is installed on your machine, Open the Thunderbird and start to configure it by using following steps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you open the Thunderbird, you can see the Welcome screen, where you can choose/select you email.&lt;br /&gt;
&lt;br /&gt;
To choose your existing email &#039;&#039;&#039;Click on the Skip this and use my existing email&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Skip_this_and_use_existing_email.png|thumb|center|Thunderbird Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, Thunderbird will automatically present you with the Mail Account Setup window.&lt;br /&gt;
&lt;br /&gt;
There your email account needs to be configured.&lt;br /&gt;
&lt;br /&gt;
Type in &#039;&#039;&#039;your name&#039;&#039;&#039; as you wish it to appear on your sent email messages, &#039;&#039;&#039;your email address&#039;&#039;&#039;, and &#039;&#039;&#039;your password&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Continue&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_acc_setup_window.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now Thunderbird will attempt, and likely fail, to configure your email settings automatically. &lt;br /&gt;
&lt;br /&gt;
Click on the &#039;&#039;&#039;Manual Config&#039;&#039;&#039; button to skip this process, and to configure manually.&lt;br /&gt;
&lt;br /&gt;
[[File:Click_manual_config.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, The Thunderbird will connect to the email server and will start downloading your email messages and folders. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_configured.png|thumb|center|Mail account is configured]]&lt;br /&gt;
&lt;br /&gt;
And finally the email account is configured.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
May be sometimes, After downloading Thunderbird, the Menu Bar may not be displayed by default.&lt;br /&gt;
&lt;br /&gt;
In order to show the menu bar you must &#039;&#039;&#039;Right Click in the blank space at the top of the program and check the option for Menu Bar&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Enable_menubar.png|thumb|center|Enable the menu bar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And finally, Your email account configuration has been completed!... ;)&lt;br /&gt;
&lt;br /&gt;
=Reference=&lt;br /&gt;
&lt;br /&gt;
1- [https://support.mozilla.org/en-US/kb/installing-thunderbird-windows?cache=no/ Installing Thunderbird Windows]&lt;br /&gt;
&lt;br /&gt;
2- [https://support.mozilla.org/en-US/kb/make-thunderbird-default-mail-client?cache=no/ Make Thunderbird default mail client] &lt;br /&gt;
&lt;br /&gt;
3- [https://my.hostmonster.com/cgi/help/thunderbird/ Email Client Setup:Mozilla Thunderbird]&lt;br /&gt;
&lt;br /&gt;
4- [http://www.noip.com/support/knowledgebase/setting-up-popimap-on-thunderbird-17-0-5-for-windows/ Setting up pop and imap on Thunderbird]&lt;br /&gt;
&lt;br /&gt;
=Also see=&lt;br /&gt;
&lt;br /&gt;
1- [https://support.mozilla.org/t5/Privacy-and-security-settings/Digitally-Signing-and-Encrypting-Messages/ta-p/16330/ Digitally sign, encrypt messages using Thunderbird]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120378</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120378"/>
		<updated>2017-04-23T14:53:36Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
=Information about Thunderbird=&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The images used in this guide is just for example. Don&#039;t configure as it is in the images.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lets start to install on Ubuntu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To install Thunderbird from the default system repositories issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Installing from default repositories will give you older version of Thunderbird. If you want to install most recent version of Mozilla Thunderbird, you can use the PPA maintained by the Mozilla team.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;CTRL + ALT + T&#039;&#039;&#039; from the desktop to open terminal and add the Thunderbird repository under Ubuntu and its derivatives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next, update the system software packages using update command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you’ve updated the system, install it using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the Thunderbird is installed on your Ubuntu machine.&lt;br /&gt;
&lt;br /&gt;
Now we can step into the configuration part of the Thunderbird.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
So once your Thunderbird is installed on your machine, Open the Thunderbird and start to configure it by using following steps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you open the Thunderbird, you can see the Welcome screen, where you can choose/select you email.&lt;br /&gt;
&lt;br /&gt;
To choose your existing email &#039;&#039;&#039;Click on the Skip this and use my existing email&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Skip_this_and_use_existing_email.png|thumb|center|Thunderbird Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, Thunderbird will automatically present you with the Mail Account Setup window.&lt;br /&gt;
&lt;br /&gt;
There your email account needs to be configured.&lt;br /&gt;
&lt;br /&gt;
Type in &#039;&#039;&#039;your name&#039;&#039;&#039; as you wish it to appear on your sent email messages, &#039;&#039;&#039;your email address&#039;&#039;&#039;, and &#039;&#039;&#039;your password&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Continue&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_acc_setup_window.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now Thunderbird will attempt, and likely fail, to configure your email settings automatically. &lt;br /&gt;
&lt;br /&gt;
Click on the &#039;&#039;&#039;Manual Config&#039;&#039;&#039; button to skip this process, and to configure manually.&lt;br /&gt;
&lt;br /&gt;
[[File:Click_manual_config.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, The Thunderbird will connect to the email server and will start downloading your email messages and folders. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_configured.png|thumb|center|Mail account is configured]]&lt;br /&gt;
&lt;br /&gt;
And finally the email account is configured.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
May be sometimes, After downloading Thunderbird, the Menu Bar may not be displayed by default.&lt;br /&gt;
&lt;br /&gt;
In order to show the menu bar you must &#039;&#039;&#039;Right Click in the blank space at the top of the program and check the option for Menu Bar&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Enable_menubar.png|thumb|center|Enable the menu bar]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And finally, Your email account configuration has been completed!... ;)&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120377</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120377"/>
		<updated>2017-04-23T14:52:53Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
=Information about Thunderbird=&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The images used in this guide is just for example. Don&#039;t configure as it is in the images.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lets start to install on Ubuntu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To install Thunderbird from the default system repositories issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Installing from default repositories will give you older version of Thunderbird. If you want to install most recent version of Mozilla Thunderbird, you can use the PPA maintained by the Mozilla team.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;CTRL + ALT + T&#039;&#039;&#039; from the desktop to open terminal and add the Thunderbird repository under Ubuntu and its derivatives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next, update the system software packages using update command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you’ve updated the system, install it using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the Thunderbird is installed on your Ubuntu machine.&lt;br /&gt;
&lt;br /&gt;
Now we can step into the configuration part of the Thunderbird.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
So once your Thunderbird is installed on your machine, Open the Thunderbird and start to configure it by using following steps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you open the Thunderbird, you can see the Welcome screen, where you can choose/select you email.&lt;br /&gt;
&lt;br /&gt;
To choose your existing email &#039;&#039;&#039;Click on the Skip this and use my existing email&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Skip_this_and_use_existing_email.png|thumb|center|Thunderbird Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, Thunderbird will automatically present you with the Mail Account Setup window.&lt;br /&gt;
&lt;br /&gt;
There your email account needs to be configured.&lt;br /&gt;
&lt;br /&gt;
Type in &#039;&#039;&#039;your name&#039;&#039;&#039; as you wish it to appear on your sent email messages, &#039;&#039;&#039;your email address&#039;&#039;&#039;, and &#039;&#039;&#039;your password&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Continue&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_acc_setup_window.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now Thunderbird will attempt, and likely fail, to configure your email settings automatically. &lt;br /&gt;
&lt;br /&gt;
Click on the &#039;&#039;&#039;Manual Config&#039;&#039;&#039; button to skip this process, and to configure manually.&lt;br /&gt;
&lt;br /&gt;
[[File:Click_manual_config.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now, The Thunderbird will connect to the email server and will start downloading your email messages and folders. &lt;br /&gt;
&lt;br /&gt;
[[File:Email_configured.png|thumb|center|Mail account is configured]]&lt;br /&gt;
&lt;br /&gt;
And finally the email account is configured.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
May be sometimes, After downloading Thunderbird, the Menu Bar may not be displayed by default.&lt;br /&gt;
&lt;br /&gt;
In order to show the menu bar you must &#039;&#039;&#039;Right Click in the blank space at the top of the program and check the option for Menu Bar&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Enable_menubar.png|thumb|center|Enable the menu bar]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Enable_menubar.png&amp;diff=120376</id>
		<title>File:Enable menubar.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Enable_menubar.png&amp;diff=120376"/>
		<updated>2017-04-23T14:52:07Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Email_configured.png&amp;diff=120375</id>
		<title>File:Email configured.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Email_configured.png&amp;diff=120375"/>
		<updated>2017-04-23T14:46:14Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Manual_config.png&amp;diff=120374</id>
		<title>File:Manual config.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Manual_config.png&amp;diff=120374"/>
		<updated>2017-04-23T14:40:30Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120373</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120373"/>
		<updated>2017-04-23T14:27:46Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
=Information about Thunderbird=&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lets start to install on Ubuntu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To install Thunderbird from the default system repositories issue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Installing from default repositories will give you older version of Thunderbird. If you want to install most recent version of Mozilla Thunderbird, you can use the PPA maintained by the Mozilla team.&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;CTRL + ALT + T&#039;&#039;&#039; from the desktop to open terminal and add the Thunderbird repository under Ubuntu and its derivatives.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo add-apt-repository ppa:ubuntu-mozilla-security/ppa&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Next, update the system software packages using update command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you’ve updated the system, install it using the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install thunderbird&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And now the Thunderbird is installed on your Ubuntu machine.&lt;br /&gt;
&lt;br /&gt;
Now we can step into the configuration part of the Thunderbird.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
&lt;br /&gt;
So once your Thunderbird is installed on your machine, Open the Thunderbird and start to configure it by using following steps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Once you open the Thunderbird, you can see the Welcome screen, where you can choose/select you email.&lt;br /&gt;
&lt;br /&gt;
To choose your existing email &#039;&#039;&#039;Click on the Skip this and use my existing email&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
[[File:Skip_this_and_use_existing_email.png|thumb|center|Thunderbird Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Then, Thunderbird will automatically present you with the Mail Account Setup window.&lt;br /&gt;
&lt;br /&gt;
There your email account needs to be configured.&lt;br /&gt;
&lt;br /&gt;
Type in &#039;&#039;&#039;your name&#039;&#039;&#039; as you wish it to appear on your sent email messages, &#039;&#039;&#039;your email address&#039;&#039;&#039;, and &#039;&#039;&#039;your password&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;Continue&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_acc_setup_window.png|thumb|center|Mail account setup window]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now Thunderbird will attempt, and likely fail, to configure your email settings automatically. &lt;br /&gt;
&lt;br /&gt;
Click on the &#039;&#039;&#039;Manual Config&#039;&#039;&#039; button to skip this process, and to configure manually.&lt;br /&gt;
&lt;br /&gt;
[[File:Click_manual_config.png|thumb|center|Mail account setup window]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Click_manual_config.png&amp;diff=120372</id>
		<title>File:Click manual config.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Click_manual_config.png&amp;diff=120372"/>
		<updated>2017-04-23T14:27:12Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Mail_acc_setup_window.png&amp;diff=120371</id>
		<title>File:Mail acc setup window.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Mail_acc_setup_window.png&amp;diff=120371"/>
		<updated>2017-04-23T14:23:58Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Skip_this_and_use_existing_email.png&amp;diff=120370</id>
		<title>File:Skip this and use existing email.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Skip_this_and_use_existing_email.png&amp;diff=120370"/>
		<updated>2017-04-23T14:18:09Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120368</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120368"/>
		<updated>2017-04-23T13:35:36Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
= Information about Thunderbird =&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;br /&gt;
&lt;br /&gt;
So Installing Thunderbird on windows is done.&lt;br /&gt;
&lt;br /&gt;
Now lets see how to install Thunderbird on Ubuntu/Linux.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before You Begin&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Check your current Ubuntu version &amp;amp; Upgrade&lt;br /&gt;
&lt;br /&gt;
You can check your current Ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120357</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120357"/>
		<updated>2017-04-21T16:49:08Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
= Information about Thunderbird =&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Depending on your web browser, you may be presented with a run or save file option. &lt;br /&gt;
*If you are asked to save the file, save it to a location on your computer where you can find and open the file later.  &lt;br /&gt;
*Alternatively, if you are presented with a run option, choose to run the downloaded file automatically. &lt;br /&gt;
&lt;br /&gt;
[[File:Save_option.png|thumb|center|Save option]]&lt;br /&gt;
&lt;br /&gt;
[[File:Run_option.png|thumb|center|Run option]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Once you have run or saved , it will prompt you to the welcome screen.&lt;br /&gt;
*Click next on it, to continue.&lt;br /&gt;
&lt;br /&gt;
[[File:Welcome_screen.png|thumb|center|Welcome screen]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*So after step 3 you are successfully downloaded the Thunderbird.&lt;br /&gt;
*Now you can view the Thunderbird icon on your computer. &lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_icon.png|thumb|center|Thunderbird icon]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Thunderbird_icon.png&amp;diff=120356</id>
		<title>File:Thunderbird icon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Thunderbird_icon.png&amp;diff=120356"/>
		<updated>2017-04-21T16:32:34Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Welcome_screen.png&amp;diff=120355</id>
		<title>File:Welcome screen.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Welcome_screen.png&amp;diff=120355"/>
		<updated>2017-04-21T16:30:33Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Run_option.png&amp;diff=120354</id>
		<title>File:Run option.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Run_option.png&amp;diff=120354"/>
		<updated>2017-04-21T16:24:22Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Save_option.png&amp;diff=120353</id>
		<title>File:Save option.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Save_option.png&amp;diff=120353"/>
		<updated>2017-04-21T16:23:23Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120352</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120352"/>
		<updated>2017-04-21T16:18:23Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
= Information about Thunderbird =&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:Thunderbird_download_page.png|thumb|center|Thunderbird download page]].&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Thunderbird_download_page.png&amp;diff=120351</id>
		<title>File:Thunderbird download page.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Thunderbird_download_page.png&amp;diff=120351"/>
		<updated>2017-04-21T16:17:10Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120350</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120350"/>
		<updated>2017-04-21T16:15:58Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is a free, open source, cross-platform email.&lt;br /&gt;
*Thunderbird can manage multiple email, newsgroup, and news feed accounts and supports multiple identities within accounts.&lt;br /&gt;
*Features such as quick search, saved search folders, advanced message filtering, message grouping, and labels help manage and find messages. &lt;br /&gt;
*On Linux-based systems, system mail accounts are supported.&lt;br /&gt;
*Basically it is a local (rather than a browser or web-based) email application that is easy-to-use.&lt;br /&gt;
&lt;br /&gt;
= Information about Thunderbird =&lt;br /&gt;
&lt;br /&gt;
===Who makes Thunderbird===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is developed, tested, translated and supported by the folks at Mozilla Corporation and by a group of dedicated volunteers. &lt;br /&gt;
&lt;br /&gt;
===Is Thunderbird available for my platform?===&lt;br /&gt;
&lt;br /&gt;
*Probably Windows, Mac and Linux are available from the download page.&lt;br /&gt;
*For other operating systems,you can build Thunderbird from the source code.&lt;br /&gt;
&lt;br /&gt;
===What is my Thunderbird email?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird is an email application, so it does not provide email addresses.&lt;br /&gt;
*But It can be used with any existing email address to send, receive, sort and search your email messages.&lt;br /&gt;
&lt;br /&gt;
===Where is my personal information stored?===&lt;br /&gt;
&lt;br /&gt;
*Thunderbird stores your personal stuff(such as my messages, passwords, account information, etc) on your local drive. &lt;br /&gt;
*If you are using the IMAP protocol for accessing messages, your messages will also store on your email server.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
In this part we will see how to install Thunderbird on both windows and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
===Before we start===&lt;br /&gt;
&lt;br /&gt;
*Before installing Thunderbird, Make sure that your computer meets the System Requirements.&lt;br /&gt;
*You can check the System Requirements in this [https://www.mozilla.org/en-US/thunderbird/52.0.1/system-requirements/ Thunderbird system requirements] guide.&lt;br /&gt;
&lt;br /&gt;
===Installing Thunderbird on Windows===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1&#039;&#039;&#039;&lt;br /&gt;
*Now visit the [https://www.mozilla.org/en-US/thunderbird/ Thunderbird download page] in any browser.&lt;br /&gt;
*The page will automatically recommend the best version(s) of Thunderbird for you.&lt;br /&gt;
&lt;br /&gt;
[[File:|thumb|center|Mail Process]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120349</id>
		<title>Install and configure Thunderbird</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Install_and_configure_Thunderbird&amp;diff=120349"/>
		<updated>2017-04-21T15:48:29Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: Created page with &amp;quot;Sheela Raj  Group : Cyber Security Engineering (C21)  Subject : Authentication &amp;amp; Authorization.   = Introduction =  In this article, we will cover  how to Install and configur...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to Install and configure Thunderbird on both windows and Ubuntu.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120112</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120112"/>
		<updated>2017-04-16T13:09:22Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Create user and password===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Create some users and check using mail clients like thunderbird or outlook.&lt;br /&gt;
&lt;br /&gt;
Use the below commands to create user and password.&lt;br /&gt;
&lt;br /&gt;
To create user: &amp;lt;code&amp;gt;sudo useradd -m bobby -s /sbin/nologin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create password: &amp;lt;code&amp;gt;sudo passwd bobby&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over andthe  mail server is ready, you can send and receive mail using the server.., continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 22 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;nano /etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 23 »&#039;&#039;&#039; Edit the configuration file.&lt;br /&gt;
&lt;br /&gt;
Now edit the configuration file to uncomment the &amp;lt;code&amp;gt;&amp;lt;VirtualHost 1.2.3.4:80&amp;gt;&amp;lt;/code&amp;gt; block by removing the pound symbol (#).&lt;br /&gt;
&lt;br /&gt;
Edit the IP and ServerName to match your domain settings.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of file:&amp;lt;code&amp;gt;nano /etc/apache2/sites-available/squirrelmail&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config_file.png|thumb|center|Configuration file Example]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 24 »&#039;&#039;&#039;Enable the new virtual host.&lt;br /&gt;
&lt;br /&gt;
Now enable the virtual host by the following command.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2ensite squirrelmail.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 25 »&#039;&#039;&#039; Restart or Reload Apache service&lt;br /&gt;
&lt;br /&gt;
Restart the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or reload the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl reload apache2.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 26 »&#039;&#039;&#039; SquirrelMail&#039;s default login page.&lt;br /&gt;
&lt;br /&gt;
Now You should now be able to see SquirrelMail’s default login page in your browser after navigating to your IP address or domain.&lt;br /&gt;
&lt;br /&gt;
and you can login with the same username and password which you have created before.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of SquirrelMail’s default login page.&lt;br /&gt;
&lt;br /&gt;
[[File:Login-Squirrelmail.png |thumb|center|Squirrelmail login page]]&lt;br /&gt;
&lt;br /&gt;
And its done..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Reference= &lt;br /&gt;
&lt;br /&gt;
1- [http://www.krizna.com/ubuntu/setup-mail-server-ubuntu-14-04/#squirrelmail/ Setting up mail server on ubuntu]&lt;br /&gt;
&lt;br /&gt;
2- [https://www.linode.com/docs/email/clients/install-squirrelmail-on-ubuntu-16-04-or-debian-8/ Install squirrelmail on ubuntu]&lt;br /&gt;
&lt;br /&gt;
3- [https://www.digitalocean.com/community/tutorials/how-to-set-up-a-postfix-e-mail-server-with-dovecot/ set up a postfix e-mail server with dovecot]&lt;br /&gt;
&lt;br /&gt;
4- [http://squirrelmail.org/documentation/ SquirrelMail Documentation]&lt;br /&gt;
&lt;br /&gt;
5- [https://www.1and1.ca/cloud-community/learn/application/e-mail/set-up-a-postfix-mail-server-with-dovecot-and-squirrelmail-on-ubuntu-1604/ set up a postfix mail server with dovecot and squirrelmail on ubuntu 1604]&lt;br /&gt;
  &lt;br /&gt;
= Also see=&lt;br /&gt;
&lt;br /&gt;
1- [https://www.exratione.com/2016/05/a-mailserver-on-ubuntu-16-04-postfix-dovecot-mysql/ A mail server on ubuntu 16]&lt;br /&gt;
&lt;br /&gt;
2- [http://www.krizna.com/centos/setup-mail-server-in-centos-6/ mail server on Centos 6]&lt;br /&gt;
&lt;br /&gt;
3- [http://www.krizna.com/centos/setup-mail-server-centos-7/ mail server on Centos 7]&lt;br /&gt;
&lt;br /&gt;
4- [https://squirrelmail.org/plugins.php/ SquirrelMail Plugins]&lt;br /&gt;
&lt;br /&gt;
5- [http://www.techrepublic.com/blog/linux-and-open-source/three-great-little-squirrelmail-plugins-and-how-to-install-them/ Three great little squirrelmail plugins and how to install them]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120111</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120111"/>
		<updated>2017-04-16T12:35:06Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Step 19 » Create some users and check using mail clients like thunderbird or outlook.&lt;br /&gt;
&lt;br /&gt;
Use the below commands to create user and password.&lt;br /&gt;
&lt;br /&gt;
To create user: &amp;lt;code&amp;gt;sudo useradd -m bobby -s /sbin/nologin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to create password: &amp;lt;code&amp;gt;sudo passwd bobby&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over andthe  mail server is ready, you can send and receive mail using the server.., continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 22 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;nano /etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 23 »&#039;&#039;&#039; Edit the configuration file.&lt;br /&gt;
&lt;br /&gt;
Now edit the configuration file to uncomment the &amp;lt;code&amp;gt;&amp;lt;VirtualHost 1.2.3.4:80&amp;gt;&amp;lt;/code&amp;gt; block by removing the pound symbol (#).&lt;br /&gt;
&lt;br /&gt;
Edit the IP and ServerName to match your domain settings.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of file:&amp;lt;code&amp;gt;nano /etc/apache2/sites-available/squirrelmail&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config_file.png|thumb|center|Configuration file Example]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 24 »&#039;&#039;&#039;Enable the new virtual host.&lt;br /&gt;
&lt;br /&gt;
Now enable the virtual host by the following command.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2ensite squirrelmail.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 25 »&#039;&#039;&#039; Restart or Reload Apache service&lt;br /&gt;
&lt;br /&gt;
Restart the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or reload the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl reload apache2.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 26 »&#039;&#039;&#039; SquirrelMail&#039;s default login page.&lt;br /&gt;
&lt;br /&gt;
Now You should now be able to see SquirrelMail’s default login page in your browser after navigating to your IP address or domain.&lt;br /&gt;
&lt;br /&gt;
and you can login with the same username and password which you have created before.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of SquirrelMail’s default login page.&lt;br /&gt;
&lt;br /&gt;
[[File:Login-Squirrelmail.png |thumb|center|Squirrelmail login page]]&lt;br /&gt;
&lt;br /&gt;
And its done..&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Login-Squirrelmail.png&amp;diff=120110</id>
		<title>File:Login-Squirrelmail.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Login-Squirrelmail.png&amp;diff=120110"/>
		<updated>2017-04-16T12:19:20Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120109</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120109"/>
		<updated>2017-04-16T12:15:55Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;nano /etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 22 »&#039;&#039;&#039; Edit the configuration file.&lt;br /&gt;
&lt;br /&gt;
Now edit the configuration file to uncomment the &amp;lt;code&amp;gt;&amp;lt;VirtualHost 1.2.3.4:80&amp;gt;&amp;lt;/code&amp;gt; block by removing the pound symbol (#).&lt;br /&gt;
&lt;br /&gt;
Edit the IP and ServerName to match your domain settings.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of file:&amp;lt;code&amp;gt;nano /etc/apache2/sites-available/squirrelmail&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config_file.png|thumb|center|Configuration file Example]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 23 »&#039;&#039;&#039;Enable the new virtual host.&lt;br /&gt;
&lt;br /&gt;
Now enable the virtual host by the following command.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2ensite squirrelmail.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 24 »&#039;&#039;&#039; Restart or Reload Apache service&lt;br /&gt;
&lt;br /&gt;
Restart the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or reload the Apache service using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo systemctl reload apache2.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to see SquirrelMail’s default login page in your browser after navigating to your IP address or domain.&lt;br /&gt;
&lt;br /&gt;
Below picture is the example of SquirrelMail’s default login page.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config_file.png|thumb|center|Configuration file Example]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120108</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120108"/>
		<updated>2017-04-16T12:07:44Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;/etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 22 »&#039;&#039;&#039; Edit the configuration file.&lt;br /&gt;
&lt;br /&gt;
Now edit the configuration file to uncomment the &amp;lt;code&amp;gt;&amp;lt;VirtualHost 1.2.3.4:80&amp;gt;&amp;lt;/code&amp;gt; block by removing the pound symbol (#).&lt;br /&gt;
&lt;br /&gt;
Edit the IP and ServerName to match your domain settings.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config_file.png|thumb|center|Configuration file Example]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Squirrelmail_config_file.png&amp;diff=120107</id>
		<title>File:Squirrelmail config file.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Squirrelmail_config_file.png&amp;diff=120107"/>
		<updated>2017-04-16T12:06:02Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120106</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120106"/>
		<updated>2017-04-16T12:05:37Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;/etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 22 »&#039;&#039;&#039; Edit the configuration file.&lt;br /&gt;
&lt;br /&gt;
Now edit the configuration file to uncomment the &amp;lt;code&amp;gt;&amp;lt;VirtualHost 1.2.3.4:80&amp;gt;&amp;lt;/code&amp;gt; block by removing the pound symbol (#).&lt;br /&gt;
&lt;br /&gt;
Edit the IP and ServerName to match your domain settings.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120105</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120105"/>
		<updated>2017-04-16T12:02:17Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you want.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]]&lt;br /&gt;
&lt;br /&gt;
once you have configured save your configuration and quit the prompt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 21 »&#039;&#039;&#039; Now configure apache to enable squirrelmail.&lt;br /&gt;
&lt;br /&gt;
SquirrelMail provides a default configuration file for Apache in &amp;lt;code&amp;gt;/etc/squirrelmail/apache.conf&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Copy this configuration file into your &amp;lt;code&amp;gt;sites-available&amp;lt;/code&amp;gt; folder with the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120104</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120104"/>
		<updated>2017-04-16T11:51:03Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you wish.&lt;br /&gt;
&lt;br /&gt;
[[File:Squirrelmail_config.png|thumb|center|Squirrelmail configuration windows]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Squirrelmail_config.png&amp;diff=120103</id>
		<title>File:Squirrelmail config.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Squirrelmail_config.png&amp;diff=120103"/>
		<updated>2017-04-16T11:49:25Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120102</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120102"/>
		<updated>2017-04-16T11:48:54Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail configuration &amp;amp; installation.&lt;br /&gt;
&lt;br /&gt;
=== Installing and configuring squirrelmail===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 19 »&#039;&#039;&#039; Install squirrelmail. &lt;br /&gt;
&lt;br /&gt;
Install  squirrelmail using the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install squirrelmail&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above command will install apache and PHP packages as well. &lt;br /&gt;
&lt;br /&gt;
If not, use the below command to install apache and PHP packages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install apache2 php5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 20 »&#039;&#039;&#039; Configure squirrelmail&lt;br /&gt;
&lt;br /&gt;
Configure squirrelmail using below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo squirrelmail-configure&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have entered the above command it will prompt you a window, there you can configure it as you wish.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120092</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120092"/>
		<updated>2017-04-15T20:18:00Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command example]]&lt;br /&gt;
&lt;br /&gt;
Now the dovecot configuration is over, continue for squirrelmail installation.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120091</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120091"/>
		<updated>2017-04-15T20:15:36Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;br /&gt;
&lt;br /&gt;
[[File:Netstat.png|thumb|center|Netstat command exaample]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Netstat.png&amp;diff=120084</id>
		<title>File:Netstat.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Netstat.png&amp;diff=120084"/>
		<updated>2017-04-15T17:28:46Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: Ssumathi uploaded a new version of File:Netstat.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120083</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120083"/>
		<updated>2017-04-15T17:28:13Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.example.com&lt;br /&gt;
 250-mail.example.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring dovecot===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 13 »&#039;&#039;&#039; Install dovecot.&lt;br /&gt;
&lt;br /&gt;
Now Install dovecot using the command &amp;lt;code&amp;gt;sudo apt-get install dovecot-imapd dovecot-pop3d&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 14 »&#039;&#039;&#039; Now configure mailbox. &lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-mail.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
Find &#039;&#039;&#039;mail_location = mbox:~/mail:INBOX=/var/mail/%u&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Replace with &#039;&#039;&#039;mail_location = maildir:~/Maildir&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 15 »&#039;&#039;&#039; Now change pop3_uidl_format.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/20-pop3.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
 &lt;br /&gt;
And find and uncomment the below line &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;pop3_uidl_format = %08Xu%08Xv&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 16 »&#039;&#039;&#039; Now enable SSL.&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-ssl.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
And find and uncomment the below line.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ssl = yes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 17 »&#039;&#039;&#039; Restart dovecot service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Step 18 » Now test pop3 and imap port access using the telnet command.&lt;br /&gt;
&lt;br /&gt;
Replace the port number with your port.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;telnet mail.example.com 110&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
OR check for listening ports using netstat command &amp;lt;code&amp;gt;netstat -nl4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
you should get the result like below image.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120082</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=120082"/>
		<updated>2017-04-15T17:04:09Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access.&lt;br /&gt;
Use this code &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt; and you should get below response.&lt;br /&gt;
&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &#039;^]&#039;.&lt;br /&gt;
 220 mail.example.com ESMTP Postfix (Ubuntu)&lt;br /&gt;
&lt;br /&gt;
now type ehlo &amp;lt;code&amp;gt;mail.example.com&amp;lt;/code&amp;gt; and should get below response, please make sure you get those bolded lines.&lt;br /&gt;
&lt;br /&gt;
 ehlo mail.krizna.com&lt;br /&gt;
 250-mail.krizna.com&lt;br /&gt;
 --------&lt;br /&gt;
 &#039;&#039;&#039;250-STARTTLS&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 &#039;&#039;&#039;250-AUTH=PLAIN LOGIN&#039;&#039;&#039;&lt;br /&gt;
 ---------&lt;br /&gt;
 250 DSN&lt;br /&gt;
&lt;br /&gt;
and also try the same with other port.&lt;br /&gt;
&lt;br /&gt;
Now the Postfix configuration is over, continue for dovecot installation.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119881</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119881"/>
		<updated>2017-04-06T16:35:02Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 5 »&#039;&#039;&#039; Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 6 »&#039;&#039;&#039;Now configure certificate path.&lt;br /&gt;
&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_key_file = /etc/ssl/private/server.key&#039;&lt;br /&gt;
 sudo postconf -e &#039;smtpd_tls_cert_file = /etc/ssl/certs/server.crt&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 7 »&#039;&#039;&#039; Open &amp;lt;code&amp;gt;nano /etc/postfix/master.cf&amp;lt;/code&amp;gt; file and uncomment the below lines to enable smtps and submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 8 »&#039;&#039;&#039; Now install Dovecot SASL by typing the below command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install dovecot-common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 9 »&#039;&#039;&#039; Now Open &amp;lt;code&amp;gt;nano /etc/dovecot/conf.d/10-master.conf&amp;lt;/code&amp;gt; file and find &#039;&#039;&#039;# Postfix smtp-auth&#039;&#039;&#039; line and add the below lines.&lt;br /&gt;
&lt;br /&gt;
 # Postfix smtp-auth&lt;br /&gt;
 unix_listener /var/spool/postfix/private/auth {&lt;br /&gt;
 mode = 0660&lt;br /&gt;
 user = postfix&lt;br /&gt;
 group = postfix&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 10 »&#039;&#039;&#039; Change the Auth mechanisms.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;AUTH&#039;&#039;&#039; command is an ESMTP command (SMTP service extension) that is used to authenticate the client to the server. &lt;br /&gt;
*The AUTH command sends the clients username and password to the e-mail server.&lt;br /&gt;
*AUTH can be combined with some other keywords as &#039;&#039;&#039;PLAIN, LOGIN, CRAM-MD5 and DIGEST-MD5&#039;&#039;&#039; (e.g. AUTH LOGIN) to choose an authentication mechanism. &lt;br /&gt;
*The authentication mechanism chooses how to login and which level of security that should be used.&lt;br /&gt;
 &lt;br /&gt;
If you are not familiar with AUTH, you can check this link [http://www.samlogic.net/articles/smtp-commands-reference-auth.htm/ AUTH guide].&lt;br /&gt;
&lt;br /&gt;
*Their is a drawback of using the PLAIN and LOGIN authentication mechanisms is that the username and password can be decoded quite easy if somebody monitor the SMTP communication.&lt;br /&gt;
*To obtain higher security an authentication mechanism with the name CRAM-MD5 can be used instead. &lt;br /&gt;
*CRAM-MD5 combines a challenge-response authentication mechanism to exchange information and a cryptographic Message Digest 5 algorithm to encrypt important information. &lt;br /&gt;
&lt;br /&gt;
Here I have used CRAM-MD5 to obtain more security.&lt;br /&gt;
&lt;br /&gt;
*To set Open &amp;lt;code&amp;gt; nano /etc/dovecot/conf.d/10-auth.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
*Find the &#039;&#039;&#039;auth_mechanisms = plain&#039;&#039;&#039; and replace it with &#039;&#039;&#039;auth_mechanisms = cram-md5&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 11 »&#039;&#039;&#039; Restart postfix and dovecot services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service postfix restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service dovecot restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 12 »&#039;&#039;&#039; Now test SMTP-AUTH and smtp/pop3 port access by &amp;lt;code&amp;gt;telnet mail.example.com smtp&amp;lt;/code&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119865</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119865"/>
		<updated>2017-04-06T10:27:56Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
Step 5 » Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119864</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119864"/>
		<updated>2017-04-06T10:27:27Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
= Lets get Start =&lt;br /&gt;
&lt;br /&gt;
===Installing and configuring  postfix===&lt;br /&gt;
&lt;br /&gt;
Here i have used mail.example.com for hostname and example.com for Domain. Replace with your host and domain.&lt;br /&gt;
&lt;br /&gt;
You can use &#039;&#039;&#039;nano&#039;&#039;&#039; or &#039;&#039;&#039;vim&#039;&#039;&#039; to edit the files. In this article i have used nano to edit the files.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1 »&#039;&#039;&#039; Assign static IP and hostname and add a host entry for the host name.&lt;br /&gt;
&lt;br /&gt;
*Assign hostname in &amp;lt;code&amp;gt;nano /etc/hostname&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
*Add a host entry in &amp;lt;code&amp;gt;nano /etc/hosts&amp;lt;/code&amp;gt;&lt;br /&gt;
 mail.example.com&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2 »&#039;&#039;&#039; Update the repositories.&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3 »&#039;&#039;&#039; Install postfix and dependencies.&lt;br /&gt;
&lt;br /&gt;
*Install postfix  by &amp;lt;code&amp;gt;sudo apt-get install postfix&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During installation you will be prompted for set of details . So set it as you wish to configure.&lt;br /&gt;
&lt;br /&gt;
*You can also use the command &amp;lt;code&amp;gt;dpkg-reconfigure postfix&amp;lt;/code&amp;gt; to re-configure it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 4 »&#039;&#039;&#039; Edit and save &amp;lt;code&amp;gt;nano /etc/postfix/main.cf&amp;lt;/code&amp;gt; by adding the following lines to configure Postfix for SMTP-AUTH using Dovecot SASL &lt;br /&gt;
&lt;br /&gt;
 home_mailbox = Maildir/&lt;br /&gt;
 smtpd_sasl_type = dovecot&lt;br /&gt;
 smtpd_sasl_path = private/auth&lt;br /&gt;
 smtpd_sasl_local_domain =&lt;br /&gt;
 smtpd_sasl_security_options = noanonymous&lt;br /&gt;
 broken_sasl_auth_clients = yes&lt;br /&gt;
 smtpd_sasl_auth_enable = yes&lt;br /&gt;
 smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination&lt;br /&gt;
 smtp_tls_security_level = may&lt;br /&gt;
 smtpd_tls_security_level = may&lt;br /&gt;
 smtp_tls_note_starttls_offer = yes&lt;br /&gt;
 smtpd_tls_loglevel = 1&lt;br /&gt;
 smtpd_tls_received_header = yes&lt;br /&gt;
&lt;br /&gt;
and also add the below 3 lines to disable the weak chippers in postfix.&lt;br /&gt;
&lt;br /&gt;
 smtpd_tls_ciphers = high&lt;br /&gt;
 smtpd_tls_protocols = TLSv1,!SSLv2,!SSLv3&lt;br /&gt;
 smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4 &lt;br /&gt;
&lt;br /&gt;
Step 5 » Now generate a digital certificate for tls. Issue the commands one by one and provide details as per your domain.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; &lt;br /&gt;
 openssl genrsa -des3 -out server.key 2048&lt;br /&gt;
 openssl rsa -in server.key -out server.key.insecure&lt;br /&gt;
 mv server.key server.key.secure&lt;br /&gt;
 mv server.key.insecure server.key&lt;br /&gt;
 openssl req -new -key server.key -out server.csr&lt;br /&gt;
 openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;br /&gt;
 sudo cp server.crt /etc/ssl/certs&lt;br /&gt;
 sudo cp server.key /etc/ssl/private&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119849</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119849"/>
		<updated>2017-04-05T07:19:36Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
= Lets get start =&lt;br /&gt;
&lt;br /&gt;
Before we step into installing the mail server,&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119848</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119848"/>
		<updated>2017-04-05T07:18:52Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
» Postfix (for sending)&lt;br /&gt;
&lt;br /&gt;
» Dovecot (for receiving)&lt;br /&gt;
&lt;br /&gt;
» Squirrelmail (for web mail access)&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;br /&gt;
&lt;br /&gt;
==Lets get start==&lt;br /&gt;
&lt;br /&gt;
Before we step into installing the mail server,&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119847</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119847"/>
		<updated>2017-04-05T06:53:46Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Mail_process.png|thumb|center|Mail Process]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=File:Mail_process.png&amp;diff=119846</id>
		<title>File:Mail process.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=File:Mail_process.png&amp;diff=119846"/>
		<updated>2017-04-05T06:48:19Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119845</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119845"/>
		<updated>2017-04-05T06:46:38Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;br /&gt;
&lt;br /&gt;
===Types of Mail Servers===&lt;br /&gt;
&lt;br /&gt;
*Mail servers can be broken down into two main categories: &#039;&#039;&#039;outgoing mail servers&#039;&#039;&#039; and &#039;&#039;&#039;incoming mail servers&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
;Outgoing mail servers.&lt;br /&gt;
; &#039;&#039;&#039;SMTP&#039;&#039;&#039;, or Simple Mail Transfer Protocol, servers.&lt;br /&gt;
:When you press the &amp;quot;Send&amp;quot; button in your e-mail program, the program will connect to a server on the network/ Internet that is called an SMTP server. &lt;br /&gt;
:This protocol is used when e-mails are delivered from clients to servers and  vice versa. &lt;br /&gt;
&lt;br /&gt;
;Incoming mail servers come in two main varieties. &lt;br /&gt;
&lt;br /&gt;
; &#039;&#039;&#039;POP3&#039;&#039;&#039;, or Post Office Protocol, version.&lt;br /&gt;
:POP3 servers are known for storing sent and received messages on PCs&#039; local hard drives.&lt;br /&gt;
:When you download e-mails to your e-mail program, the program will connect to a server on the net that is known as a POP3 server. &lt;br /&gt;
;&#039;&#039;&#039;IMAP&#039;&#039;&#039;, or Internet Message Access Protocol.&lt;br /&gt;
:IMAP,servers always store copies of messages on server.&lt;br /&gt;
:It is used to retrieve e-mail messages from a mail server over a TCP/IP connection.&lt;br /&gt;
&lt;br /&gt;
===The Process of Sending an Email===&lt;br /&gt;
&lt;br /&gt;
Now that you know the basics about incoming and outgoing mail servers, it will be easier to understand the role that they play in the emailing process. The basic steps of this process are outlined below.&lt;br /&gt;
&lt;br /&gt;
Step #1: After composing a message and hitting send, your email client - whether it&#039;s Outlook Express or Gmail - connects to your domain&#039;s SMTP server. This server can be named many things; a standard example would be smtp.example.com.&lt;br /&gt;
&lt;br /&gt;
Step #2: Your email client communicates with the SMTP server, giving it your email address, the recipient&#039;s email address, the message body and any attachments.&lt;br /&gt;
&lt;br /&gt;
Step #3: The SMTP server processes the recipient&#039;s email address - especially its domain. If the domain name is the same as the sender&#039;s, the message is routed directly over to the domain&#039;s POP3 or IMAP server - no routing between servers is needed. If the domain is different, though, the SMTP server will have to communicate with the other domain&#039;s server.&lt;br /&gt;
&lt;br /&gt;
Step #4: In order to find the recipient&#039;s server, the sender&#039;s SMTP server has to communicate with the DNS, or Domain Name Server. The DNS takes the recipient&#039;s email domain name and translates it into an IP address. The sender&#039;s SMTP server cannot route an email properly with a domain name alone; an IP address is a unique number that is assigned to every computer that is connected to the Internet. By knowing this information, an outgoing mail server can perform its work more efficiently.&lt;br /&gt;
&lt;br /&gt;
Step #5: Now that the SMTP server has the recipient&#039;s IP address, it can connect to its SMTP server. This isn&#039;t usually done directly, though; instead, the message is routed along a series of unrelated SMTP servers until it arrives at its destination.&lt;br /&gt;
&lt;br /&gt;
Step #6: The recipient&#039;s SMTP server scans the incoming message. If it recognizes the domain and the user name, it forwards the message along to the domain&#039;s POP3 or IMAP server. From there, it is placed in a sendmail queue until the recipient&#039;s email client allows it to be downloaded. &lt;br /&gt;
&lt;br /&gt;
At that point, the message can be read by the recipient.&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119844</id>
		<title>Mail Server (SquirrelMail) on ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Mail_Server_(SquirrelMail)_on_ubuntu&amp;diff=119844"/>
		<updated>2017-04-05T06:05:59Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: Created page with &amp;quot;Sheela Raj  Group : Cyber Security Engineering (C21)  Subject : Authentication &amp;amp; Authorization.   = Introduction =  In this article, we will cover  how to setup mail server on...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sheela Raj&lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Subject : Authentication &amp;amp; Authorization. &lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover  how to setup mail server on Ubuntu using postfix, dovecot and squirrelmail.&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
*A mail server or e-mail server is a server that handles and delivers e-mail over a network, usually over the Internet.&lt;br /&gt;
*It receive e-mails from client computers and deliver them to other mail servers. &lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116358</id>
		<title>Monitoring Nagios</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116358"/>
		<updated>2017-01-05T08:39:30Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: /* Organize Nagios Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team: &lt;br /&gt;
Ilja Shustov,&lt;br /&gt;
Sheela Raj &lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Page Created: 10 November 2016&lt;br /&gt;
&lt;br /&gt;
‎Last modified: 05 January 2017&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover the installation of &#039;&#039;&#039;Nagios&#039;&#039;&#039;, a very popular open source monitoring system, on Ubuntu. We will cover some basic configuration, so you will be able to monitor host resources via the web interface. We will also utilize the Nagios Remote Plugin Executor (NRPE), that will be installed as an agent on remote hosts, to monitor their local resources.&lt;br /&gt;
&lt;br /&gt;
===Monitoring===&lt;br /&gt;
&lt;br /&gt;
Server monitoring  is basically scanning of the servers and network for detection of any issues, but it also monitors for user load, security and speed, if we are talking about web servers monitoring.&lt;br /&gt;
&lt;br /&gt;
===Why monitoring is important?===&lt;br /&gt;
Monitoring is important because it helps to detect the problem and prevent servers to go down, because any network crashes costs not only money but also time, so monitoring will ensure service availability.&lt;br /&gt;
&lt;br /&gt;
===Nagios===&lt;br /&gt;
Nagios is an open source application for system and networks monitoring and at the same time Nagios is one of the most popular solution for the monitoring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the Nagios you are able to:&lt;br /&gt;
&lt;br /&gt;
*Detect problems&lt;br /&gt;
*Repair Problems&lt;br /&gt;
*Plan system upgrades before outdated system will fail&lt;br /&gt;
*Respond to issues as soon as they appeared&lt;br /&gt;
*Monitor entire infrastructure&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
===Install the required package===&lt;br /&gt;
&lt;br /&gt;
As a prerequisite, Nagios requires the gcc compiler and build-essentials for the compilation, LAMP (Apache, PHP, MySQL) for the Nagios web interface and Sendmail to send alerts from the server. &lt;br /&gt;
&lt;br /&gt;
To install all those packages, run the following command (it&#039;s just 1 line):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install wget build-essential apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Users and Groups===&lt;br /&gt;
&lt;br /&gt;
Create a user &#039;&#039;&#039;nagios&#039;&#039;&#039;, and a distinct group &#039;&#039;&#039;nagcmd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;&#039;nagios&#039;&#039;&#039; and the Apache user &#039;&#039;&#039;www-data&#039;&#039;&#039;, to the &#039;&#039;&#039;nagcmd&#039;&#039;&#039; group in order to run external commands on Nagios through the web interface&lt;br /&gt;
&lt;br /&gt;
Use the following command to create:&lt;br /&gt;
&lt;br /&gt;
To create user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo useradd nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo groupadd nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add user to the group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo usermod -a -G nagcmd nagios &amp;amp;&amp;amp; sudo usermod -a -G nagcmd www-data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Nagios =&lt;br /&gt;
&lt;br /&gt;
===Download and extract Nagios===&lt;br /&gt;
&lt;br /&gt;
In your web browser, go to the [https://www.nagios.org/downloads/core-stay-informed/ Nagios Core DIY download page].It will ask you to register, If you prefer not to register for updates, click Skip to download.&lt;br /&gt;
&lt;br /&gt;
Under Nagios Core, find the release that says Latest stable release under Notes, then copy the download link to your clipboard.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download the Nagios and extract it.&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.0.tar.gz &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now move to the newly created directory, by using the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-4.2.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compile Nagios===&lt;br /&gt;
&lt;br /&gt;
Before you build Nagios, you will have to configure it with the user and the group you have created earlier.&lt;br /&gt;
&lt;br /&gt;
command to configure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-group=nagios --with-command-group=nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information please use: &amp;lt;code&amp;gt;./configure --help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now compile Nagios with this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make all&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===To install Nagios===&lt;br /&gt;
&lt;br /&gt;
Now we can run these make commands to install &#039;&#039;&#039;Nagios&#039;&#039;&#039;, init scripts, and sample configuration files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-commandmode &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-init &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-config &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And copy evenhandler directory to the nagios directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Nagios Plugins =&lt;br /&gt;
&lt;br /&gt;
Nagios Plugins allow you to monitor services like DHCP, FTP, HTTP and NTP.&lt;br /&gt;
&lt;br /&gt;
===Download and extract the Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
To use Nagios Plugins, go to [https://nagios-plugins.org/downloads/ Nagios Plugins downloads] page and copy the download link for the current stable release.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download and extract &#039;&#039;&#039;Nagios plugin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Use the following command to move back into user&#039;s home directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd ~&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget https://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios-plugins*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now Change to the newly created directory by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-plugins-2.1.2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
Install the Nagios plugin&#039;s with the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure Nagios =&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s perform the initial Nagios configuration.&lt;br /&gt;
&lt;br /&gt;
===Organize Nagios Configuration===&lt;br /&gt;
&lt;br /&gt;
Open the main Nagios configuration file in your favorite text editor(vim/nano). &lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now find and uncomment the following line by deleting the #:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;#cfg_dir=/usr/local/nagios/etc/servers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
Now create the directory named &#039;&#039;&#039;servers&#039;&#039;&#039; that will store the configuration file for each server that you will monitor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo mkdir /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the user and group for the new folder to nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo chown nagios:nagios /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios3.png|thumb|right|[https://www.howtoforge.com/tutorial/ubuntu-nagios/#step-configure-nagios/  Nagios Email]]]&lt;br /&gt;
&lt;br /&gt;
===Configure Nagios Contacts===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios contacts configuration in your favorite text editor(nano/vim).&lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/objects/contacts.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the email directive, and replace its value with your own email address&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
= Configuring Apache =&lt;br /&gt;
&lt;br /&gt;
===Enable Apache modules===&lt;br /&gt;
&lt;br /&gt;
Make sure Apache has &amp;lt;code&amp;gt;mod_rewrite&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mod_cgi&amp;lt;/code&amp;gt; enabled&lt;br /&gt;
&lt;br /&gt;
Enable the Apache rewrite and cgi modules by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2enmod rewrite &amp;amp;&amp;amp; sudo a2enmod cgi&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;htpasswd&amp;lt;/code&amp;gt; command to configure a user &#039;&#039;nagiosadmin&#039;&#039; for the nagios web interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and type your password.&lt;br /&gt;
&lt;br /&gt;
===Enable the Nagios virtualhost===&lt;br /&gt;
&lt;br /&gt;
You can enable Nagios Virtualhost by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Start Apache and Nagios===&lt;br /&gt;
&lt;br /&gt;
Start the Apache and Nagios by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When Nagios starts, you may see the following error :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Starting nagios (via systemctl): nagios.serviceFailed&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And you can fix it by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd /etc/init.d/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/init.d/skeleton /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now edit the Nagios file by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
DESC=&amp;quot;Nagios&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NAME=nagios&lt;br /&gt;
&lt;br /&gt;
DAEMON=/usr/local/nagios/bin/$NAME&lt;br /&gt;
&lt;br /&gt;
DAEMON_ARGS=&amp;quot;-d /usr/local/nagios/etc/nagios.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
PIDFILE=/usr/local/nagios/var/$NAME.lock&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable, restart apache2 and start Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo chmod +x /etc/init.d/nagios&lt;br /&gt;
&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo servuce nagios start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Nagios Server =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open your favorite web browser, and go to your Nagios server (substitute the IP address or hostname)&lt;br /&gt;
&lt;br /&gt;
(in my case: http://192.168.56.200/nagios).&lt;br /&gt;
&lt;br /&gt;
Because we configured Apache to use htpasswd, you must enter the login credentials that you created earlier.&lt;br /&gt;
&lt;br /&gt;
We used &amp;quot;nagiosadmin&amp;quot; as the username:&lt;br /&gt;
&lt;br /&gt;
[[File:Htpasswd_prompt.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Authentication page]]]&lt;br /&gt;
&lt;br /&gt;
After authenticating, you will be see the default Nagios home page: &lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_adminpage.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Homepage]]]&lt;br /&gt;
&lt;br /&gt;
In the Homepage, click on the Hosts link, in the left navigation bar, to see which hosts Nagios is monitoring:&lt;br /&gt;
&lt;br /&gt;
[[File:Hosts_link.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Hostpage]]]&lt;br /&gt;
&lt;br /&gt;
As you can see, Nagios is monitoring only &amp;quot;localhost&amp;quot;, or itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s monitor another host with Nagios!&lt;br /&gt;
&lt;br /&gt;
= Adding a Host to Monitor =&lt;br /&gt;
&lt;br /&gt;
In this section, you can see how to add a ubuntu host to Nagios server, so it will be monitored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Here replace the IP with your Nagios server IP and Ubuntu Host IP&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
Nagios Server IP : 192.168.56.200 &lt;br /&gt;
&lt;br /&gt;
Ubuntu Host IP : 192.168.56.100&lt;br /&gt;
&lt;br /&gt;
===Connect to ubuntu host===&lt;br /&gt;
&lt;br /&gt;
You can connect to Ubuntu host by using &#039;&#039;ssh&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you are not familiar with ssh use this [http://www.makeuseof.com/tag/beginners-guide-setting-ssh-linux-testing-setup/ Beginner’s Guide To Setting Up SSH On Linux]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install NRPE Service===&lt;br /&gt;
&lt;br /&gt;
Now install Nagios Plugins and NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install nagios-nrpe-server nagios-plugins&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure NRPE===&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s update the NRPE configuration file.&lt;br /&gt;
&lt;br /&gt;
Open it in your favorite editor (we&#039;re using nano):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /etc/nagios/nrpe.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the &#039;&#039;server_address&#039;&#039; directive, and add the private IP address of your Nagios server&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;server_address=192.168.56.200&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:5.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Configure NRPE]]]&lt;br /&gt;
&lt;br /&gt;
===Restart NRPE===&lt;br /&gt;
&lt;br /&gt;
Restart NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Ubuntu Host to Nagios Server===&lt;br /&gt;
&lt;br /&gt;
connect to the Nagios server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create a new file for the host configuration in &#039;&#039;/usr/local/nagios/etc/servers/&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /usr/local/nagios/etc/servers/ubuntu_host.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ubuntu Host configuration file&lt;br /&gt;
&lt;br /&gt;
define host {&lt;br /&gt;
        use                          linux-server&lt;br /&gt;
        host_name                    ubuntu_host&lt;br /&gt;
        alias                        Ubuntu Host&lt;br /&gt;
        address                      192.168.1.100&lt;br /&gt;
        register                     1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             PING&lt;br /&gt;
      check_command                   check_ping!100.0,20%!500.0,60%&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check Users&lt;br /&gt;
      check_command           check_local_users!20!50&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Local Disk&lt;br /&gt;
      check_command                   check_local_disk!20%!10%!/&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check SSH&lt;br /&gt;
      check_command                   check_ssh&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Total Process&lt;br /&gt;
      check_command                   check_local_procs!250!400!RSZDT&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find many check_command in /usr/local/nagios/etc/objects/commands.cfg file. See there if you want to add more services like DHCP, POP etc.&lt;br /&gt;
&lt;br /&gt;
And now check the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... to see if the configuration is correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_check.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios check]]]&lt;br /&gt;
&lt;br /&gt;
===Restart all services===&lt;br /&gt;
&lt;br /&gt;
On the Ubuntu Host start NRPE Service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And on the Nagios server, start Apache and Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo service nagios restart&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Ubuntu Host =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios server from the browser and see the ubuntu_host being monitored.&lt;br /&gt;
&lt;br /&gt;
The Ubuntu host is available on monitored host.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
All services monitored without error.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios ubuntu.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
= Summary =&lt;br /&gt;
Nagios is an open application for systems monitoring. &lt;br /&gt;
It has several advantages, but main of them are:&lt;br /&gt;
*Easy to install and configure&lt;br /&gt;
*Easy to to use&lt;br /&gt;
*Supports extensions and plugins&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&lt;br /&gt;
1- [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Installation]&lt;br /&gt;
&lt;br /&gt;
2- [https://www.linode.com/docs/uptime/monitoring/install-nagios-4-on-ubuntu-debian-8 Nagios tutorial]&lt;br /&gt;
&lt;br /&gt;
3- [https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-14-04 Install Nagios and monitor your servers on ubuntu]&lt;br /&gt;
&lt;br /&gt;
4- [https://blog.serverdensity.com/howto-install-nagios-in-30-minutes-and-jumpstart-your-monitoring/ Nagios in 30 minutes and jumpstart your monitoring]&lt;br /&gt;
&lt;br /&gt;
5- [https://nagios-plugins.org/doc/guidelines.html Nagios Plugins]&lt;br /&gt;
&lt;br /&gt;
6- [http://www.monitance.com/en/product-news/what-is-server-monitoring-and-why-is-it-important/ Introduction Monitoring ]&lt;br /&gt;
&lt;br /&gt;
7- [https://www.nagios.org/about/overview/ Introduction Nagios ]&lt;br /&gt;
 &lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116357</id>
		<title>Monitoring Nagios</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116357"/>
		<updated>2017-01-05T08:38:34Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: /* Organize Nagios Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team: &lt;br /&gt;
Ilja Shustov,&lt;br /&gt;
Sheela Raj &lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Page Created: 10 November 2016&lt;br /&gt;
&lt;br /&gt;
‎Last modified: 05 January 2017&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover the installation of &#039;&#039;&#039;Nagios&#039;&#039;&#039;, a very popular open source monitoring system, on Ubuntu. We will cover some basic configuration, so you will be able to monitor host resources via the web interface. We will also utilize the Nagios Remote Plugin Executor (NRPE), that will be installed as an agent on remote hosts, to monitor their local resources.&lt;br /&gt;
&lt;br /&gt;
===Monitoring===&lt;br /&gt;
&lt;br /&gt;
Server monitoring  is basically scanning of the servers and network for detection of any issues, but it also monitors for user load, security and speed, if we are talking about web servers monitoring.&lt;br /&gt;
&lt;br /&gt;
===Why monitoring is important?===&lt;br /&gt;
Monitoring is important because it helps to detect the problem and prevent servers to go down, because any network crashes costs not only money but also time, so monitoring will ensure service availability.&lt;br /&gt;
&lt;br /&gt;
===Nagios===&lt;br /&gt;
Nagios is an open source application for system and networks monitoring and at the same time Nagios is one of the most popular solution for the monitoring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the Nagios you are able to:&lt;br /&gt;
&lt;br /&gt;
*Detect problems&lt;br /&gt;
*Repair Problems&lt;br /&gt;
*Plan system upgrades before outdated system will fail&lt;br /&gt;
*Respond to issues as soon as they appeared&lt;br /&gt;
*Monitor entire infrastructure&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
===Install the required package===&lt;br /&gt;
&lt;br /&gt;
As a prerequisite, Nagios requires the gcc compiler and build-essentials for the compilation, LAMP (Apache, PHP, MySQL) for the Nagios web interface and Sendmail to send alerts from the server. &lt;br /&gt;
&lt;br /&gt;
To install all those packages, run the following command (it&#039;s just 1 line):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install wget build-essential apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Users and Groups===&lt;br /&gt;
&lt;br /&gt;
Create a user &#039;&#039;&#039;nagios&#039;&#039;&#039;, and a distinct group &#039;&#039;&#039;nagcmd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;&#039;nagios&#039;&#039;&#039; and the Apache user &#039;&#039;&#039;www-data&#039;&#039;&#039;, to the &#039;&#039;&#039;nagcmd&#039;&#039;&#039; group in order to run external commands on Nagios through the web interface&lt;br /&gt;
&lt;br /&gt;
Use the following command to create:&lt;br /&gt;
&lt;br /&gt;
To create user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo useradd nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo groupadd nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add user to the group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo usermod -a -G nagcmd nagios &amp;amp;&amp;amp; sudo usermod -a -G nagcmd www-data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Nagios =&lt;br /&gt;
&lt;br /&gt;
===Download and extract Nagios===&lt;br /&gt;
&lt;br /&gt;
In your web browser, go to the [https://www.nagios.org/downloads/core-stay-informed/ Nagios Core DIY download page].It will ask you to register, If you prefer not to register for updates, click Skip to download.&lt;br /&gt;
&lt;br /&gt;
Under Nagios Core, find the release that says Latest stable release under Notes, then copy the download link to your clipboard.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download the Nagios and extract it.&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.0.tar.gz &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now move to the newly created directory, by using the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-4.2.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compile Nagios===&lt;br /&gt;
&lt;br /&gt;
Before you build Nagios, you will have to configure it with the user and the group you have created earlier.&lt;br /&gt;
&lt;br /&gt;
command to configure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-group=nagios --with-command-group=nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information please use: &amp;lt;code&amp;gt;./configure --help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now compile Nagios with this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make all&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===To install Nagios===&lt;br /&gt;
&lt;br /&gt;
Now we can run these make commands to install &#039;&#039;&#039;Nagios&#039;&#039;&#039;, init scripts, and sample configuration files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-commandmode &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-init &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-config &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And copy evenhandler directory to the nagios directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Nagios Plugins =&lt;br /&gt;
&lt;br /&gt;
Nagios Plugins allow you to monitor services like DHCP, FTP, HTTP and NTP.&lt;br /&gt;
&lt;br /&gt;
===Download and extract the Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
To use Nagios Plugins, go to [https://nagios-plugins.org/downloads/ Nagios Plugins downloads] page and copy the download link for the current stable release.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download and extract &#039;&#039;&#039;Nagios plugin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Use the following command to move back into user&#039;s home directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd ~&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget https://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios-plugins*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now Change to the newly created directory by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-plugins-2.1.2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
Install the Nagios plugin&#039;s with the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure Nagios =&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s perform the initial Nagios configuration.&lt;br /&gt;
&lt;br /&gt;
===Organize Nagios Configuration===&lt;br /&gt;
&lt;br /&gt;
Open the main Nagios configuration file in your favorite text editor(vim/nano). &lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now find and uncomment the following line by deleting the #:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;#cfg_dir=/usr/local/nagios/etc/servers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
Now create the directory named &#039;&#039;&#039;servers&#039;&#039;&#039; that will store the configuration file for each server that you will monitor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo mkdir /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the user and group for the new folder to nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo chown nagios:nagios /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios3.png|thumb|right|[https://www.howtoforge.com/tutorial/ubuntu-nagios/#step-compile-nagios/  Nagios Email]]]&lt;br /&gt;
&lt;br /&gt;
===Configure Nagios Contacts===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios contacts configuration in your favorite text editor(nano/vim).&lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/objects/contacts.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the email directive, and replace its value with your own email address&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
= Configuring Apache =&lt;br /&gt;
&lt;br /&gt;
===Enable Apache modules===&lt;br /&gt;
&lt;br /&gt;
Make sure Apache has &amp;lt;code&amp;gt;mod_rewrite&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mod_cgi&amp;lt;/code&amp;gt; enabled&lt;br /&gt;
&lt;br /&gt;
Enable the Apache rewrite and cgi modules by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2enmod rewrite &amp;amp;&amp;amp; sudo a2enmod cgi&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;htpasswd&amp;lt;/code&amp;gt; command to configure a user &#039;&#039;nagiosadmin&#039;&#039; for the nagios web interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and type your password.&lt;br /&gt;
&lt;br /&gt;
===Enable the Nagios virtualhost===&lt;br /&gt;
&lt;br /&gt;
You can enable Nagios Virtualhost by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Start Apache and Nagios===&lt;br /&gt;
&lt;br /&gt;
Start the Apache and Nagios by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When Nagios starts, you may see the following error :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Starting nagios (via systemctl): nagios.serviceFailed&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And you can fix it by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd /etc/init.d/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/init.d/skeleton /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now edit the Nagios file by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
DESC=&amp;quot;Nagios&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NAME=nagios&lt;br /&gt;
&lt;br /&gt;
DAEMON=/usr/local/nagios/bin/$NAME&lt;br /&gt;
&lt;br /&gt;
DAEMON_ARGS=&amp;quot;-d /usr/local/nagios/etc/nagios.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
PIDFILE=/usr/local/nagios/var/$NAME.lock&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable, restart apache2 and start Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo chmod +x /etc/init.d/nagios&lt;br /&gt;
&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo servuce nagios start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Nagios Server =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open your favorite web browser, and go to your Nagios server (substitute the IP address or hostname)&lt;br /&gt;
&lt;br /&gt;
(in my case: http://192.168.56.200/nagios).&lt;br /&gt;
&lt;br /&gt;
Because we configured Apache to use htpasswd, you must enter the login credentials that you created earlier.&lt;br /&gt;
&lt;br /&gt;
We used &amp;quot;nagiosadmin&amp;quot; as the username:&lt;br /&gt;
&lt;br /&gt;
[[File:Htpasswd_prompt.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Authentication page]]]&lt;br /&gt;
&lt;br /&gt;
After authenticating, you will be see the default Nagios home page: &lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_adminpage.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Homepage]]]&lt;br /&gt;
&lt;br /&gt;
In the Homepage, click on the Hosts link, in the left navigation bar, to see which hosts Nagios is monitoring:&lt;br /&gt;
&lt;br /&gt;
[[File:Hosts_link.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Hostpage]]]&lt;br /&gt;
&lt;br /&gt;
As you can see, Nagios is monitoring only &amp;quot;localhost&amp;quot;, or itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s monitor another host with Nagios!&lt;br /&gt;
&lt;br /&gt;
= Adding a Host to Monitor =&lt;br /&gt;
&lt;br /&gt;
In this section, you can see how to add a ubuntu host to Nagios server, so it will be monitored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Here replace the IP with your Nagios server IP and Ubuntu Host IP&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
Nagios Server IP : 192.168.56.200 &lt;br /&gt;
&lt;br /&gt;
Ubuntu Host IP : 192.168.56.100&lt;br /&gt;
&lt;br /&gt;
===Connect to ubuntu host===&lt;br /&gt;
&lt;br /&gt;
You can connect to Ubuntu host by using &#039;&#039;ssh&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you are not familiar with ssh use this [http://www.makeuseof.com/tag/beginners-guide-setting-ssh-linux-testing-setup/ Beginner’s Guide To Setting Up SSH On Linux]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install NRPE Service===&lt;br /&gt;
&lt;br /&gt;
Now install Nagios Plugins and NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install nagios-nrpe-server nagios-plugins&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure NRPE===&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s update the NRPE configuration file.&lt;br /&gt;
&lt;br /&gt;
Open it in your favorite editor (we&#039;re using nano):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /etc/nagios/nrpe.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the &#039;&#039;server_address&#039;&#039; directive, and add the private IP address of your Nagios server&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;server_address=192.168.56.200&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:5.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Configure NRPE]]]&lt;br /&gt;
&lt;br /&gt;
===Restart NRPE===&lt;br /&gt;
&lt;br /&gt;
Restart NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Ubuntu Host to Nagios Server===&lt;br /&gt;
&lt;br /&gt;
connect to the Nagios server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create a new file for the host configuration in &#039;&#039;/usr/local/nagios/etc/servers/&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /usr/local/nagios/etc/servers/ubuntu_host.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ubuntu Host configuration file&lt;br /&gt;
&lt;br /&gt;
define host {&lt;br /&gt;
        use                          linux-server&lt;br /&gt;
        host_name                    ubuntu_host&lt;br /&gt;
        alias                        Ubuntu Host&lt;br /&gt;
        address                      192.168.1.100&lt;br /&gt;
        register                     1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             PING&lt;br /&gt;
      check_command                   check_ping!100.0,20%!500.0,60%&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check Users&lt;br /&gt;
      check_command           check_local_users!20!50&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Local Disk&lt;br /&gt;
      check_command                   check_local_disk!20%!10%!/&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check SSH&lt;br /&gt;
      check_command                   check_ssh&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Total Process&lt;br /&gt;
      check_command                   check_local_procs!250!400!RSZDT&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find many check_command in /usr/local/nagios/etc/objects/commands.cfg file. See there if you want to add more services like DHCP, POP etc.&lt;br /&gt;
&lt;br /&gt;
And now check the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... to see if the configuration is correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_check.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios check]]]&lt;br /&gt;
&lt;br /&gt;
===Restart all services===&lt;br /&gt;
&lt;br /&gt;
On the Ubuntu Host start NRPE Service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And on the Nagios server, start Apache and Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo service nagios restart&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Ubuntu Host =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios server from the browser and see the ubuntu_host being monitored.&lt;br /&gt;
&lt;br /&gt;
The Ubuntu host is available on monitored host.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
All services monitored without error.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios ubuntu.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
= Summary =&lt;br /&gt;
Nagios is an open application for systems monitoring. &lt;br /&gt;
It has several advantages, but main of them are:&lt;br /&gt;
*Easy to install and configure&lt;br /&gt;
*Easy to to use&lt;br /&gt;
*Supports extensions and plugins&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&lt;br /&gt;
1- [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Installation]&lt;br /&gt;
&lt;br /&gt;
2- [https://www.linode.com/docs/uptime/monitoring/install-nagios-4-on-ubuntu-debian-8 Nagios tutorial]&lt;br /&gt;
&lt;br /&gt;
3- [https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-14-04 Install Nagios and monitor your servers on ubuntu]&lt;br /&gt;
&lt;br /&gt;
4- [https://blog.serverdensity.com/howto-install-nagios-in-30-minutes-and-jumpstart-your-monitoring/ Nagios in 30 minutes and jumpstart your monitoring]&lt;br /&gt;
&lt;br /&gt;
5- [https://nagios-plugins.org/doc/guidelines.html Nagios Plugins]&lt;br /&gt;
&lt;br /&gt;
6- [http://www.monitance.com/en/product-news/what-is-server-monitoring-and-why-is-it-important/ Introduction Monitoring ]&lt;br /&gt;
&lt;br /&gt;
7- [https://www.nagios.org/about/overview/ Introduction Nagios ]&lt;br /&gt;
 &lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116356</id>
		<title>Monitoring Nagios</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Monitoring_Nagios&amp;diff=116356"/>
		<updated>2017-01-05T08:35:40Z</updated>

		<summary type="html">&lt;p&gt;Ssumathi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Team: &lt;br /&gt;
Ilja Shustov,&lt;br /&gt;
Sheela Raj &lt;br /&gt;
&lt;br /&gt;
Group : Cyber Security Engineering (C21)&lt;br /&gt;
&lt;br /&gt;
Page Created: 10 November 2016&lt;br /&gt;
&lt;br /&gt;
‎Last modified: 05 January 2017&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
In this article, we will cover the installation of &#039;&#039;&#039;Nagios&#039;&#039;&#039;, a very popular open source monitoring system, on Ubuntu. We will cover some basic configuration, so you will be able to monitor host resources via the web interface. We will also utilize the Nagios Remote Plugin Executor (NRPE), that will be installed as an agent on remote hosts, to monitor their local resources.&lt;br /&gt;
&lt;br /&gt;
===Monitoring===&lt;br /&gt;
&lt;br /&gt;
Server monitoring  is basically scanning of the servers and network for detection of any issues, but it also monitors for user load, security and speed, if we are talking about web servers monitoring.&lt;br /&gt;
&lt;br /&gt;
===Why monitoring is important?===&lt;br /&gt;
Monitoring is important because it helps to detect the problem and prevent servers to go down, because any network crashes costs not only money but also time, so monitoring will ensure service availability.&lt;br /&gt;
&lt;br /&gt;
===Nagios===&lt;br /&gt;
Nagios is an open source application for system and networks monitoring and at the same time Nagios is one of the most popular solution for the monitoring.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the Nagios you are able to:&lt;br /&gt;
&lt;br /&gt;
*Detect problems&lt;br /&gt;
*Repair Problems&lt;br /&gt;
*Plan system upgrades before outdated system will fail&lt;br /&gt;
*Respond to issues as soon as they appeared&lt;br /&gt;
*Monitor entire infrastructure&lt;br /&gt;
&lt;br /&gt;
= Before You Begin =&lt;br /&gt;
===Check your current Ubuntu version &amp;amp; Upgrade===&lt;br /&gt;
&lt;br /&gt;
You can check your current ubuntu version by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;lsb_release -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your machine is already running Ubuntu 16.04.1 LTS or higher than that, There is no need for you to upgrade the OS.&lt;br /&gt;
&lt;br /&gt;
Otherwise you need to upgrade the OS by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
This article is written for a non-root user. Commands that require elevated privileges are prefixed with &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt;. If you’re not familiar with the &amp;lt;code&amp;gt;sudo&amp;lt;/code&amp;gt; command, you can check the [https://www.linode.com/docs/tools-reference/linux-users-and-groups Users and Groups] guide.&lt;br /&gt;
&lt;br /&gt;
===Install the required package===&lt;br /&gt;
&lt;br /&gt;
As a prerequisite, Nagios requires the gcc compiler and build-essentials for the compilation, LAMP (Apache, PHP, MySQL) for the Nagios web interface and Sendmail to send alerts from the server. &lt;br /&gt;
&lt;br /&gt;
To install all those packages, run the following command (it&#039;s just 1 line):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install wget build-essential apache2 php apache2-mod-php7.0 php-gd libgd-dev sendmail unzip&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Create Users and Groups===&lt;br /&gt;
&lt;br /&gt;
Create a user &#039;&#039;&#039;nagios&#039;&#039;&#039;, and a distinct group &#039;&#039;&#039;nagcmd&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Add &#039;&#039;&#039;nagios&#039;&#039;&#039; and the Apache user &#039;&#039;&#039;www-data&#039;&#039;&#039;, to the &#039;&#039;&#039;nagcmd&#039;&#039;&#039; group in order to run external commands on Nagios through the web interface&lt;br /&gt;
&lt;br /&gt;
Use the following command to create:&lt;br /&gt;
&lt;br /&gt;
To create user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo useradd nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To create group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo groupadd nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add user to the group:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo usermod -a -G nagcmd nagios &amp;amp;&amp;amp; sudo usermod -a -G nagcmd www-data&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing Nagios =&lt;br /&gt;
&lt;br /&gt;
===Download and extract Nagios===&lt;br /&gt;
&lt;br /&gt;
In your web browser, go to the [https://www.nagios.org/downloads/core-stay-informed/ Nagios Core DIY download page].It will ask you to register, If you prefer not to register for updates, click Skip to download.&lt;br /&gt;
&lt;br /&gt;
Under Nagios Core, find the release that says Latest stable release under Notes, then copy the download link to your clipboard.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download the Nagios and extract it.&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.2.0.tar.gz &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now move to the newly created directory, by using the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-4.2.0&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compile Nagios===&lt;br /&gt;
&lt;br /&gt;
Before you build Nagios, you will have to configure it with the user and the group you have created earlier.&lt;br /&gt;
&lt;br /&gt;
command to configure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-group=nagios --with-command-group=nagcmd&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information please use: &amp;lt;code&amp;gt;./configure --help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now compile Nagios with this command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make all&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===To install Nagios===&lt;br /&gt;
&lt;br /&gt;
Now we can run these make commands to install &#039;&#039;&#039;Nagios&#039;&#039;&#039;, init scripts, and sample configuration files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-commandmode &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-init &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo make install-config &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And copy evenhandler directory to the nagios directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Nagios Plugins =&lt;br /&gt;
&lt;br /&gt;
Nagios Plugins allow you to monitor services like DHCP, FTP, HTTP and NTP.&lt;br /&gt;
&lt;br /&gt;
===Download and extract the Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
To use Nagios Plugins, go to [https://nagios-plugins.org/downloads/ Nagios Plugins downloads] page and copy the download link for the current stable release.&lt;br /&gt;
&lt;br /&gt;
Now using &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tar&amp;lt;/code&amp;gt;, download and extract &#039;&#039;&#039;Nagios plugin&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Use the following command to move back into user&#039;s home directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd ~&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download, paste the copied link after &amp;lt;code&amp;gt;wget&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wget https://nagios-plugins.org/download/nagios-plugins-2.1.2.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command to extract:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tar -xzf nagios-plugins*.tar.gz&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now Change to the newly created directory by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd nagios-plugins-2.1.2/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install Nagios plugins===&lt;br /&gt;
&lt;br /&gt;
Install the Nagios plugin&#039;s with the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo make install&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure Nagios =&lt;br /&gt;
&lt;br /&gt;
Now let&#039;s perform the initial Nagios configuration.&lt;br /&gt;
&lt;br /&gt;
===Organize Nagios Configuration===&lt;br /&gt;
&lt;br /&gt;
Open the main Nagios configuration file in your favorite text editor(vim/nano). &lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now find and uncomment the following line by deleting the #:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;#cfg_dir=/usr/local/nagios/etc/servers&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
Now create the directory named &#039;&#039;&#039;servers&#039;&#039;&#039; that will store the configuration file for each server that you will monitor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo mkdir /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the user and group for the new folder to nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo chown nagios:nagios /usr/local/nagios/etc/servers&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios3.png|thumb|right|[https://www.howtoforge.com/tutorial/ubuntu-nagios/  Nagios Email]]]&lt;br /&gt;
&lt;br /&gt;
===Configure Nagios Contacts===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios contacts configuration in your favorite text editor(nano/vim).&lt;br /&gt;
&lt;br /&gt;
We&#039;ll use nano to edit the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /usr/local/nagios/etc/objects/contacts.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the email directive, and replace its value with your own email address&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
= Configuring Apache =&lt;br /&gt;
&lt;br /&gt;
===Enable Apache modules===&lt;br /&gt;
&lt;br /&gt;
Make sure Apache has &amp;lt;code&amp;gt;mod_rewrite&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;mod_cgi&amp;lt;/code&amp;gt; enabled&lt;br /&gt;
&lt;br /&gt;
Enable the Apache rewrite and cgi modules by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo a2enmod rewrite &amp;amp;&amp;amp; sudo a2enmod cgi&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;code&amp;gt;htpasswd&amp;lt;/code&amp;gt; command to configure a user &#039;&#039;nagiosadmin&#039;&#039; for the nagios web interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and type your password.&lt;br /&gt;
&lt;br /&gt;
===Enable the Nagios virtualhost===&lt;br /&gt;
&lt;br /&gt;
You can enable Nagios Virtualhost by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Start Apache and Nagios===&lt;br /&gt;
&lt;br /&gt;
Start the Apache and Nagios by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service apache2 restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios start&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When Nagios starts, you may see the following error :&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Starting nagios (via systemctl): nagios.serviceFailed&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
And you can fix it by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cd /etc/init.d/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo cp /etc/init.d/skeleton /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now edit the Nagios file by the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo nano /etc/init.d/nagios&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And add the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
DESC=&amp;quot;Nagios&amp;quot;&lt;br /&gt;
&lt;br /&gt;
NAME=nagios&lt;br /&gt;
&lt;br /&gt;
DAEMON=/usr/local/nagios/bin/$NAME&lt;br /&gt;
&lt;br /&gt;
DAEMON_ARGS=&amp;quot;-d /usr/local/nagios/etc/nagios.cfg&amp;quot;&lt;br /&gt;
&lt;br /&gt;
PIDFILE=/usr/local/nagios/var/$NAME.lock&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make it executable, restart apache2 and start Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo chmod +x /etc/init.d/nagios&lt;br /&gt;
&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo servuce nagios start&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Nagios Server =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open your favorite web browser, and go to your Nagios server (substitute the IP address or hostname)&lt;br /&gt;
&lt;br /&gt;
(in my case: http://192.168.56.200/nagios).&lt;br /&gt;
&lt;br /&gt;
Because we configured Apache to use htpasswd, you must enter the login credentials that you created earlier.&lt;br /&gt;
&lt;br /&gt;
We used &amp;quot;nagiosadmin&amp;quot; as the username:&lt;br /&gt;
&lt;br /&gt;
[[File:Htpasswd_prompt.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Authentication page]]]&lt;br /&gt;
&lt;br /&gt;
After authenticating, you will be see the default Nagios home page: &lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_adminpage.png|thumb|center|[https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Homepage]]]&lt;br /&gt;
&lt;br /&gt;
In the Homepage, click on the Hosts link, in the left navigation bar, to see which hosts Nagios is monitoring:&lt;br /&gt;
&lt;br /&gt;
[[File:Hosts_link.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Hostpage]]]&lt;br /&gt;
&lt;br /&gt;
As you can see, Nagios is monitoring only &amp;quot;localhost&amp;quot;, or itself.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s monitor another host with Nagios!&lt;br /&gt;
&lt;br /&gt;
= Adding a Host to Monitor =&lt;br /&gt;
&lt;br /&gt;
In this section, you can see how to add a ubuntu host to Nagios server, so it will be monitored.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: Here replace the IP with your Nagios server IP and Ubuntu Host IP&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
Nagios Server IP : 192.168.56.200 &lt;br /&gt;
&lt;br /&gt;
Ubuntu Host IP : 192.168.56.100&lt;br /&gt;
&lt;br /&gt;
===Connect to ubuntu host===&lt;br /&gt;
&lt;br /&gt;
You can connect to Ubuntu host by using &#039;&#039;ssh&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you are not familiar with ssh use this [http://www.makeuseof.com/tag/beginners-guide-setting-ssh-linux-testing-setup/ Beginner’s Guide To Setting Up SSH On Linux]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.100&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Install NRPE Service===&lt;br /&gt;
&lt;br /&gt;
Now install Nagios Plugins and NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo apt-get install nagios-nrpe-server nagios-plugins&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configure NRPE===&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s update the NRPE configuration file.&lt;br /&gt;
&lt;br /&gt;
Open it in your favorite editor (we&#039;re using nano):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /etc/nagios/nrpe.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Find the &#039;&#039;server_address&#039;&#039; directive, and add the private IP address of your Nagios server&lt;br /&gt;
&lt;br /&gt;
In my case:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;server_address=192.168.56.200&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Save and exit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:5.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Configure NRPE]]]&lt;br /&gt;
&lt;br /&gt;
===Restart NRPE===&lt;br /&gt;
&lt;br /&gt;
Restart NRPE by following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Add Ubuntu Host to Nagios Server===&lt;br /&gt;
&lt;br /&gt;
connect to the Nagios server:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ssh student@192.168.56.200&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then create a new file for the host configuration in &#039;&#039;/usr/local/nagios/etc/servers/&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; sudo nano /usr/local/nagios/etc/servers/ubuntu_host.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ubuntu Host configuration file&lt;br /&gt;
&lt;br /&gt;
define host {&lt;br /&gt;
        use                          linux-server&lt;br /&gt;
        host_name                    ubuntu_host&lt;br /&gt;
        alias                        Ubuntu Host&lt;br /&gt;
        address                      192.168.1.100&lt;br /&gt;
        register                     1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             PING&lt;br /&gt;
      check_command                   check_ping!100.0,20%!500.0,60%&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check Users&lt;br /&gt;
      check_command           check_local_users!20!50&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Local Disk&lt;br /&gt;
      check_command                   check_local_disk!20%!10%!/&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Check SSH&lt;br /&gt;
      check_command                   check_ssh&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
define service {&lt;br /&gt;
      host_name                       ubuntu_host&lt;br /&gt;
      service_description             Total Process&lt;br /&gt;
      check_command                   check_local_procs!250!400!RSZDT&lt;br /&gt;
      max_check_attempts              2&lt;br /&gt;
      check_interval                  2&lt;br /&gt;
      retry_interval                  2&lt;br /&gt;
      check_period                    24x7&lt;br /&gt;
      check_freshness                 1&lt;br /&gt;
      contact_groups                  admins&lt;br /&gt;
      notification_interval           2&lt;br /&gt;
      notification_period             24x7&lt;br /&gt;
      notifications_enabled           1&lt;br /&gt;
      register                        1&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can find many check_command in /usr/local/nagios/etc/objects/commands.cfg file. See there if you want to add more services like DHCP, POP etc.&lt;br /&gt;
&lt;br /&gt;
And now check the configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... to see if the configuration is correct.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios_check.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios check]]]&lt;br /&gt;
&lt;br /&gt;
===Restart all services===&lt;br /&gt;
&lt;br /&gt;
On the Ubuntu Host start NRPE Service:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;sudo service nagios-nrpe-server restart&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And on the Nagios server, start Apache and Nagios:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
sudo service apache2 restart&lt;br /&gt;
&lt;br /&gt;
sudo service nagios restart&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Testing the Ubuntu Host =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the Nagios server from the browser and see the ubuntu_host being monitored.&lt;br /&gt;
&lt;br /&gt;
The Ubuntu host is available on monitored host.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
All services monitored without error.&lt;br /&gt;
&lt;br /&gt;
[[File:Nagios ubuntu.png|thumb|center| [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Testing Host]]]&lt;br /&gt;
&lt;br /&gt;
= Summary =&lt;br /&gt;
Nagios is an open application for systems monitoring. &lt;br /&gt;
It has several advantages, but main of them are:&lt;br /&gt;
*Easy to install and configure&lt;br /&gt;
*Easy to to use&lt;br /&gt;
*Supports extensions and plugins&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
&lt;br /&gt;
1- [https://www.howtoforge.com/tutorial/ubuntu-nagios/ Nagios Installation]&lt;br /&gt;
&lt;br /&gt;
2- [https://www.linode.com/docs/uptime/monitoring/install-nagios-4-on-ubuntu-debian-8 Nagios tutorial]&lt;br /&gt;
&lt;br /&gt;
3- [https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-14-04 Install Nagios and monitor your servers on ubuntu]&lt;br /&gt;
&lt;br /&gt;
4- [https://blog.serverdensity.com/howto-install-nagios-in-30-minutes-and-jumpstart-your-monitoring/ Nagios in 30 minutes and jumpstart your monitoring]&lt;br /&gt;
&lt;br /&gt;
5- [https://nagios-plugins.org/doc/guidelines.html Nagios Plugins]&lt;br /&gt;
&lt;br /&gt;
6- [http://www.monitance.com/en/product-news/what-is-server-monitoring-and-why-is-it-important/ Introduction Monitoring ]&lt;br /&gt;
&lt;br /&gt;
7- [https://www.nagios.org/about/overview/ Introduction Nagios ]&lt;br /&gt;
 &lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
[[Category:Monitoring]]&lt;/div&gt;</summary>
		<author><name>Ssumathi</name></author>
	</entry>
</feed>