WEB MAIL SERVER
A. Learning objectives:
Webmail is an email service that is accessed through a web browser, without the need for an email client application such as Microsoft Outlook or Mozilla Thunderbird. In the context of the Debian 11 operating system, Webmail is usually provided as part of an email server configured by a network or system administrator.
B. Preparation of Tools and Materials:
Hardware:
LAPTOP
Software:
-VMware Workstation/VMware Player
-ISO Debian 11 (can be downloaded from https://www.debian.org/distrib/)
Minimum Specifications:
RAM: 2 GB (recommended 4 GB)
Storage: 20 GB
Processor: Dual-core
Installation process:
2. The cd /etc/bind command is used to enter the directory, then ls is used to display all the contents of the files and folders in it. Various important files are visible such as named.conf, named.conf.local, and named.conf.options which are the main files in the DNS server configuration. In addition, there are also zone files such as db.local, db.domain, db.0, db.127, and db.ip, which contain zone settings for resolving domain names to IP addresses. The rndc.key file is used for remote DNS control (RNDC) authentication, while zones.rfc1918 and named.conf.default-zones are used for default zone and private network settings. All of these files have an important role in running the DNS server function on the Debian Linux system.
3. nano named.conf.local, which is done in the /etc/bind directory. This command is used to open the named.conf.local configuration file using the nano text editor. The named.conf.local file is an important part of the BIND DNS Server configuration, because it is used to define local DNS zones managed by the server, such as forward and reverse zones. In this file, administrators can add internal domain configurations that will be served by the DNS server, including defining zone database files such as db.domain or db.ip. By opening this file, users can edit or add new zones so that the DNS server can recognize and direct domain names to certain IP addresses according to local network needs.
4. displays the contents of the named.conf.local configuration file on the BIND DNS Server system. This file is used to define domain zones managed locally by the server. At the beginning of the file there are several lines of comments explaining that local configuration can be added here, and suggesting the use of the zones. rfc1918 zone file for internal networks if needed. Next, there is a forward zone configuration for the "satria.com" domain, where the server acts as a master and its domain data is stored in the /etc/bind/db.domain file. In addition, there is also a reverse zone for the "192.168.229" network, which is used to translate IP addresses into domain names, with data stored in the /etc/bind/db.ip file. Both of these zones allow the DNS server to answer name-to-IP mapping requests and vice versa within the local network. This configuration is an important part of managing DNS internally in an organization or network lab.
5. open the named.conf.options file using the nano text editor. This file is located in the /etc/bind directory, and is one of the important configuration files in the BIND DNS Server settings. The main function of named.conf.options is to set global parameters or general options that will apply to all DNS operations, such as forwarders settings, access control, directories, and other options.
6. BIND DNS server configuration named named.conf.options using nano text editor. This file is located in the /etc/bind directory and is one of the important files used to set global options of the DNS service run by BIND. With the nano named.conf.options command, users can directly edit the forwarders configuration using the ip 192.168.229.195, which is used to forward DNS queries to an external server if the local server does not know the answer to the request. In addition, this file can also set security parameters such as allow-query and allow-recursion, which limit who can use the DNS server for name resolution requests. The settings in this file affect the overall performance and security of the server, so network administrators must be careful in setting its values. Usually, changes to this file are followed by a restart of the BIND service so that the new configuration can be applied. Thus, the named.conf.options file acts as a center for setting overall DNS server operational policies.
7. namely nano db.domain, which is used to open the DNS zone file db.domain using the nano text editor. This file is located in the /etc/bind directory and is an important part of the BIND DNS Server configuration. The db.domain file functions as a forward zone, which contains mapping data from domain names to IP addresses (name to IP mapping). records. In the context of DNS, this file is the center of information for a particular domain, for example satria.com, where host names such as www.satria.com or mail.satria.com will be mapped to the appropriate IP address. This configuration is crucial to ensure that clients on the network can find and access the services offered by the server through the domain name. Therefore, the compilation and editing of the db.domain file must be done carefully to avoid errors in name resolution on the local network.
8. displays the contents of the db.domain file, which is the DNS forward zone file for the satria.com domain.
The line @ IN NS satria.com. indicates that satria.com. is the name server for this zone. Then, there are two A record entries that map the satria.com domain and the mail.satria.com subdomain to the IP address 192.168.229.195. This entry allows clients on the network to find the IP address of the domain name, so they can connect to the appropriate web server or mail server. This configuration is essential to ensure that name-based network services can function properly within the local environment.
9. Then enter the nano db.ip command, The nano db.ip command is used in the terminal to open a file named db.ip using the Nano text editor. Nano is a simple and easy-to-use text editor in Unix or Linux-based operating systems. With this command, users can edit the db.ip file directly in the terminal.
12. change the search section to the configured domain, for example, destinationjesatoe.net, and replace the nameserver with the server IP address (192.168.229.195). We can also use the Gateway IP from the server (192.168.229.195). After the configuration is complete, press CTRL+X, then Y, and ENTER on the keyboard.
13. Then check the status on bind9, by typing systemctl status bind9, Then check the status on bind9, by typing systemctl status bind9, The systemctl status bind9 command is used to check the status of the BIND9 (Berkeley Internet Name Domain) service on a Linux/Unix-based system. BIND9 is software used to provide DNS (Domain Name System) services.
15. The apt install postfix dovecot-imapd dovecot-pop3d -y command is used to install an email service on a Linux-based system, especially Debian or Ubuntu. In this case, Postfix manages sending and receiving emails between servers, while Dovecot provides a service for users to access their emails. The dovecot-imapd package allows users to read emails directly from the server using the IMAP protocol, which is suitable if email is accessed from multiple devices, while dovecot-pop3d allows emails to be downloaded to the user's device using the POP3 protocol. The additional option -y is used so that the installation process runs automatically without the need for manual confirmation. With this command, your system will be ready to become an email server that can send, receive, and serve email access for users.
16. For the general email configuration type, select Internet Site, because we want this server to be able to send and receive emails directly over the internet or local network.
17. Then, in the System mail name menu, we will fill in the column with mail name.<domain name of server>, which is the main domain name that will be used by the email server. This name will appear as the identity of our mail server. For example, if you send an email later, it will appear like user@mail.<domain name>.
18. This command creates a Maildir directory in /etc/skel, with a format suitable for Dovecot (IMAP/POP3). This Maildir is where incoming mail is stored per user.
In other words, every new user will automatically have their own Maildir folder on their homepage, and can immediately use it to receive and store mail. With the command maildirmake.dovecot /etc/skel/Maildir.
19. The nano /etc/postfix/main.cf command is used to open and edit Postfix's main configuration file, main.cf. This file defines various important settings regarding how the mail server operates.
20. Then change the hostname to the domain name you want to use, then change it in the my destination section, here with the domain name used, then add the IP in the my network section with the server IP and gateway IP, if you have clicked CTRL + X, Y, ENTER.
21. If you have done the setup process for the postfix configuration, the next step is to create two user accounts that will serve as the sender and recipient of email. Use the adduser command to create these accounts, and be sure to set a password for each user. The passwords should be customized to your own preferences.
Testing:
SeenNow, let's try sending an email from user satria to user sulton via a Telnet connection using the telnet mail.satria.com command. This port 25 functions as an SMTP protocol path used to send messages over the network. Once connected, enter the command mail from: satriaaa to specify the sender's address, then type rcpt to: sulton to specify the recipient of the email. Next, enter the data and then fill in the email message as desired. Don't forget to end the message with a dot (.) As a sign of the end of the email content. After that, type the quit command to exit the Telnet session.