How to Debug Mail Server issues

- Incoming Emails
- Outgoing Emails
- WebMail (Roundcube incoming/outgoing)

Incoming emails
===============
Log Files Postifx (smtp server):
/var/log/maillog

Log Files Dovecot (pop3/imap server):
/var/log/dovecot.log
/var/log/dovecot-info.log
/var/log/dovecot-debug.log

From shell start tail on the log file by using this command
tail -f /var/log/maillog

After you have set tail on the log file try to send test email and in the other screen follow log file.

Outgoing emails
===============
From shell start tail on the log file by using this command
tail -f /var/log/maillog

After you have set tail on the log file try to send test email and in the other screen follow log file.

- Try checking MailServer (IP) reputation

Try using online test tool for more detailed info: https://www.mail-tester.com

Webmail
===============
Log Files (roundcube)
/usr/local/cwpsrv/var/services/roundcube/logs/

Most common issues
===============
- smtp port is closed by the server provider (solution: try to contact your server provider)
- rDNS/PTR is not set (solution: ask you provider to set it as your hostname)
- hostname has no valid A record set (solution: make sure your hostname has working A record)

Try to rebuild mail server
Login as root and from the Left Menu --> "MailServer Manager" click on the "Rebuild Mail Server" button.
After mail server is rebuild-ed try to send email again to test if there is any progress.