January 06, 2007

fun with SMTP and mutt

Well I have had a fun adventure in setting up a new email client (mutt) for myself. This adventure involved spamhaus and figuring out how to properly set up my local MTA. It was actually quite fun :-)

I finally got tired of using web-based squirrlemail. It is a good interface and I will still use it traveling a-far etc.. but I decided it was time to switch. I have alwase been a die hard pine fan but since i use vi for the rest of my life mutt looked like it would be a beter fit. (I haven't started using mutt at work yet however I will before too long)

I pulled a few muttrc files from the net and my brother-in-law passed along his. So I quickly began to set up my local mutt client. After looking at all the rc files this was a farily straight forward process. Mutt is imap aware so email just stays on the server like normal.. also I love the set move="no" command :-) So that was easy .. all my folders are there and i can read mail like nothing else.. and I can navigate around using my vi keys :)

Ok now to send a message.. I typed a few test messages to myself an gmail etc. and chose send. I waited a bit then a bit more. Nothing. Ok a little while later while reading the mutt docs etc. I discovered that mutt doesn't do the MTA part .. It drops the message down to the local box. Well just so happens that sendmail is off on my machine on purpose. So I turn it on reset iptables to let smtp out. Ok now I can send messages to myself, yea. (At this point I was not looking at the full mail header and smtp talk in messages)

The next day I got a message from nick (brother-in-law) saying check your return-path (envelope-from) line which looked like this:
kfoote@localhost.localdomain
Well my messages were getting delivered to some things like gmail... my own addresses etc.. however turns out that this is a misconfigured sendmail problem and some mail systems dont like it. Work for instance bounced my first message I sent to myself there.

Some where along this journey between me sending a message with a bad return-path to myself at work and friday my home network's ip address got included on the CBL list. I tracked down why (localhost.localdomain sendmail issue) corrected this issue and got my ip off that list.
In the process I learned
-how to view full header / smtp talk in mutt
-what you should set the Dj line in sendmail.cf to
-what sendmail appends to your message if you dont give it something (envelope-from)

A fun experience but I don't want to do it again.