Hi,
Can somebody from Kodekloud engineer support manually pass this task for me please? No matter how many times I’ve completed and successfully tested mail flow it returns an error saying - Mail not received!, 'dovecot' is not configured correctly on Mail Server
when clearly it works. Maybe there is something wrong with the test script?? I’ve finished every other task in this section and would like to mark it as complete so I can add more from the ciriculum.
Many thanks
Steve
FYI steps taken:
install and configure postfix
yum install -y postfix
vi /etc/postfix/main.cf
edit /enable settings in main.cf file
myhostname = stmail01.stratos.xfusioncorp.com
mydomain = stratos.xfusioncorp.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 172.16.238.17/24, 172.16.239.3/24,127.0.0.0/8
home_mailbox = Maildir/
create user
useradd javed
passwd paswoord
test postfix smtp
[root@stmail01 ~]# telnet stmail01 25
Trying 172.16.238.17...
Connected to stmail01.
Escape character is '^]'.
220 stmail01.stratos.xfusioncorp.com ESMTP Postfix
EHLO localhost
250-stmail01.stratos.xfusioncorp.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING
mail from:[email protected]
250 2.1.0 Ok
rcpt to:[email protected]
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
test mail
.
250 2.0.0 Ok: queued as 2F58D2C0DDBF
quit
221 2.0.0 Bye
Connection closed by foreign host.
install and configure dovecot
yum install -y dovecot
vi /etc/dovecot/dovecot.conf
listen = *, ::
protocols = imap pop3 lmtp submission
vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
vi /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login
vi /etc/dovecot/conf.d/10-master.conf
unix_listener auth-userdb {
#mode = 0666
user = postfix
group = postfix
}
test dovecot imap
[root@stmail01 ~]# telnet stmail01 110
Trying 172.16.238.17...
Connected to stmail01.
Escape character is '^]'.
+OK Dovecot ready.
user javed
+OK
pass TmPcZjtRQx
+OK Logged in.
retr 1
+OK 513 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 2F58D2C0DDBF
for <[email protected]>; Fri, 28 Feb 2025 10:43:00 +0000 (UTC)
Message-Id: <[email protected]>
Date: Fri, 28 Feb 2025 10:43:00 +0000 (UTC)
From: [email protected]
test mail
.
quit
+OK Logging out.
Connection closed by foreign host.
check network ports are listening
ss -tulnp