ABOUT CLICK

Welcome to CLICK, the Daily News' home for everything interesting on the internet. If people are clicking on it, we're here to tell you about it, from internet widgets to viral video. Have a suggestion for something CLICK-worthy? E-mail us.

Daily News
Subscribe to RSS feed

Powered by
Movable Type 4.01

« One theory on why Microsoft is making noise | Main | A month on the command line, Day 15: e-mail progress »

A month on the command line, Day 13: Elinks and mutt -- they seem to know each other

I did spend a little time in Xubuntu 7.04 today ... during which Firefox crashed ... then IE 6 crashed under Wine, so I rebooted into Debian's console and began using lynx and elinks. I don't know if it's frames or java, but elinks seems to handle things better -- at least at dailynews.com. It makes reading text on the Web a whole lot quicker -- and might be worth using even in a GUI.

Anyway, while reading the Daily News story by Eugene Tong about a lady who's been to 177 straight "Tonight Show" tapings, I clicked on an HTML "mailto" link for Eugene and was immediately in mutt, ready to compose an e-mail. It all happened so fast and worked so well.

Yep, I'm in Day 2 of having mutt and msmtp doing my e-mail, and it's been really great.

And while I'm on the topic of e-mail at the Linux command line, I got a nice comment from console user kotnick on how he handles e-mail:

Well, wouldn't this be easier (this is my own setup):
1) fetchmail to get mail from all accounts which provide pop3/imap (I get mails from 6 different accounts)
2) procmail to sort it out and filter out spam with spamassasin
3) mutt to read mail (although I use claws-mail)
4) sendmail to send mail (you can use it on every smtp server that provides relaying, as gmail does, as my local isp does)
4a) if you find sendmail too cryptic, you can try postfix

And from my previous e-mail entry, reader jason does this:

I use Fetchmail, Mutt, Procmail and Postfix to handle my mail, and have also changed my mind several times over the last few years over which anti-spam tool to use.
Here's a brief summary of how it works:
Fetchmail retrieves incoming messages from my accounts on IMAP servers, and delivers them via SMTP (port 25) to Postfix. Fetchmail configuration involves creating a ~/.fetchmailrc file.
Postfix queues the messages and invokes Procmail to deliver them . mailbox_command = procmail -a "$EXTENSION" in /etc/postfix/main.cf
If there is a ~/.procmailrc file, Procmail applies the rules in it to filter the incoming messages into various folders. This implies that you don't need a ~/.procmailrc file for this setup to work, but by having one you can filter out spam and duplicate messages, filter various mailing lists into different folders, etc.
Mutt accesses the local mail folders (/var/mail/username as the primary inbox, and folders under ~/mail) to read the mail. Of course, mail is delivered and filtered entirely in the background.
For outgoing messages, you can configure Postfix with the relayhost command, as in relayhost=mail.isp.domain to deliver outbound e-mail via your ISP's SMTP server. Alternatively, you can just let Postfix deliver mail to the destination directly, without any additional configuration required. Some spam filtering services may filter out your messages if you do this. In my case, I can't tell the difference between the two alternatives, so I just let Postfix handle outgoing messages itself (without relaying via my ISP).
The point to emphasize here is that all of this isn't too difficult to set up (a certain investment in reading manual pages and setting up configuration files is needed, especially for Procmail and to a lesser extent Fetchmail), but once set up, it works really well - year after year - with only incremental improvements. That's why some of us are so addicted to this way of working. I can't remember how long it took to set up the first time, but given how well it has worked ever since, it was well worth it.

Comments

I use getmail rather than fetchmail, because it does everything I need and is a lot smaller. I don't care how big my hard drive is, I will _always_ hate the idea of wasted space.

While mutt and msmtp are handling my IMAP mail from freelinuxemail.com (basically an offshoot of fastmail.fm), today I attempted to configure pine to read one of my POP accounts. I used fetchmail (comes preinstalled on Debian, I think) to get the mail, pine to read it ... but I couldn't get pine to send. I had my SMTP server set, but entering my username and password didn't work. I don't know if pine sends mail on its own or needs a separate SMTP program ... it's unclear from what I've written.

Other things unclear at this moment are a) how to create new folders on the IMAP account, how to change the order of e-mail in mutt, and how to get mutt to save a copy of outgoing mail to a folder.

And a future project would be getting multiple accounts on one setup ... i.e. a couple of IMAPs and at least one POP to work with fetchmail, procmail (not sure about that at all), mutt and msmtp or esmtp.

I've been using Thunderbird as a backup, but it's so much easier to dispense with mail from the command line -- the speed is amazing.

Post a comment

LINKS

Video:
YouTube

Music:
Archive.org

Geek stuff:
BoingBoing
Technorati

ADVERTISEMENT

Copyright Notice | Privacy Policy | Information
For more local Southern California news:
Copyright © 2007 Los Angeles Newspaper Group