Encrypting mail to mailing lists

Bill Wohler wohler@newt.com
Wed Nov 14 07:41:01 2001


Tobin,

  Thanks for salias (do you know if anyone is packaging it for
  Debian?). For the benefit of others who might be curious, here are
  the steps I took to send encrypted mail to mailing lists from Emacs'
  mailcrypt.

  Get salias from http://salias.sourceforge.net/.

  Extract the tarball, and follow the installation directions. It says
  to install any modules from CPAN that the installation finds
  missing. On my Debian GNU/Linux system (this *is* a plug for
  Debian), to download and install the necessary modules, I simply had
  to run:

    apt-get install libxml-simple-perl

  I wrote the following to ~/.salias/config

    <!-- $Id$ -->

    <!-- Configuration file for salias. -->

    <config>
      <context name="gpg" default="gnupg">
	<aliases>
	  <alias name="three.stooges@newt.com">
            <value>Moe</value>
	    <value>Larry</value>
	    <value>Curly</value>
	  </alias>
	</aliases>
      </context>
    </config>

  Now simply stick salias in front of gpg:

    [wohler@gbr:520]$ gpg --list-keys three.stooges@newt.com
    pub  1024D/4A3A0916 2001-10-17 Moe

    pub  2048R/9D2B4363 2001-11-11 Larry

    pub  1024D/60C1AA69 2000-03-09 Curly

  Finally, to get mailcrypt in Emacs to use salias, I was hoping that I
  could just add the following to my .emacs:

    (setq mc-gpg-path "salias gpg")

  However, this didn't work since mc-gpg-path is execed in some
  contexts. So, I set mc-gpg-path back to gpg, and linked ~/bin/gpg to
  ~/bin/salias-wrapper, where salias-wrapper looks like this:

    #!/bin/sh

    # Use this wrapper to call a program with salias.
    # To use, simply link ~/bin/<program> to ~/bin/salias-wrapper, and
    # hope that the real program is in /usr/bin.

    base=`basename $0`
    exec salias --context $base /usr/bin/$base "$@"

--
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and mh-e. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.