I been trying to configure my sendmail. Looks like (from /var/log/maillog) the mail has been sent to the outside world BUT it gets queued in the mailq. And doesn't go outside. It is not a firewall problem as I tried stopping my firewall. However,
netstat -nl | grep 25 shows
tcp 0 0 172.16.20.45.25 172.16.20.1.3345 ESTABLISHED
172.16.20.1.3345 is my router/ gateway address. It should be LISTENING to *.* instead of "172.16.20.1.3345". Also, sometimes it shows nothing! However, a nmap scan on the local IP shows the port is open.
"ps auxwww | grep sendmail" shows sendmail is running and accepting connections.
My domain is hosted with Dyndns (non-paid) and dyndns wild-card is ON.
My "sendmail -d0.1" output is
short domain name = mydomain
canonical domain name = $w.dyndns.org
subdomain name = dyndns.org
node name = testbox (name of the local PC)
I have also configured access and relay-domains tables properly.
However, I sent a test mail to Google and in /var/log/messages I can see that it tries to relay using firstname.lastname@example.org
with Stat=Sent. It then tries to relay using google's mailserver until it gives up trying. And the Status show Deferred. Should I relay using localhost?
Here's my MX part of BIND
IN MX 5 testbox.mydomain.dyndns.org.
testbox IN A 172.16.20.2
mail IN CNAME testbox.mydomain.dyndns.org.
I can telnet to port 25 just fine from the local network. For example, telnet domain.dyndns.org 25 gives the banner.
Is this a problem with my Bind or sendmail or dyndns?!
Sendmail Version: 8.13.4
BIND Version: 9.3.1