Task: Linux Postfix Mail Server: getting error at the end

I am getting this error even configuration seems to be correct, please give a check.
Also FYI I am not having option to mark the task for review, I am getting skip button instead.

- Mail not recieved!, ‘dovecot’ is not configured correctly on Mail Server
FAILED test_postfix.py::test_postfix - AssertionError: - Mail not recieved!, …

Did you have this lines in postfix main.cf?

inet_interfaces = all
home_mailbox = Maildir/
myhostname = stratos.xfusioncorp.com
mydomain = stratos.xfusioncorp.com

Did you have this lines in dovecot.conf?

protocols = imap pop3 lmtp submission
listen = *, ::

Did you enable&restart postfix and dovecot?
Did you made user from the task?

Its all from my task notes. Maybe your task slightly different.

Thank you for commenting, it´s there.

I get the same error. Have you managed to find the reason for the error?

Did you do the same config, as I write above?

yes, it´s same and you can see my screenshot that it´s working, I can give a another try if you want.

I used the same config and it is not working.
More exactly I made the following changes:

sshpass -p Gr00T123 ssh -o StrictHostKeyChecking=no groot@stmail01
sudo -s

yum install postfix dovecot -y
useradd kareem
echo Rc5C9EyvbU | passwd --stdin kareem

sed -i ‘/^inet_interfaces/ s/localhost/all/’ /etc/postfix/main.cf
sed -i ‘/home_mailbox\s*=\sMaildir//s/^#//g’ /etc/postfix/main.cf
sed -i '/myhostname\s
=\shost.domain.tld/s/^#//g’ /etc/postfix/main.cf
sed -i '/myhostname\s
=\shost.domain.tld/s/host.domain.tld/stmail01.stratos.xfusioncorp.com/’ /etc/postfix/main.cf
sed -i '/mydomain\s
=\sdomain.tld/s/^#//g’ /etc/postfix/main.cf
sed -i '/mydomain\s
=\s*domain.tld/s/domain.tld/stratos.xfusioncorp.com/’ /etc/postfix/main.cf

sed -i ‘/protocols\s*=\simap/s/^#//g’ /etc/dovecot/dovecot.conf
sed -i '/listen\s
=\s*/s/^#//g’ /etc/dovecot/dovecot.conf
sed -i ‘/mail_location\s*=\smaildir/s/^#//g’ /etc/dovecot/conf.d/10-mail.conf
sed -i '/disable_plaintext_auth\s
=\syes/s/^#//g’ /etc/dovecot/conf.d/10-auth.conf
sed -i '/auth_mechanisms\s
=\s*plain/s/plain/plain login/’ /etc/dovecot/conf.d/10-auth.conf
sed -i ‘/unix_listener auth-userdb/{n; n; s/#user =/user = postfix/}’ /etc/dovecot/conf.d/10-master.conf
sed -i ‘/unix_listener auth-userdb/{n; n; n; s/#group =/group = postfix/}’ /etc/dovecot/conf.d/10-master.conf

systemctl enable postfix
systemctl enable dovecot
systemctl start postfix
systemctl start dovecot

And I get:

  • Mail not recieved!, ‘dovecot’ is not configured correctly on Mail Server
    FAILED test_postfix.py::test_postfix - AssertionError: - Mail not recieved!, …

I tried many times but it seems kodekloud has an issue with their validation script and I see no one is responded that they will check.

Having exact same issue here =((

In my case, after many attempts, I finally managed to get it working with a “postfix reload” command before trying the KodeKloud check.

Maybe it could be a validation error. Have you anyone here tried to telnet to the email ? I tried almost anything but not the postfix reload command, insted just reloading the service with systemctl. I also i’m been using the same configurations.