If you want more effective programmers,
you will discover that they should not waste their time debugging,
they should not introduce the bugs to start with.
(E. W. Dijkstra 1930 - 2002)
This summarises how to resolve issues when it does not work. The various resources are described.
Approach
First look at what is or is not working and try to simplify the problem so you can identify what parts are working and what parts are not working.
For example if you are trying to connect with TELNET to POP3 and it does not work then first look at Dovecot which is responsible for POP3 and look at its status with
sudo systemctl status dovecot.service
If this shows no issues then look elsewhere, such as command syntax, error messages etc.
Most logs can be accessed with the text editor in the GUI available on server via VNC or direct connection. Some because of permissions will need acces using sudo nano from the command prompt.
Apache logs
/var/log/apache2/error.log - error log for web site and php errors
/var/log/apache2/access.log - log of all accesses to web pages
/var/www - normal root of web site
letsencrypt SSL
/var/log/letsencrypt/letsencrypt.log - Activity log for SSL (note because of permissions you will need
sudo nano /var/log/letsencrypt/letsencrypt.log )
Show the certificates controlled by letsencrypt and their status
sudo certbot certificates
It should report something like
Found the following certs:
Certificate Name: example.com
Serial Number: 433bd2430c3877998f03214af8898faba7f
Key Type: RSA
Domains: example.com www.example.com pop.example.com smtp.example.com mail.example.com imap.example.com
Expiry Date: 2024-05-12 03:42:50+00:00 (VALID: 70 days)
Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem
Mail Boxes
These are stored as text files under /var/mail/<user name> and can be viewed with text editor
example
/var/mail/user1
dovecot
Show dovecot status
sudo systemctl status dovecot.service
postfix
show postfix status and possible issues
sudo postfix check
The system journal can provide massive amounts of information
see the following links
DigitalOcean - How To Use Journalctl to View and Manipulate Systemd Logs
SUSE - journalctl: query the systemd journal
Loggly - Using journalctl
If you want to see only information on one subject you can do that as
journalctl -u subject
Examples
journalctl -u dovecot
journalctl -u postfix
if you want to see the most recent first use
journalctl -r -u subject
Examples
journalctl -r -u dovecot
journalctl -r -u postfix
you can see entries from a certain date time with
journalctl --since "1 hour ago"
journalctl --since "2 days ago"
journalctl --since "2015-06-26 23:15:00"
Google search will usually lead you to a solution. You do need to carefully specify the search so you only get results that you are interested in. For example I will prefix the search with Raspberry Pi so I only get searches for the Raspberry Pi. For example Raspberry Pi postfix install
There are blogs and helplines for the Raspberrry Pi available where people will respond to issues that you cannot resolve. If all else fails you can use the Contact page on this web site.