Skip to content

Install and configure a ubuntu 18.04 mail server with SMTP IMAP and Webmail RoundCube

License

Notifications You must be signed in to change notification settings

josemariaaguilera/mail-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install and configure a webmail.

we are going to install a web email service, for it, we need to undestand how it works.

image

Mail system architecture:

Transfer agents (MTA), inside of this we have:

  • MTA of distribution (SMTP). It send mails between servers.
  • MTA of end delivery (POP3, IMAP). them allow the user to manage his mail through a remote machine, that is, allow them to communicate with his email server.

User agents (MDA), is an application that works as a client, collects and sends email, there are different types of user agents for email:

  • A email client aplication or MUA (Mail User Agent) allows you to store emails locally, not needing to be connected to read them.
  • A web interface, which is accessed with a web browser, it is confortable because it allows you to view and store messages from anywhere, although it may be slower.

image

Steps in send/receive mail.

  • Alice compose through her User Agent, a message addressed to the destination user's email.
  • The computer asks the DNS server for the address of the domain name of your mail server. As we are going to do a local test, we will change our local file to assign host names to IP addresses in /etc/hosts.
  • The message is sent with SMTP to the mail server of the Alice user, in the same way it sends it to the destination mail server.
  • Bob's mail server locates the message in the mailbox, Bob invokes his User Agent to read the message using POP3 or IMAP.

Tools Used

  • Ubuntu-18.04 as operating systems.
  • VirtualBox to run the operating systems.
  • Vagrant as development environment.
  • Apache2 as HTTP Server, it is open-source and free. It is write in php.
  • RoundCube as Webmail.
  • MySQL as database.
  • Dovecot for IMAP and POP3.
  • Postfix for SMTP.

The first thing that we have doing is install vagrand and create a file vagrantfile, we need to open the ports of all the protocols that we are using. we give to the virtual machine the IP: 192.168.56.100

We install in our virtual machine: mysql, apache2, php, roundcube, dovecto, postfix and two user for send email betwen they. Link to the extens explain

We put in the browser the address of our service 192.168.56.100. We log in with the user vagrant.

image

We have two users, mati and sammy. mati send an email to sammy:

image

We can see how sammy receive it:

image

To automate server installation and configuration

Now that we have automated the installation and configuration of the server, we are going to deploy two servers to check the communication between them.

We just have to duplicate the tasks.

Issues to take into account to mount two servers.

As we can see the servers communicate properly.

image

About

Install and configure a ubuntu 18.04 mail server with SMTP IMAP and Webmail RoundCube

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 77.9%
  • Shell 22.1%