Guide to mail trouble shooting - sendmail
I have seen people have problems diagnosing mail problems, so I thought I would share a few things I have ran into.
Okay, I want to give people a few things to look at for sendmail. Sendmail scares too many people, and I started messing with it because I wasn't bright enough to know better. I suggest everyone buy a copy of the ORA bat book. I am not a sendmail guru by any means. If you have a tough one try the guys in #sendmail on EFnet, they have bailed me out before.
Remember that sendmail listens on port 25, so if you need to see if it was running try telneting to port 25. You can also check what version you are running that way. If you are good, you can even send all your mail this way.
Items worth noting in sendmail.cf
Fw-0 /etc/sendmail.cw -- where you put the info for all hosts you will be accepting mail for such as vhosts
Kvirtuser dbm /etc/virtusertable -- table for vhost mail control ( see http://www/sendmail.org for more info)
0 AliasFile=/etc/aliases -- File for email aliases ( so you can make all mail for root go to technoid@domain and ghostrdr@domain ). REMEMBER to run newaliases after modify or your changes will not take effect.
0 PrivacyOptions=goaway -- Good to have set so that know one can telnet to your port 25 and look up a users name in the GECOS field of the passwd file. Good way to get real name from a user name if the admin hasn't locked this down.
0 FallbackMXhost=fall.back.host.net -- you can specify a back up mail server if yours can not process the mail. This is kind of useless since you can also do this in DNS.
One place to make sure you do not over look for sendmail help is http://www.sendmail.org
Good place to find updates, patches, advisories, FAQs and etc...
To reduce the amount of spam my system receives, I have implemented the check_mail ruleset under sendmail 8.8.x from Hacker Systems. They also have other sendmail tips and tricks to take a look at http://www.harker.com/sendmail/. Sendmail 8.9.x has a database you can add spammers to so their mail goes to the bit bucket. More info on this can be found at http://www.sendmail.org/m4/anti-spam.html.
The most common popd to be running on FreeBSD seems to be popper ( also known as qpopper ) which is from Qualcom. Popper had a real bad hole in it a bit ago and it lost some of its following. It is now fixed and I find it easy to work with. I also have used the popd from the imap-uw suite, but then it came up to have a hole in it. There is cucipop also to be found in the ports dir , but I haven't tried it.
The popper popd can be fired from the inetd.conf, just uncomment the following line:
pop3 stream tcp nowait root /usr/local/libexec/popper popper
The popd answers on port 110. You can also telnet to that part to verify the version and for diagnostics. If you can't telnet to port 110, the popd isn't running. You can also telnet to that port so you can read your mail. such as
+QPOP (version 2.5x) at mail.mail.net starting. <email@example.com)
You can also play with the READ command for some fun. I have used this to verify a persons mail was working correctly.
These things should get you started trouble shooting mail problems.