Email Server configuration and Web Email configuration

Email Server configuration and Web Email configuration

1. Email Server Configuration 

A Mail Server or E-Mail Server is a software program that distributes files or information in response to requests sent by email, mail servers are also used on bitnet to provide services similar to ftp.

Email Server configuration and Web Email configuration


In addition the mail server can also be used as an application used to install email. Common protocols used in mail servers include the SMTP, POP3 and IMAP protocols.

a. SMTP (Simple Mail Transfer Protocol) 

Used as a standard for storing and distributing email.

b. POP3 (Post Office protocol v3) and IMAP (Internet Mail application protocol)

In order for users to access and read email remotely, they do not need to log into the mail server machine shell system but simply connect a certain port with a mail client that implements POP3 and IMAP protocols.

On the mail server there are 2 different servers, namely :

a. Outgoing Server (sending email) : 

The Server protocol that it uses is SMTP (Simple Mail Transfer Protocol) on port 25.

b. Incoming Server (receiving email) : 

The server addressing protocol is POP3 (Post Office protocol) on port 110 or IMAP (Internet message Access Protocol) on port 143.

How A Mail Server Works :

When an e-mail is sent, the e-mail is sent on the e-mail server into a single file based on the purpose of the e-mail. This File contains source and destination information, and includes the date and time of delivery. 

By the time a user reads an e-mail, the user has accessed the e-mail server and read the files stored in the server that are visible to the user's browser.


2. Mail Server Configuration 

a. Install postfix with the command:

Sudo apt-get install postfix

Then the apt-get program will request the replacement of the package made by postfix


b. Postfix configuration

Select the configuration to be used with the capabilities of the mail server to be created, select the internet site. 

This option is used to configure postfix to send email directly to other mail servers on the internet.


c. Next fill in the domain name


d. The postfix installation process is complete, 

Enter the configuration stage

Open the / etc / postfix / main file. cf :

nano / etc / postfix / main. cf


e. Accept configuration on, myhostname: 

With the host name used.

The next step is the automatic configuration of SASL. Please add this line into the file / etc / postfix / main.cf.

ome_mailbox = Maildir/

smtpd_sasl_type = dovecot

smtpd_sasl_path = private / authenticate

smtpd_sasl_local_domain = domain name

smtpd_sasl_security_options = anonymous

broken_sasl_auth_clients = yes

smtpd_sasl_auth_enable = yes

smtpd_recipient_restrictions =

permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

smtp_tls_security_level = mei

smtpd_tls_security_level = mei

smtp_tls_note_starttls_offer = yes

smtpd_tls_loglevel = 1

smtpd_tls_received_header = yes


f. Create a digital certificate.

Enter the following commands one after the other to create a digital certificate.

server openssl genrsa-des3-exit.key 2048

openssl rsa-server.server lock-out.keys.not safe

MV server.key server.keys.safe

MV server.keys.the server is not secure.key

openssl req-new key server.server lock-out.csr

openssl x509-req-365 days - on the server.CSR-signkey server.lock-out

server.crt

lowered server cp.crt / etc / ssl / certificate

lowered server cp./ etc / ssl / private key


g. Run the openssl req-new-key server command.server lock-out.csr

After entering the command openssl req-new-key server.server lock-out.csr, you will be asked to share data such as the following examples :

Country name: ID

Name of state or Province: North Sumatra

Locality name: Medan

Organization name: jhon

Organizational unit name: mail server

Common name: jhon

Email address : Jhon@gmail.com

Challenge password: password

Preferred company name: Jhon


h. Certificate Path Configuration

Next configure the certificate path. Enter the following commands one by one :

sudo postconf-e 'smtpd_tls_key_file = / etc / ssl / private / server.key'

sudo postconf-e ' smtpd_tls_cert_file = /etc/ssl / certificates / server.crt'


Next install devocot, dovecot will be used to receive emails from outside. Here is how to install dovecot and configure dovecot on ubuntu server:

a. Install devocot using the command :

sudo apt-get install Dovecot-imapd Dovecot-pop3d


b. Mailbox configuration 

By creating a file

/etc / dovecot / conf.d / 10-letter.conf.

nano / etc / dovecot / conf.d / 10-letter.conf

Find shared rows :

mail_location = inbox:~ / mail: inbox= / var / mail / %u 

Expected to be 

mail_location = mail directory:~ / Mail Directory


c. Open the / etc/dovecot / conf file.d / 20-pop3.conf 

And remove the hash mark before pop3_uidl_format = %08Xu%08Xv.

nano / etc / dovecot / conf.d / 20-pop3.conf


d. Next step enable SSL. 

open the / etc / dovecot / conf file.d / 10-ssl.conf 

and remove the hash mark before ssl = yes.

nano / etc / dovecot / conf.d / 10-ssl.conf


e. Restart dovecot :

sudo service Dovecot restart

Test the pop3 and imap ports of dovecot that have been created via telnet.

telnet JHON 110

the output is like this :

Tried 127.0.1.1...

Connect to jhon.com

The Escape character is'^]'.

+ OK Dovecot (Ubuntu) ready.

Checking can also be done with Pioneer :

netstat-nlpt


3. Configure The Web Mail Server

Webmail server is a means that allows users to access e-mail via webin other words web mail server is an interface in other words an e-mail contained in the web so that if you open the e-mail we have to open the web first with an internet connection and this is web-based.

WebMail can be used for E-mail accounts that must be done together with several people, for example having a primary contact e-mail address by nature info@perusahaan.com and there are few people who have the right to answer incoming e-mails. 

In such a situation, WebMail is suitable because it can be accessed together, can receive all outgoing and incoming e-mail in one place, and can request which e-mail has been replied to.

Not everyone uses the same computer to access email or often without bringing a laptop or personal computer, it could be in the office using an office computer and at home using your own computer. 

But sometimes when at home still receive e-mail. WebMail is suitable for use because your e-mail data is stored on the server so there will be no problem if accessed from anywhere.


4. Configure web mail

To access and access the mail server via the web (browser), squirrelmail is used. With access via the web, you will certainly learn in writing, receiving and checking emails. 

In addition to squirrelmail, you can also use rouncube and others.


a. Install squirrelmail, select Use command :

sudo apt-get install squirrelmail


b. Next Create squirrelmail to be accessible via the web.

Type the following commands one by one :

sudo cp/etc / squirrelmail / apache.conf / etc / apache2 / sitesavailable / squirrelmail.conf

sudo a2site squirrelmail


c. Restart apache with the command :

sudo service apache2 restart



Squirrelmail installation process is complete and can be accessed through your domain.com/squirrelmail or IP / squirrelmail.

Post a Comment

Previous Post Next Post

Contact Form