Tag Archives: e-mail

goobook: Command-line contacts

My workplace relies heavily on Google Documents and GMail right now, and so something like goobook should come in handy.

2015-04-17-6m47421-goobook

What you see there is very primitive, but as I understand it, goobook is mostly intended as an ancillary tool for mail agents, like mutt or perhaps alot. Adding goobook to those tools means you can manage Google contacts without the need for a browser as an intermediary. Which is always a good thing.

goobook needs a little configuration before it can get started; at the very least, you can add your e-mail address and password to .goobookrc, and if you need more help than that, It will generate a template for you with goobook config-template > .goobookrc. I was able to get to most of goobook’s functions just by uncommenting and editing two lines in that file, although the help pages show how to properly encrypt your password and so forth.

From there, you should be able to build your local cache (or refresh it) with goobook reload. Adding addresses works with goobook add, and so forth.

goobook probably looks simple and for what I’ve seen, it is. But I also feel like the usefulness with goobook is in splicing it with your mail client. So don’t mark it down just for seeming basic. That’s probably intentional.

goobook is in AUR in several flavors; I don’t see this in Debian but I don’t think it would be hard to add by hand. πŸ™‚

alot: With notmuch help involved, and little more

Up front, let’s say that alot is a “graphical” interface to notmuch, which you might know or remember as a mail indexer and search tool.

2015-04-14-6m47421-alot-01 2015-04-14-6m47421-alot-02 2015-04-14-6m47421-alot-03

And as you can see, alot has a lot πŸ˜› of the right stuff — good color, very flexible terminal space, on-screen help and an intuitive interface. Navigation is with enter keys and a few other mnemonics, and some keys have global behaviors, regardless of what you’re doing at any moment in time.

I would bet that, once your mail setup is complete, you’ll only need about three or four minutes to learn how to use alot, and after that, you’ll cruise through your mail folder at ludicrous speed.

A few things to remember though. … alot needs notmuch on board, which means you’re dealing mostly with the local mail concept, as opposed to relaying directly to an online mail source. If you’re looking for something that will pull down messages from GMail and let you pick through them, I don’t think this is it.

On the other hand, it does mean that you’re free to latch alot (and notmuch) on to your home-grown mail system — or as I showed above, latch notmuch onto something like offlineimap, which can yank messages off GMail and store them locally.

So technically speaking, there are options. The question becomes, how much do you want to step backwards through programs, just to take advantage of alot, when things like alpine can more or less handle the entire process in one fell swoop? Again, if you use a local mail system, alot might be preferable. For me … well. … 😐

All in all, I have to give alot a gold star for catching every point in my checklist for a good console application. I don’t think this is a game-changer for me though, since I’d have to rely on two or three other programs before alot became my mail reader, even if setup is fairly straightforward for all of them.

In AUR as alot and alot-git, but the git version wasn’t working at this exact moment in time. In Debian. And of course, as promised: ⭐ Enjoy! πŸ™‚

gmail-attachment-downloader: You don’t want to know

Yesterday was the last work day of the month, and in my job that’s both a blessing and a curse, since it’s extraordinarily hectic, but it’s also payday. So my apologies for missing a day, but that job pays, and this one doesn’t. πŸ˜‰

To complicate things I got two tips via e-mail, one from Rashid and one from Lewis, mentioning gmail-attachment-downloader. I like to check things before I add them to the list, and at first glance it looked like a simple python script that scrapes through attachments in your account, and gives you a local copy.

That’s true, but I should be clear: It downloads attachments. All attachments. Every last one. From the beginning. Of all time. 😯

So while I don’t have much to show for gmail-attachment-downloader, I do have about 10 years of junk to sort through as a result.

2015-01-31-6m47421-gmail-attachment-downloader

Aside from that warning, there are some other notes I should offer.

I ran into errors when I tried gmail-attachment-downloader in straight python in Arch. python2 appears to be the preferred framework here. Aside from that, I needed no peculiar dependencies. It takes no flags or options.

I gave my account with the @gmail.com suffix; the first time I tried with only the prefix and it wasn’t as successful. That I blame on GMail though, since I know it tends to want full addresses as “user names.”

As you can see, gmail-attachment-downloader is clever enough to avoid name collisions, and will skip over files that are identical and rename files that are similar. I don’t know if that means it is performing some sort of hash check or if it is just looking at file size. Either way is fine with me, but if you have a better idea, talk with the author.

My only suggestion for an improvement would be some sort of date stamping addition. Pulling down years of stashed .config files is fine, but without preserving the original date of the message, or perhaps prefixing the name with original date, everything is just swirled together.

And I suppose I should mention — again — that this is an all-or-nothing adventure. There’s no way (yet) to prompt to download a file, screen messages and pull down attachments by filter, or otherwise control the product. Start it up, set it spinning, and come back a few hours later.

And then spend the next day or two wondering what the context was for the half-dozen Anpanman wallpaper images buried somewhere in your account. Did I really e-mail those to myself … ? πŸ˜•

citadel: So many things to explore

I am completely unfamiliar with citadel or its supporting community, but was told by a long-time reader of this site that it had a long list of console goodies tucked under one title.

2014-11-19-l3-b7175-citadel

This I find to be very true, although I suspect that my cursory efforts to get it up and running didn’t really expose me to more than a fraction of its potential.

citadel offers e-mail, messaging, calendar and other software bundled as part of a groupware project that has evolved through the 1980s and 1990s. This much I deduced from the descriptions on the Debian and AUR pages. If it looks like BBS interfaces from those decades, it did to me too.

I never connected citadel to a live system, so the image you see above is just looped back into my own address running the daemon in Mint (my Arch builds didn’t work). I did that partly because I am a shy and timid creature :\ , and I wanted a chance to explore without an information overload.

The downside of that being, as you can see above, there’s not much in the way of real data shown. I can navigate the “rooms” and “floors” of citadel and access a few of the features, but my safe little sandbox doesn’t do much in the way of real interaction.

I leave it to you to connect citadel and put it to real use; for what I see from elsewhere on the web, there are companies that use citadel or a variation thereof as a means of collaborating between developers in different geographic locations. So it may be that you use it already.

As a full-featured suite of tools all rooted in the console, I can only give a solid thumbs-up to citadel … even if my own experience was rather brief. πŸ™‚

notmuch: “Not much” is relative

I do my best to tinker with all the local mail tools that I collect, even when some of them are well beyond my reach. notmuch is a mail indexer, that supposedly is extensible to a practical mail reader, with the help of some outside applications.

Here’s what it can do on its own:

2014-10-15-6m47421-notmuch

If you keep a local mail folder but need something to search and sort, notmuch might work well for you. I did that little bit with the help of offlineimap and one Google Mail account, and it didn’t take much more effort to get notmuch working. On its first run, notmuch gave me an interactive configuration wizard, and in the space of a minute, I was picking through my .mail folder.

notmuch has only a few commands — like search and show above — that return mail results, and from there you can manage them as you need to. I see that there are also apparently provisions for tagging messages, and dumping and restoring, a la an e-mail backup.

notmuch is another tool that, by itself, is not much. πŸ˜€ It will require something to fetch the mail, and probably you’ll want to either incorporate it into another program as a mail reader — I see that both emacs and vim are possibilities, as well as the classic mutt — and there’s still the task of replying to mail before notmuch becomes a full e-mail suite.

That’s a little more than I have time for, and to be honest, if you’re the kind of person who manages their e-mail at the local level, it’s probably something you’re better at setting up than I am. No offense taken.

But keep notmuch in mind when the time comes to sort through 3000 e-mails looking for that one person who sent you a tip about an esoteric console program. … πŸ˜‰

lumail: You can probably do better

I admit I tackled lumail with a little less than the requisite tenacity, as will be obvious from this screenshot:

2014-09-12-6m47421-lumail

That’s because the author’s own screenshots are so much better. And because I’m stuck in that gray zone of mail clients again, this time with one that is specifically written to only handle local mail directories.

And again, since I primarily work with five or six online mail services, I’d need to bring in something like offlineimap or maybe isync or fetchmail to bring all those emails down here, and then configure lumail to work with them.

Forgive me, I just haven’t got “it” today. 😐

For what I can see from from the web site and from building and running lumail, it does look like a viable option for anyone with a local mail system to navigate. I can’t say how much better it would be than any of the inborne emacs clients or sup or even mutt, but if you’re in that group of users, it might be worth investigating. You can probably do better than I did here.

Advanced users will probably want to look at this page, for some of the more complex interactions lumail can engage in. These might also spark your interest.

I feel like I’m giving lumail a short shrift, but it’s not the first time I’ve had to glance quickly at a program before moving along. It happens a lot with local mail tools, and there’s not much for me to show by plastering up a screenshot of a man page. You can do that much on your own. … 😦

lbdb: Looks can be deceiving

I mentioned bbdb last week along with charrington, as an address book tool for within emacs. Out of fairness, I feel I should mention lbdb as well, although it doesn’t look like much from where I sit.

2014-08-25-6m47421-lbdb

lbdb, for what I can tell, is mostly a search tool for address books, whether created by your system or by other software. As a scientific guess, I would reckon from the configuration file that lbdb is prepared to scrape through about a dozen different address files and mail systems, as well as your /etc/passwd and other local system files, to find the person you’re looking for.

Above you can see what little there was for it it search in my .addressbook file, created by re-alpine and compatible with its “m_pine” search method. You’ll need to copy /etc/lbdbrc to .lbdbrc, add the method you need to the METHODS line, and make sure that the remainder of the variables in that file match your setup. For example, since my .addressbook file is actually at ~/.addressbook, I didn’t need to adjust line 84.

After that, lbdbq "name" would search through the file and return anything matching “name.” Easy as that.

But also as simple as that. I experimented with lbdb and its incorporated tools for about a half an hour, but what you see in that screenshot above is about the best I got out of it.

I know it’s not very impressive, but my .addressbook file is not very impressive either. If I had a few more names and addresses, then I would probably find lbdb a little more useful.

And of course, if you’re working on a system with a multitude of address and e-mail tools available, for several users or perhaps multiple systems, lbdb might give you more pause than it did for me.

Like a lot of things I come across, I have a feeling lbdb only looks unassuming because my own system is so terrifically meager. And looks can be deceiving. 😐

bbdb (and charrington): Or is it charrington (and bbdb) … ?

It was hard for me to decide who gets top billing today, since bbdb was the title I was chasing, but I didn’t get too far without charrington. On the other hand, charrington isn’t specific to bbdb, even if it did make bbdb a lot more useful.

I should explain. bbdb is a rolodex-ish address book utility for emacs. I understand it has a 13-year history and has quite a few provisions for specific address details.

2014-08-21-6m47421-bbdb-charrington

It installed fine, required only two lines in my .emacs file and seemed to be working fine with M-x bbdb. Unfortunately, I had no addresses in my .bbdb file, so as you can imagine, I didn’t get far.

Enter charrington, which extracts contact information from a GMail account (GMail users will probably pay attention now). Ideally it exports to a .bbdb file, but can supposedly handle mutt format too (mutt users will probably pay attention now).

charrington took only a few minutes to figure out. It needed python2-gdata from the Arch extra repo, and would run from python2.7 charrington.py.

Next, I copied the example charrington.conf file to ~/.charringtonrc, edited it to include my GMail account name (not full address, so just k.mandla, not with the at-gmail-dot-com) and plain-text password. Yes, I know, it’s plain text, but I figure I’ll only use it once or twice.

Then I ran charrington again with python2.7 charrington.py -g >> ~/.charringtonrc, to get the URLs for each group of contacts. I edited the .charringtonrc file one more time to make the URL list match the configuration file’s style, and then finally, python2.7 charrington > .bbdb.

That was it, really. From there, I could search the address file from within emacs, and as you can see, it works much better when you have a few names to skim through. … O_o

I’m ashamed to admit that beyond searching and getting back results from bbdb, I don’t have anything to show. If there are ways to add, edit, delete or otherwise wrangle the database, I didn’t look for them, mostly because I spent most of my time wrangling with charrington.

Importing an existing list of contacts was more important to me though. I know it’s not the fundamentals, but knowing the emacs brigade, I have a feeling editing the database is really just opening it in emacs, and … editing the database. πŸ™„ And if it’s not, it should be. … 😯

isync: Because the cloud is unreliable

A while back I mentioned offlineimap, and Curtis mentioned isync in reply.

2014-08-09-6m47421-isync

As you can see there, isync (or perhaps more accurately, mbsync) was quite willing to draw in more than 20,000 messages to my local hard drive. In that sense, isync did much as it was reported to do.

And considering I just stole a configuration file from Henrik Pingel, it was a piece of cake to get it working.

I’m no e-mail expert, but what that suggests is making a local backup of my cloud-based e-mail services is well within my grasp. Now I won’t have any more excuses for ignoring applications intended for organizing local e-mail collections. Darn. 😑

It also means that if you’ve come to distrust the pie-in-the-sky claims of the past decade — about cloud services being the wave of the future, and how everything will be online in the years to come — you can be a rebel, collect it all, and keep it locally. Print them out. Make a scrapbook. Invite your friends over for a party. πŸ™„

Of course, the real attraction in something like isync is to pair it with an outgoing message system, much like Ian described long ago, and put yourself in control of the entire process. Step up. Take responsibility. Clean up and move on. Go straight and choose life. πŸ˜‰

I should mention that Henrik’s configuration will require you to put your password in plain text, unless you encrypt it in a separate file. I also noted that his default is to ignore some of the less interesting folders GMail uses by default — like sent mail or starred mail. Whether you include those in your e-mail coup d’Γ©tat is up to you.

Personally I realize now the immensity of six or seven years of e-mail messages that are stashed on GMail’s servers, and that’s only one of my four or five accounts I use. I think maybe I shall save a little drive space for now, and let GMail wrangle all that for a while longer. … 😳

gnus: As close as I could get

I feel a little disappointed in myself: This is the best I did with emacs‘ built-in newsreader-plus-e-mail-client, gnus.

2014-07-20-6m47421-gnus

I am ashamed. I think I spent the better part of an hour too, trying to get all the options set, and still came up with a great big goose egg. 😦

The sad part is — even after all that time, and being fairly confident that it was really connecting to nntp.aioe.org, and having moderate success with slrn a few months ago — I don’t have any worthy notes to mark here. Everything I tried either failed outright, caused emacs to sputter error messages, or just gave me “No news is good news.”

Ah well, the best-laid plans of mice and men. I do feel guilty now for not trying harder with wanderlust though. 😦

I can give you the home page for gnus, and tell you that the documentation is very detailed and very easy to read. There are even a few comic moments deep in there, but I am so far gone from picking through them that I don’t remember where those jokes were at. πŸ˜•

I feel I should mention that if you just search the Internet for “gnus setup”, a large portion of your results will be how to make gnus play nicely with GMail. I didn’t go in that direction, mostly because I had gnus in my notes as a newsreader, and I was interested in seeing how it compared with slrn and tin.

As it stands, I’ll leave it to the emacs experts to clue me in. The irony of the entire situation was, every time I needed to edit a configuration file, I instinctively did it with vim. I didn’t even think about it until I had done it four or five times in a row. … 😳