The issue was happening for a specific domain only. Sending emails to other domain were working properly. The log file entries are looks like below:

Solution:

After troubleshooting the issue, we found that this happens because your domain name matches either your server’s hostname or a setting in Sendmail’s config file. In that case, we can configure Sendmail to force send emails to your actual mail server instead of itself. Follow the below instructions: All done. Again send an email and the email should be delivered to the actual mailbox. Make sure to change your domain name end with the trailing dot!