Can send but not receive email, just using basic console mail like sendmail and mutt

April 15, 2014 2.6k views
I have: MX 1 mail.tanglewoodforest.tk. mail.tanglewoodforest.tk. IN A @ IN A @ TXT "v=spf1 ip4: -all" * CNAME @ But when mail comes to me I see possibly resets in my tcpdump: 10:28:12.001021 IP mail-yh0-f43.google.com.48272 > tanglewoodforest.tk.smtp: Flags [S], seq 3986132201, win 42900, options [mss 1430,sackOK,TS val 4050176638 ecr 0,nop,wscale 6], length 0 10:28:12.001079 IP tanglewoodforest.tk.smtp > mail-yh0-f43.google.com.48272: Flags [R.], seq 0, ack 3986132202, win 0, length 0 10:30:09.455246 IP mail-yh0-f49.google.com.51782 > tanglewoodforest.tk.smtp: Flags [S], seq 2481880713, win 42900, options [mss 1430,sackOK,TS val 2250336 ecr 0,nop,wscale 6], length 0 10:30:09.455290 IP tanglewoodforest.tk.smtp > mail-yh0-f49.google.com.51782: Flags [R.], seq 0, ack 2481880714, win 0, length 0 I used to have no problem with this, but since I made a new droplet, I've never got it working again. I can send out from the droplet using Mutt just fine. DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.10 DISTRIB_CODENAME=quantal DISTRIB_DESCRIPTION="Ubuntu 12.10" NAME="Ubuntu" VERSION="12.10, Quantal Quetzal" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu quantal (12.10)" VERSION_ID="12.10"
5 Answers
I'm not able to connect to port 25 on your droplet -- is your mailserver running? Make sure it's listening on the public interface. You can check what interface it's listening on by running
sudo netstat -plutn
Also make sure that your firewall isn't blocking connections to port 25.

Finally, try removing the wildcard CNAME record and adding rules manually as needed as it might be conflicting with the mail record.
Yep, no firewalls, no iptables. All wide open and listening on port 25 for
Host files good, DNS good, pointer good. Though when i run a sendmailconfig i do get these errors:
Creating /etc/mail/submit.cf...
Informational: confCR_FILE file empty: /etc/mail/relay-domains
Informational: confCT_FILE file empty: /etc/mail/trusted-users
Updating /etc/mail/access...
makemap: error opening type hash map /etc/mail/access.new.db: Permission denied
Reload the running sendmail now with the new configuration? [Y]
Reloading sendmail ...
makemap: error opening type hash map /etc/mail/access.new.db: Permission denied
chown: cannot access `/etc/mail/access.new.db': No such file or directory
chmod: cannot access `/etc/mail/access.new.db': No such file or directory
mv: cannot stat `/etc/mail/access.new.db': No such file or directory
make: *** [/etc/mail/access.db] Error 1

Now i'm just trying to figure out how to get my original /etc/mail/* config files back to stock, since apt-get purge/autoremove/autoclean and then reinstalling didn't help.
| Fixed It! |

It's all in "/etc/mail/sendmail.mc"

Sendmail is setup to only accept mail from localhost.

Changing: DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Addr=, Port=smtp')dnl
To: DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp')dnl

The "Addr=" parameter means to only accept email from localhost.

But what I hadn't done was the instructions at the top of the sendmail.mc file which is to recomile/remake the sendmail.cf file with:
make -C /etc/mail

And now it works!
Have another answer? Share your knowledge.