Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Learn how to build, compile, and customize mutt UNIX
There have been a few hints on the site regarding using the CLI-based email client mutt, but they've typically been little snippets about how to accomplish certain things. Being an avid mutt user on Linux, and then on OS X, I've written an article called Using mutt on OS X, which is a full guide on using mutt, covering everything from mutt configuration (with sample configuration files), to setting up fetchmail and procmail, to even tweaking the postfix MTA (or installing and using exim instead).

It details a number of OS X-specific items, such as integration with Address Book, being able to automatically open attachments from mutt, etc. A few of these are from previous hints that ran, but this article takes you from having never used mutt all the way to being able to power-use it.

Using mutt gives you the most rich and flexible email client experience currently available on OS X. Yes, it's a commandline client, and as such doesn't have all the mouse clicks and sounds and whatnot that something like Mail.app would have, but it's stable, handles huge mailboxes, and is customizable like you would not believe.
    •    
  • Currently 2.25 / 5
  You rated: 2 / 5 (4 votes cast)
 
[9,156 views]  

Learn how to build, compile, and customize mutt | 11 comments | Create New Account
Click here to return to the 'Learn how to build, compile, and customize mutt' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Why use /sw?
Authored by: SeanAhern on Mar 06, '07 11:31:47AM

I've been using mutt for a while, but didn't know about the sidebar patch. Looks nice, and I'm following your directions now.

One question: why do you install in /sw? I mean, if you are bypassing fink, why do you go and install where fink lives? Once you do that, you now have /sw in an inconsistent state, where fink thinks mutt is not installed, but it actually is. I would think it would be better to install pretty much anywhere else (other than /opt for similar reasons).



[ Reply to This | # ]
mairix
Authored by: SeanAhern on Mar 06, '07 11:38:53AM
Let me also point people at the extremely useful tool mairix. http://www.rpcurnow.force9.co.uk/mairix/

This tool does for mutt what Spotlight does for Mail.app, only mairix does it much better and faster. I can say things like "mairix -t s:someproject d:3m-" and have it return me a folder of all of the mail that has "someproject" on the subject line and was sent in the last 3 months, and also to include all mail that was included in those messages' threads. And it does it within seconds across gigabytes of email. Extremely powerful and useful.

[ Reply to This | # ]
Learn how to build, compile, and customize mutt
Authored by: entropy06 on Mar 06, '07 01:11:23PM
Have a look at muttng ( http://mutt-ng.berlios.de/ ). It is mutt with many patches already integrated, including the sidebar patch.

[ Reply to This | # ]
Learn how to build, compile, and customize mutt
Authored by: matx on Mar 06, '07 01:12:50PM

Mutt rocks... at least as the successor to elm and pine. I use it everyday.

I would also concur with the other poster who wonders why you've chosed /sw. I think /usr/local/bin would be better, wouldn't it?

---
Mat X -- VFX Mac Tech



[ Reply to This | # ]
Learn how to build, compile, and customize mutt
Authored by: vdanen on Mar 06, '07 01:28:48PM

I chose /sw because there's where I put all my compiled stuff. I'm not strictly "bypassing" fink... but fink doesn't always have the latest mutt nor does it compile with the sidebar patch. AFAIK, fink doesn't have lbdb either. As for fink not knowing mutt is there, it doesn't matter. There's nothing that actually *requires* mutt, so fink not knowing about mutt living in /sw is ok.

As for muttng, it's a nice idea, but nothing has been checked into svn in 8 months or more, which means muttng is not the latest version of (mainstream) mutt anymore. It might have some of this stuff in there already, but it's not the latest version (with it's associated feature enhancements and bugfixes).

Finally, you could put stuff in /usr/local/bin, but for me, /sw just made more sense. It's just a matter of changing --prefix in the stuff you're compiling (but since the other stuff like newer fetchmail/procmail/etc. live in /sw, it keeps it all consistent for me).



[ Reply to This | # ]
dead horse
Authored by: SeanAhern on Mar 06, '07 02:15:28PM

I hate to be a bother, but I am just very curious to know why "/sw just made more sense". I can't think of a single reason why that would be, and can only think of downsides. Not to beat a dead horse, but you've really made me curious now what the reasons are that cause it to make "more sense".



[ Reply to This | # ]
dead horse
Authored by: vdanen on Mar 07, '07 09:12:03AM

Hmmm... well, for me, /sw works better than /usr/local. In /usr/local, I can stick stuff specific to the machine (which is traditional what /usr/local is for, hence the "local" part). But with /sw I can manage fink on one system and then copy the entire /sw tree to other machines (which keeps all my tools, etc. in sync). Instead of copying two trees (/sw and /usr/local) to other machines, I just have to copy one. Since it really doesn't matter to fink that mutt and friends are living there, it doesn't hurt fink. If I ever want to remove it, I don't run an uninstaller for fink, I would just "rm -rf /sw". Since a lot of my mutt setup relies on things in /sw, if I ever were to remove fink, stuff in mutt just wouldn't work (or work as nice). So keeping it all in one place, again, makes sense to me.

Now, nowhere in the article do I say you *have* to put it in /sw. You're compiling it, so you're obviously free to point --prefix to wherever you want. If /usr/local works better for you, go to town and install things there. Since this was a write up of my full mutt setup, instead of going through and changing the paths I use, which I could have done I suppose, I just put what I do verbatim, and I use /sw. That doesn't mean *you* have to. =) It's just what I do, because it makes sense to me and with how I replicate my setup between my macpro and my macbook pro. Obviously if you want things differently, or disagree with my installing to /sw (a pristine fink means nothing to me, largely because it means nothing to fink). If someone felt like it, they could create /mutt and use --prefix=/mutt for everything too and it would still work.



[ Reply to This | # ]
Thanks
Authored by: SeanAhern on Mar 08, '07 04:08:54AM

Thanks for your explanation. Of course, you can install any tool into any location -- I've done it for years.

Understanding that you consider /sw to be the "local machine customization" location that allows you to stay separate from the rest of the OS was the missing bit. I can see keeping things in one location making it easier to move software installs from one machine to another. I personally wouldn't choose /sw, but I understand your thought process now.

Thanks for taking the time.



[ Reply to This | # ]
Thanks
Authored by: vdanen on Mar 08, '07 09:18:38PM

No problem. Yeah, I do things a bit backwards on my macs... =) On my Annvix boxes, it's always "my stuff" in /usr/local, but I don't do that here as I find too many other external/third-party packages put stuff in /usr/local so I prefer using /sw for my own stuff (since, in a sense, I'm compiling the fink stuff myself I guess).

Yes, I'm a little odd, but the "system" makes sense to me.



[ Reply to This | # ]
exim
Authored by: SeanAhern on Mar 08, '07 07:14:26AM

Would you be willing to go into the differences between postfix and exim? You mention liking exim better, and go into how to install and configure it, but I don't see why one would choose one over the other.

I'm currently using postfix, and have an issue or two with it, but don't want to spend the time moving to another MTA unless there are compelling reasons to do so.



[ Reply to This | # ]
exim
Authored by: vdanen on Mar 08, '07 09:22:56PM

To be honest, it's mostly because I'm used to it. I've never really used postfix, and back when Mandriva started using it as the default instead of sendmail, I was using qmail... =) So I never really got into postfix and then when qmail was showing it's age and I had looked (briefly) at postfix, I didn't like the setup. Exim was a completely different beast and the way it does things not only makes it one of the most powerful MTAs out there, but also the most customizable (and I love fiddling). Since I've been using Exim for a few years now, I'd never switch from it. But how does it compare to postfix? Not sure... it's almost something you need to figure on your own.

Postfix vs sendmail vs qmail vs exim is almost as religious as emacs vs vi. =)

Put it this way: postfix, which comes with OS X, is more than sufficient to do what mutt needs it to do: relay mail to a smarthost. Exim just adds a bit more geek to it and (I think) more flexibility/power... but that's only if you want to get fancy. Having to use postfix has been bothering me for quite a while so when I wrote the article I decided to setup exim instead.



[ Reply to This | # ]