To configure a full server Mail on Ubuntu we need: Postfix Mail Server, Dovecot and Squirrelmail (Webmail).
<p dir="auto">The virtual email system consists of:<br /> -SMTP Server (MTA) Postfix<br /> -IMAP Server and POP Dovecot<br /> -SMTP Auth Extension (SASL) for user authentication in order to accept delivery mail (relaying)<br /> -SMTP and Pop/Imap communication with SSL/TLS<br /> -Users and virtual domains are saved in a MYSQL database. <p dir="auto"><b>1. First step is to install Apache2 and PHP5: <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmeH8dbKcpiEwLRk46z72KtYpeZtzX7BRJmJcUvk97tXMU/b94d9f4c-3bf5-4109-af1d-af91ea8d875a.jpg" alt="b94d9f4c-3bf5-4109-af1d-af91ea8d875a.jpg" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmeH8dbKcpiEwLRk46z72KtYpeZtzX7BRJmJcUvk97tXMU/b94d9f4c-3bf5-4109-af1d-af91ea8d875a.jpg 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmeH8dbKcpiEwLRk46z72KtYpeZtzX7BRJmJcUvk97tXMU/b94d9f4c-3bf5-4109-af1d-af91ea8d875a.jpg 2x" /><br /> <i>*Photo from Google. <p dir="auto"><i>Apache is an open source HTTP server. It supports a wide variety of modules. Some supported languages are: Mod_perl, Mod_python, Mod_SSL, TCL and PHP. Another quality of the Apache server is virtual hosting, which consists of the possibility to host multiple sites simultaneously on the same server. <p dir="auto"><i>PHP: Hypertext Preprocessor - is a general-purpose, open source Code scripting language, which is especially suitable for web application development and can be integrated into HTML. <p dir="auto">For installing Apache2 and PHP5 we need to run from the Terminal console the following commands: <pre><code><b>$ sudo apt-get update $ sudo apt-get install apache2 php5 <p dir="auto"><b>2. Install Postfix Mail Server <p dir="auto">Next step is to install Postfix Mail Server.<br /> <i>Postfix is a mail transfer agent - MTA, who is responsible for sending and receiving mails. <p dir="auto">You must also set firewall access to the following ports:<br /> <code>SMTP: 25<br /> POP3: 110<br /> IMAP: 143<br /> SMTP Secure: 465<br /> MSA: 587<br /> IMAP Secure: 993<br /> POP3 Secure: 995 <p dir="auto">From the Terminal we need to run the following command: <pre><code><b>$ sudo apt-get install postfix <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmcw5BndKmaeN12DZdJKRtY6GxaYUG8FtHGR8V2JkyMvAv/Untitled.jpg" alt="Untitled.jpg" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmcw5BndKmaeN12DZdJKRtY6GxaYUG8FtHGR8V2JkyMvAv/Untitled.jpg 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmcw5BndKmaeN12DZdJKRtY6GxaYUG8FtHGR8V2JkyMvAv/Untitled.jpg 2x" /> <p dir="auto">During installation, simply accept all of the defaults at each prompt to complete the process. <p dir="auto">After the installation, run the following command to configure Postfix: <p dir="auto"><code><b>$ sudo dpkg-reconfigure postfix <p dir="auto">And enter the following values: <pre><code> 1. Internet Site. 2. System Mail Name: <b>your.domanin 3. Root and postmaster mail recipient: <b>root 4. Other destinations for mail: <b>$myhostname, your.domain, localhost.your.domain, localhost, mail.your.domain 5. Force synchronous updates on mail queue?: <b>NO 6. Local networks: <b>127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 7. Mailbox size limit (bytes): <b>0 8. Local address extension character: <b>+ 9. Internet protocols to use: <b>all <p dir="auto">Next, we adjust some settings: <p dir="auto">We set the <i>home_mailbox variable to <i>Maildir/. Configure <i>home_mailbox and set the location of the <i>virtual_alias_maps table by typing: <p dir="auto"><code><b>$ sudo postconf -e 'home_mailbox= Maildir/'<br /> $ sudo postconf -e 'virtual_alias_maps= hash:/etc/postfix/virtual' <p dir="auto">Nextstep is to edit the virtual maps file: <p dir="auto"><code><b>$ sudo nano /etc/postfix/virtual <p dir="auto">Put in the file the following line and save:<br /> <b>suport@your.domain <p dir="auto">Restart Postfix to save the changes: <p dir="auto"><code><b>$ sudo systemctl restart postfix <p dir="auto"><b> 3. Install Dovecot <p dir="auto">Step 3 is to install Dovecot. <p dir="auto"><i>Dovecot is an IMAP and POP3 email server for Linux who uses very little memory. <p dir="auto">Run from Terminal the following command: <p dir="auto"><code><b>$ sudo apt-get install dovecot-core dovecot-imapd <p dir="auto">Set permissions on the <i>/var/mail: <p dir="auto"><code><b>$ sudo chmod 777 /var/mail <p dir="auto"><b> 4. Install Squirrelmail <p dir="auto">Step 4 is to install Squirrelmail. <p dir="auto"><img src="https://images.hive.blog/768x0/https://steemitimages.com/DQmQ5FWWfYB9PrW2NXXv21fYJL4MksnwvGRc6Zpg3acobDt/Untitle9d.png" alt="Untitle9d.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/DQmQ5FWWfYB9PrW2NXXv21fYJL4MksnwvGRc6Zpg3acobDt/Untitle9d.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/DQmQ5FWWfYB9PrW2NXXv21fYJL4MksnwvGRc6Zpg3acobDt/Untitle9d.png 2x" /> <p dir="auto"><i>SquirrelMail is a webmail service written in PHP. Supports IMAP and SMTP protocols. Does not require very many resources and is very easy to install. <p dir="auto">To install it run in Terminal the following command: <p dir="auto"><code><b>$ sudo apt-get install squirrelmail <p dir="auto">Edit Apache configurations <p dir="auto"><code><b>$ sudo nano /etc/apache2/sites-available/example.com.conf <p dir="auto">in <i>VirtualHost to add an alias for Squirrelmail: <p dir="auto"><code><b>...<br /> <VirtualHost *:80><br /> ServerName your.domain <p dir="auto">Alias /squirrelmail /usr/share/squirrelmail<br /> ... <p dir="auto">Save and restart Apache: <p dir="auto"><code>$ sudo systemctl restart apache2 <p dir="auto"><b>After restart, open in browser: your.domain/squirrelmail <p dir="auto"><h2>Thanks for reading. Stay close for more ! <p dir="auto"><center><img src="https://images.hive.blog/768x0/https://steemitimages.com/400x400/https://steemitimages.com/DQmV6ZwR4LE2xCXvJVfdXpRzLKAmRWGABPhxoyiLGinMaC6/Steemit-big.png" srcset="https://images.hive.blog/768x0/https://steemitimages.com/400x400/https://steemitimages.com/DQmV6ZwR4LE2xCXvJVfdXpRzLKAmRWGABPhxoyiLGinMaC6/Steemit-big.png 1x, https://images.hive.blog/1536x0/https://steemitimages.com/400x400/https://steemitimages.com/DQmV6ZwR4LE2xCXvJVfdXpRzLKAmRWGABPhxoyiLGinMaC6/Steemit-big.png 2x" /> <p>
As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!
Your Post Has Been Featured on @Resteemable!
Feature any Steemit post using resteemit.com!
How It Works:
1. Take Any Steemit URL
2. Erase
https://
3. Type
re
Get Featured Instantly & Featured Posts are voted every 2.4hrs
Join the Curation Team Here | Vote Resteemable for Witness
For webmail I use roundcubemail, more beauty and easy to use !
Indeed Roudcube is easier to use. I tried him and also Horde. They're all very good.