Go to content Go to navigation Go to search

Tread lightly on the things of earth

Mike’s weblog about computing, politics, and faith (a progressive view)

Mac OS X: Gnus -> remote Courier IMAP via ssh-agent

I finally learned how to get Gnus in XEmacs (installed in Mac OS X 10.1.4 via fink) to access my mail on a remote Courier IMAP server—from anywhere, even from within a firewall, using a password-free, ssh-agentized encrypted connection.

Key setup syntax recorded here.

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>


2005-06-15: Content of the now-offline wiki page:

2002-06-11: Recording another probably useful reference:
Using nnimap with courier - and other pitfalls

2002-05-28:
I got Gnus + Courier IMAP-ssl (on NetBSD) working a while back, satisfying the need to stop transmitting IMAP account info in the clear. It also worked fine tunneled through ssh, allowing me to get my mail at home from inside my company firewall that blocks imap ports 143 and 993 (ssl).

But the double whammy of ssh- ”and” ssl-encryption made mail reading too slow.

How to access a remote Courier IMAP server via ssh only?
(ssh-agent already allowing password-free shell login to remote box)

Doug Alcorn quotes Andi Hechtbauer:

It’s easier and more convenient of course to have your ssh keys and ssh-agent set up right (cf. ssh(1) “public-key cryptography”, ssh-agent(1), and ssh-add(1)) and just

(setq imap-shell-program '( "ssh -x -C remote.imap.host /usr/sbin/imapd" ))

(setq gnus-secondary-select-methods
      '(
        (nnimap "host"
                (nnimap-address "remote.imap.host")
                (nnimap-stream shell)
                (nnimap-list-pattern ("INBOX" "mail/*"))
        )
))

in your .gnus.el; So you M-x gnus and it just opens a ssh connection and starts your imapd preauthenticated. No need for username and password at all.

But on opening gnus (oort 0.7cvs) in XEmacs (21.5.4), the correctly issued command hangs forever. Maybe a Courier IMAP-specific issue?

Will Yardley provided the Courier-specific clue I need:

 From: Will Yardley
 Subject: Re: Pine, ssh and Cyrus imapd
 Newsgroups: comp.mail.pine
 Date: 2002-03-13 08:34:03 PST

 
 ... what happens when you ssh to the machine with that command; ie:
 ssh hostname -q -l username exec /usr/sbin/imapd

 you want it to say something like:
 * PREAUTH Ready.
 

 i made this work with courier imapd by making /etc/imapd with this in it:

 zugzug% cat /etc/rimapd
 #!/bin/sh
 umask 077
 /usr/bin/imapd 2> /dev/null Maildir

 otherwise it doesn't work because if you run the courier binary directly
 it sends stderr along with stdout (since it's not being run by courier's
 standard facilities).

This didn't quite work, but incorporating the idea in my .gnus.el works!--

 (setq imap-shell-program '( "ssh -C remote.imap.host imapd 2>/dev/null Maildir" ))

 (setq gnus-secondary-select-methods
        '(
          (nnimap "host"
                (nnimap-address "remote.imap.host")
                (nnimap-stream shell)
                (nnimap-list-pattern ("INBOX" "INBOX.Lists.*"))
                ;; optional:
                (imap-log t) ; put imap session trace in buffer *imap-log*
                (nnimap-expunge-on-close always)
          )
 ))

Yes!

Verdan Verdana-nanna

Michael Jardeen graciously makes available several Beowulf Radio themes, like this one.

Like Michael, I’m tired of sans-serif faces like Verdana, whereas I love Courier New. I always use Courier New for editing text. I wonder if I’ll like it as well for presentation? Let’s find out.

[2002-06-03: I see I like Palatino and New Century Schlbk (serif faces in general) better for presentation. Tweaking … ]

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>

Copyright learning and opinions

Yesterday I noticed a useful one-page copyright resource (thanks, Dawn) called What is Copyright Protection? Among the FAQs and comments addressed there is one I must have partly fallen for way back, “Hey — everyone knows that HTML coding and webpage layouts cannot be copyrighted!” I ought to know better.

What happened, I think, is I’ve operated so long in realms where building on (and crediting) previous work is so much the encouraged norm — as with the work of corporate employee predecessors or open-source contributors — that it’s easy to make the mistake of applying this copy-analyze-recreate site design technique across the board.

Live, stumble, learn.

However, in addition to learning to pay very close attention to what uses a creator authorizes, I’ve also learned that the occasional copyright mine-fields (“Mine! Can’t use this.” “Mine! No copying.”) are mostly places I just want to stay out of.

I want to become like, say, Eric Costello who, in CSS Layout Techniques: for Fun and Profit, goes so far as to say “Feel free to steal all the code you find on this site.” (Eric is addressing a particular audience, people like me who want to learn “how to translate typical table based layouts to CSS layouts.”) Thanks, Eric.

I want to be like that — knowledgeable, encouraging, generous.

Maybe it’s my own values thing — I see encouraging others, and helping others learn, as a much higher priority than laying claim to creative output, however legitimate. I think creativity — and by extension, its output — is an ongoing gift in the first place. I’m in no position to claim ownership for something that’s given new to me every day.

When others lay such claim — “don’t steal my site design” — it’s certainly legit if that’s what they want. But man, it puts me off. Of course I’ll respect the request, but I’ll also immediately lose interest and turn my attention (and in some cases, dollars) elsewhere.

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>

School’s out for summer

I’m temporarily off in a ditch, motivation-wise.

I kinda think that if I’m inadvertently jumbling together themes, skins, CSS layouts, and stylesheets in ways I shouldn’t be, then I need to set this down for a while and take a break.

Until I get my groove back, I’m reverting to my previous Radio theme (a less CSS-layout-dependent, modified Woodlands theme that looks better in older browsers), and attending to other interesting things.

Peace to everyone!

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>

Copyright/terms-of-use assistance to the rescue

Syncronicity! The newly-announced Creativecommons.org aims to address the kinds of copyright/terms-of-use issues that were giving me such heartache yesterday:

Creative Commons is a non-profit organization founded on the notion that some people would prefer to share their creative works (and the power to copy, modify, and distribute their works) instead of exercising all of the restrictions of copyright law …

We want to make it easy for people to find works that are in the public domain or licensed on generous terms. We are developing a method for labeling such works with metadata that identify their terms of use. Potential users could then search for works (say, photos of the Empire State Building) based on the permitted uses (say, noncommercial copying and redistribution).

As terms of use intended by a work’s creator become clearer, it’ll be easier to do The Right Thing in honoring those intentions. That will be good for all of us — especially me (since I seem to need a 2x4 to clarify what’s okay and what isn’t :-) ).

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>

Perils and pratfalls on the road to CSS enlightenment

I have been bummed all day by a collision in ethical perceptions about web design (related to copyright). Yesterday I was so excited about learning CSS I could burst.

In the process of learning to use Movable Type and CSS to create visually appealing weblogs, I did the following SOP:

  • explored to find a site design worth emulating
  • found a great one
  • copied its design as starting point for my own
  • prominently credited its designer (and emailed a thank-you note as I began)
  • began process of building on/evolving the design into my own

(Same procedure, seems to me, as using Joe’s [freely offered] CSS Theme for Radio.)

What I intended as highest compliment — the modeling of a fantastic design — the original site’s designer interpreted as design ripoff. To avoid conflict, I took the fledgling design offline.

Now, I’ve always thought of this approach as part of the “standing on the shoulders of giants” ethos that generates such quality work in the free-/open-source software community (and now in the Radio UserLand community as well). It’s an approach that respects copyright while it avoids reinventing the wheel. It measures success in part by the extent to which your ideas/designs are adopted elsewhere.

And it is, to the best of my recollection, how the Web has always worked.

Am I mistaken? Have I misunderstood the spirit of the Web all these years? Right or wrong, I am dumbfounded and discouraged by the rebuke.

Things I wonder about as a result of this experience —

  • Did I faux pas out the wazoo by not asking permission first? Asking first would be a courtesy, of course, but hardly the norm.
  • How does copyright actually apply to the look-and-feel of a site? (I’m a writer, so I’m attuned to how copyright applies to content. But I’m not so attuned to its application to visual design.)
  • Is there a sociological, maybe typological, difference between skilled Radio people and skilled MT people? (Like, perceivers of work-as-good-to-be-shared vs. work-as-self-to-remain-inviolate? If so, I understand both—I’m an engineering-trained INFP, for heaven’s sake. But I’m habituated to working with people who want you to use their stuff, to participate in its development, to propagate it widely. They’re the kind of people I enjoy learning from most.)

[2002-05-16 update: No matter what, I intend to do The Right Thing (for starters, that means honoring the wishes of any work’s creator). As the need for a Creative Commons implies, I’m one among many who will benefit from a clearer understanding of what that Right Thing is.]

<!— imported into MT from 2002 Radio entry via RE on 2003-12-10 —>