❯ mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
D75CB361C16 11490 Fri Jan 8 00:48:23 root@pve.lan
(delivery temporarily suspended: connect to alt2.aspmx.l.google.com[2607:f8b0:4023:c03::1a]:25: Network is unreachable)
removed@example.com
D31BE361274 11604 Thu Jan 7 21:59:46 root@pve.lan
(delivery temporarily suspended: connect to alt1.aspmx.l.google.com[74.125.28.26]:25: Connection refused)
removed@example.com
D8F8836125B 11442 Thu Jan 7 19:57:11 root@pve.lan
(connect to alt1.aspmx.l.google.com[2607:f8b0:400e:c04::1a]:25: Network is unreachable)
removed@example.com
DB378361ADF 11438 Fri Jan 8 00:07:42 root@pve.lan
(connect to alt1.aspmx.l.google.com[74.125.28.26]:25: Connection refused)
removed@example.com
this line indicates that your system seems to have an IPv6 address configured, without having access to the public IPv6 internet...(delivery temporarily suspended: connect to alt2.aspmx.l.google.com[2607:f8b0:4023:c03::1a]:25: Network is unreachable)
this indicates that the system cannot connect to the public ipv4 internet (more specifically one IP from google's mailservices) on port 25 - this is something that some service providers block access to port 25 on the public internet - in order to prevent spam - an alternative explanation is that you have a firewall in place with a rule of blocking outbound connections to port 25(delivery temporarily suspended: connect to alt1.aspmx.l.google.com[74.125.28.26]:25: Connection refused)
in the case where port 25 is blocked it is usually possible to connect with authentication to a mail-server via port 587 with starttls.do I need to do anything else to receive messages/notification via email?
root@hydra ~
❯ cat /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname=host.example.com
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +
compatibility_level = 2
# Gmail
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtp_tls_session_cache_timeout = 3600s
❯ telnet smtp.google.com 25
❯ openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf -ign_eof
We use essential cookies to make this site work, and optional cookies to enhance your experience.