I've configured my postfix which is installed in debian 10 to send email, it was working previously but it all of a sudden just stopped working, I don't know why it stopped sending email, I checked the log file, and saw this in the postfix log file:
May 8 07:44:20 mail postfix/smtp[32042]: 48D557896B: Server certificate not trusted
May 8 07:44:21 mail postfix/smtp[32042]: certificate verification failed for alt2.gmail-smtp-in.l.google.com[**.***.***.**]:25: untrusted issuer /OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign
May 8 07:44:21 mail postfix/smtp[32042]: 48D557896B: to=<*****@gmail.com>, relay=alt2.gmail-smtp-in.l.google.com[**.***.***.**]:25, delay=1.4, delays=0/0/1.4/0, dsn=4.7.5, status=deferred (Server certificate not trusted)
Here is my etc/postfix/main.cf file
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.example.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.example.com/privkey.pem
smtp_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.example.com
mydomain = example.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
mydestination = $myhostname, example.com, localhost.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_tls_security_level=encrypt
smtp_enforce_tls=yes
Please, why is my email not sending messages and how can I resolve this issue?