X

Rate Us :



Share with Friends :

Menu

Mail Server :

It is a default service in Linux OS which is used to send and receive email from one user to other user, one domain to other domain or one system to other system with the help of different types of services.


SMTP (Simple Mail Transfer Protocol) :

It has default port number as 25 and it is used to send the email.


POP3 (Post Office Protocol v3) :

It has default port number as 110 and it is used to access mailbox. It don't maintain any backup copy for the mail.


IMAP (Internet Mail Access Protocol) :

It has default port number as 143 and it is used to access mail account. It maintain backup copy for each mail.


Unix/Linux based mail server :


  • Sendmail




  • Postfix




  • Qmail




  • Smail




  • Exim




SquirrelMail :

It is used to send and receive mails in Graphical User Interface(GUI) mode with the browser. It is also known as Webmail.

To configure SquirrelMail in CentOS 7 or RHEL 7 download its application from internet.

Link :

Download SquirrelMail


Requirements for Postfix :


Installation package : postfix*.rpm Port numbers : 25 (SMTP) , 110 (POP3) , 143 (IMAP) Configuration file : /etc/postfix/main.cf Service/Daemon : postfix


Configure Mail Server :


Check the system IP address - [root@localhost~]#ifconfig [Let say, IP address - 192.168.0.180] Assign the hostname temporary and permanent - [root@localhost~]#hostname mail.algovalley.com Edit hostname - [root@localhost~]#vi /etc/hostname The hostname file will be opened, go to insert mode by pressing i/I/o/O/a/A (any one of them) then write : mail.algovalley.com Then go to Ex: mode by pressing Esc then Shift + : and type wq to save and exit. Add the host entries with IP Address - [root@localhost~]#vi /etc/hosts The hosts file will be opened, go to insert mode by pressing i/I/o/O/a/A (any one of them) then write : 192.168.0.180 mail.algovalley.com mail Then go to Ex: mode by pressing Esc then Shift + : and type wq to save and exit. [reboot the system to apply changes] Install the packages for Mail Server - [root@localhost~]#yum install postfix* -y Edit the configuration file - [root@localhost~]#vi /etc/postfix/main.cf Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 76 and 83 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 76 myhostname = mail.algovalley.com 83 mydomain = algovalley.com Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Update the service - [root@localhost~]#service postfix restart


Configure SquirrelMail Server :


Install all the SquirrelMail requirement application - [root@localhost~]#yum install mod_ssl* perl* curl* php* hunspell-en* tmpwatch* httpd* dovecot* -y Install SqirrelMail application - [root@localhost~]#rpm -ivh --force squirrelmail* Edit the first configuration file - [root@localhost~]#vi /etc/dovecot/conf.d/10-mail.conf Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 25 and 119 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 25 mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u 119 [Remove # to enable the mail_access_groups = mail] Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Edit the second configuration file - [root@localhost~]#vi /etc/dovecot/conf.d/10-auth.conf Set the line number - Go to Esc mode by pressing Shift + : and then type se nu Go to Line no. - 10 and 100 and edit by going to insert mode by pressing Esc then i/I/o/O/a/A (any one of them) 10 [Remove # to enable the disable_plaintext_auth = no] 100 auth_mechanisms = plain login Then go to Ex: mode by pressing Esc then Shift + : and type wq! to save and exit. Enter into SquirrelMail database location - [root@localhost~]#cd /usr/share/squirrelmail Copy all files into var/www/html - [root@localhost~/usr/share/squirrelmail]#cp -r * /var/www/html Update the service - [root@localhost~]#service httpd restart [root@localhost~]#service dovecot restart [root@localhost~]#service postfix restart Create two users with password - [root@localhost~]#useradd user1 [root@localhost~]#useradd user2 [root@localhost~]#passwd pass1 [root@localhost~]#passwd pass2 To verify open the browser - Type URL : mail.algovalley.com or 192.168.0.180