I am attempting to get postfix working on Ubuntu Server 22.04 for send only.
When attempting to test the server using telnet mydomain.com 587, I get the following
Trying 192.168.107.11...
telnet: Unable to connect to remote host: Connection refused
However when using telnet localhost 587 or telnet 127.0.0.1 587 I get
Trying 127.0.0.1...
Connected to localhost. Escape character is '^]'.
Connection closed by foreign host.
Running netstat -plntu I get (Note this is the most current netstat)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 730/sshd: /usr/sbin
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 652/inetd
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 633/systemd-resolve
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 2126/master
tcp6 0 0 :::22 :::* LISTEN 730/sshd: /usr/sbin
tcp6 0 0 :::587 :::* LISTEN 2126/master
udp 0 0 127.0.0.53:53 0.0.0.0:* 633/systemd-resolve
udp 0 0 0.0.0.0:50550 0.0.0.0:* 654/meshagent
udp6 0 0 fe80::214:22ff:fe7c:546 :::* 620/systemd-network
sudo iptables -L INPUT -n -v
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
22 1914 ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
22 1914 ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
14 1338 ufw-after-input all -- * * 0.0.0.0/0 0.0.0.0/0
1 96 ufw-after-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
1 96 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
1 96 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
sudo ufw status
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
587 ALLOW Anywhere
Postfix ALLOW Anywhere
25 ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
587 (v6) ALLOW Anywhere (v6)
Postfix (v6) ALLOW Anywhere (v6)
25 (v6) ALLOW Anywhere (v6)
I currently have the firewall disabled for testing purposes. Once I get this resolved I will reenable the firewall.
Anyone have any ideas what the issue could be, or have a direction I can go.
Thank you for any and all assistance.