I tried all possible way but unable to clear the task.
Solution:
sudo su -
yum install -y postfix
vi /etc/postfix/main.cf
myhostname = stmail01.stratos.xfusioncorp.com
mydomain = stratos.xfusioncorp.com
myorigin = $mydomain
inet_interfaces = all
#inet_interfaces = localhost
mydestination = $myhostname, localhost.$mudomain. localhost,
mydestination = $myhostname, localhost.$mudomain. localhost, $mydomain
home_mailbox = Maildir/ #uncomment
mynetworks = 168.100.189.0/28, 127.0.0.0/8
systemctl enable --now postfix
systemctl status postfix
Create User
useradd -m james
echo “LQfKeWWxWD” | passwd --stdin james
=======================================================
telnet stmail01 25
EHLO localhost
mail from:[email protected]
rcpt to:[email protected]
DATA
test mail
.
quit
=======================
su - james
ls
cd Maildir/
cat new/1754424947.V400028I4c80083M945570.stmail01.stratos.xfusioncorp.com
========================
yum install dovecot -y
Configure Dovecot
vi /etc/dovecot/dovecot.conf
:set nu
protocols = imap pop3 lmtp submission
!include conf.d/*.conf #uncomment
vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir # line 24
vi /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = yes #Line 10
auth_mechanisms = plain login #Line 100
vi /etc/dovecot/conf.d/10-master.conf # Line 100
unix_listener auth-userdb {
#mode = 0660
user = postfix
group = postfix
}
systemctl enable --now dovecot
sudo systemctl restart dovecot
systemctl status dovecot
Validation:
=========================================================
[root@stmail01 ~]# telnet stmail01 110
Trying 172.16.238.17…
Connected to stmail01.
Escape character is ‘^]’.
+OK Dovecot ready.
user james
+OK
pass LQfKeWWxWD
+OK Logged in.
retr 1
+OK 529 octets
Return-Path: [email protected]
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from localhost (stmail01 [172.16.238.17])
by stmail01.stratos.xfusioncorp.com (Postfix) with ESMTP id B4A8D4C80079
for [email protected]; Tue, 5 Aug 2025 20:13:57 +0000 (UTC)
Message-Id: [email protected]
Date: Tue, 5 Aug 2025 20:13:57 +0000 (UTC)
From: [email protected]
test mail
.
quit
[root@stmail01 ~]# ss -tulnp
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 127.0.0.11:39604 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.11:36663 0.0.0.0:*
tcp LISTEN 0 100 0.0.0.0:143 0.0.0.0:* users:((“dovecot”,pid=4969,fd=42))
tcp LISTEN 0 100 0.0.0.0:110 0.0.0.0:* users:((“dovecot”,pid=4969,fd=24))
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:((“sshd”,pid=1227,fd=3))
tcp LISTEN 0 100 0.0.0.0:25 0.0.0.0:* users:((“master”,pid=3296,fd=13))
tcp LISTEN 0 100 0.0.0.0:995 0.0.0.0:* users:((“dovecot”,pid=4969,fd=26))
tcp LISTEN 0 100 0.0.0.0:993 0.0.0.0:* users:((“dovecot”,pid=4969,fd=44))
tcp LISTEN 0 100 0.0.0.0:587 0.0.0.0:* users:((“dovecot”,pid=4969,fd=16))
tcp LISTEN 0 100 [::]:143 [::]:* users:((“dovecot”,pid=4969,fd=43))
tcp LISTEN 0 100 [::]:110 [::]:* users:((“dovecot”,pid=4969,fd=25))
tcp LISTEN 0 128 [::]:22 [::]:* users:((“sshd”,pid=1227,fd=4))
tcp LISTEN 0 100 [::]:25 [::]:* users:((“master”,pid=3296,fd=14))
tcp LISTEN 0 100 [::]:995 [::]:* users:((“dovecot”,pid=4969,fd=27))
tcp LISTEN 0 100 [::]:993 [::]:* users:((“dovecot”,pid=4969,fd=45))
tcp LISTEN 0 100 [::]:587 [::]:* users:((“dovecot”,pid=4969,fd=17))