Email server setup, for an organization depends on many things like, the organization’s size, business requirements, volume of email etc.
An emal server can be of a standalone machine. or it could be a complex distributed one.
Here, we will discuss the email server setup requirements, specially the design and deployment requirements to configure a complete email server with a single box.
This setup is ideal for small organizations, where the server is being used for all the basic operations mentioned below.
Email server can be deployed as internet-facing or behind a firewall. both scenarios have different preparations, advantages and disadvantages. we will try to describe the requirements for both scenarios. Now, lets talk about email server’s basic operations, an email server tipycally performs these basic operations:
- Send/Receive Emails
- Provide Email Storage
- Provide Webmail Service
- Spam & Virus Filtering
So, Our configured email server must provide the above services. Email server setup can be done in both Linux and windows platform. here, we will describe linux server requirements for example.
To setup an email server on Linux, we need to follow these basic steps:
- Install the Preferred OS
- Assign static IP
- Assign Hostname as FQDN.
- Install MTA
- Install POP/IMAP Service
- Install Webmail.
- Install Email filter App, and Finally
- Configure DNS A and MX record for the domain.
Now, Lets see the detail diagram and explanations of the two email server scenarios.
1. Internet Facing Email Server
In this diagram, we deployed our server as internet-facing, with a public IP (184.108.40.206). the server hostname is “mailer.mailserverguru.com”. this mail server is performing the basic operations mentioned above.
Email flow and delivery:
3. Users are pulling email to their Outlook by connecting to the POP/IMAP service. POP/IMAP service will retrieve email from the inbox and delivers to user’s desktop.
4. Users can access the webmail to send/receive emails from the web browser.
5. Users will send email through this server, it will receive email from the local user and deliver it to the destination server.
6. during send/receive all emails are scanned & filtered by the email scanner installed at the server, this is an optional service because sometimes organizations liked to take email filtering services from third-party providers.
2. Email Server Setup Behind Firewall
In this scenario, Our server configuration has slight change. Now it has two Lan cards, one for the local network and the other for the public internet. Email will be received by the public ip from the internet and private ip will be used for the local email receiving.
The key advantage of this design is that local users can send/receive email to the server with a private IP address, even if the internet connection is down. They can also mail each other within the office without using the public internet because they will have wire-speed access to the server. To set up the email server with this design, we must set up all of the services to listen on all of the server’s available IPs.
To access the server with the same hostname from both public and private network, we can setup local DNS server for name resolution with private IP, as we already mapped hostname with public IP in the Public DNS.
Email flow and delivery:
email flow and delivery will be the same like the previous diagram. only it is capable to send/receive email using the private network.