I solved the problem myself. I didn't change none of the settings in
~/.profile. I simply looked into the Error Console of Thunderbird (I
never paid any attention to that before) and saw the following output:

<snip>
Error: [Exception... "'Failure' when calling method:
[nsIEnigmail::initialize]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: chrome://enigmail/content/enigmailCommon.js ::
GetEnigmailSvc :: line 212"  data: no]
Source File: chrome://enigmail/content/enigmailCommon.js
Line: 212
</snip>

I read the source file and saw that on line 212 it was getting
information from the settings. I noticed that sometimes in my TB
(Thunderbird) settings I would have to press Esc for it to show up. F10
wouldn't work. So I thought I would specify the path to gpg-agent
instead. That gave an error concerning the option --charset=utf8. I then
unchecked the box to specify the GnuPG path and clicked OK. I clicked on
OpenPGP in the file menu and scrolled to "About OpenPGP" It still had
the gpg-agent path. So I pressed Esc, and wow the enigMail preferences
popped up with the box checked on specify GnuPG path. I unchecked the
box again clicked ok and promptly pressed Esc. I went back to the
OpenPGP file menu and scrolled back to "About OpenPGP" and low and
behold it complained about not finding the program. Having a vague idea
what needed to be done, I went back in to the Preferences of enigMail
and checked the box for specifying the GnuPG path and put it to
/opt/local/bin/gpg2 like I had wanted to do all along. Pressed the OK
button, followed by pressing the Esc key, and voilá my problem was
solved with a quick check to "About OpenPGP". Now, to really test that I
had made progress, I opened a mail that I kept around because I knew it
was signed, and the program worked like it should. Then I sent signed
messages to myself. Then  I composed this message saved it in Drafts,
quit TB, restarted TB, and then sent this message to the list signed.
Well, it failed with the failing to initialize enigmail, I checked the
path and it was correct, so I changed it back to gpg-agent, clicked on
"About OpenPGP", and then changed it once more back to
/opt/local/bin/gpg2, looked in "About OpenPGP", saw all was well, and
then I added this updated information and sent the message signed. I
have opened a bug report with the enigMail project on
enigmail.mozdev.org so I will update it with what I have written here
and that is it for now. I think TB likes to activate and run gpg-agent
itself before it can believe the program to exist in daemon from the
terminal.

-Altoine


--- Begin Message ---
Anyone find a way to get this port to work with Thunderbird? Let me
outline my steps. First I port installed gpg2 and gpg-agent:

sudo port -v install gnupg2 gpg-agent

Next, I read the man pages for gpg-agent and do this to my ~/.profile:

000-400-132:~ altoine$ cat ~/.profile
#
# Your previous .profile  (if any) is saved as .profile.mpsaved
# Setting the path for MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
#
# Script for ensuring only one instance of gpg-agent is running
# and if there is not one, start an instance of gpg-agent.
 if test -f $HOME/.gpg-agent-info && \
  kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null; then
   GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info`
   export GPG_AGENT_INFO
 else
  eval `gpg-agent --daemon`
  echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
 fi
# Imperative that this environment variable always reflects the output
# of the tty command.
GPG_TTY=`tty`
export GPG_TTY
#

What I have in my environment is this:

000-400-132:~ altoine$ env
TERM_PROGRAM=Apple_Terminal
GPG_AGENT_INFO=/tmp/gpg-rHDjL0/S.gpg-agent:213:1
TERM=xterm-color
SHELL=/bin/bash
TERM_PROGRAM_VERSION=133
USER=altoine
__CF_USER_TEXT_ENCODING=0x1F5:0:0
PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
PWD=/Users/altoine
GPG_TTY=/dev/ttyp1
SHLVL=1
HOME=/Users/altoine
LOGNAME=altoine
SECURITYSESSIONID=60d9a0
_=/usr/bin/env

This is what I have in my ~/.gnupg/gpg.conf:

000-400-132:~ altoine$ cat ~/.gnupg/gpg.conf
default-key 12345678 #I modified this part from the actual key.
charset utf8
keyserver hkp://subkeys.pgp.net
use-agent
# GPG_AGENT_INFO should be set during gpg-agent startup. In certain
situations
# the use of this variabe is not possible, thus the option
#
# --gpg-agent-info=<path>:<pid>:1
#
# may be used to orverride it.
utf8-strings

In my enigmail preferences I have in the Basic Tab the override path set
to /opt/local/bin/gpg2.

I still receive a notice in Thunderbird that I do not have gpg-agent
running.

Also, I imported my keys from my other computer to this one and gave
ultimate trust to my three secret keys and set one as the primary if
that may be relevant. I would like to have this working through
MacPorts. If anyone has a solution, I am all ears. Please save me.

I am working with Mac OS X 10.4.9 on a PowerPC G4 with all the latest
and greatest updates. The latest XCode version 2.4.1, Thunderbird
version 2.0.0.0 (20070326), and enigmail 0.95.0.


TIA
-Altoine




--- End Message ---

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to