Discussion:
How to get Alpine-1.10 to use Mac OS 10.4 Default Keychain ?
Dr. Gary E. RAFE
2008-03-23 20:04:05 UTC
Permalink
My wife is a long-time pine(1) user,
and I've ported versions of UW-pine for her
on various platforms over the years.
The last was pine-4.64 with the Chappa combined patches
on a Mac G4 running 10.4.x.

I was made aware recently of the new Alpine project,
and built binaries of it on the same Mac G4, running
currently 10.4.11.

The first version was built with the local disk password
file (I know, ill advised), which worked perfectly with
the local password file from the older Pine-4.64 binary.

The second version enabled the local password cache,
which in this case, uses the native Mac OS X Keychain.

This appeared to build without complaint, and the binary
executes as it should.
The trouble is that passwords don't appear to be saved
(in ~/Library/Keychains/), thus are not applied when needed
subsequently (in our case, when sending messages through an
authenticated SMTP service).

Relevant entries from .pinedebug follow:

14:32:52.038577
q_status_message(Stop "Preserve passwords?" prompts by deleting Alpine Keychain entry)

14:32:52.038789
imap_set_passwd

14:32:52.038885
imap_set_passwd: user=MyUsername altflag=1

14:32:52.038985
imap_set_passwd: host=smtp.abc.xyz

14:32:52.039173
imap_set_passwd: passwd="MyPassword"

14:32:52.039259
write_passfile

14:32:52.078985
write_passfile: SecKeychainAddGenericPassword returned rc=-25308

The return code of SecKeychainAddGenericPassword indicates
that "Interaction with the Security Server is not allowed".

Are we missing some prior setup, outside of alpine(1)
(say, with security(1) and the Security.framework)
to make this work correctly ?

Security(1) reports that a default keychain is enabled,
and has entries from other Internet applications.

Suggestions and/or pointers to solutions are appreciated.
--
Dr Gary E RAFE: drgerlists at gmail dot com
Dr. Gary E. RAFE
2008-03-23 20:18:16 UTC
Permalink
!My wife is a long-time pine(1) user,
!and I've ported versions of UW-pine for her
!on various platforms over the years.
!The last was pine-4.64 with the Chappa combined patches
!on a Mac G4 running 10.4.x.
!
!I was made aware recently of the new Alpine project,
!and built binaries of it on the same Mac G4, running
!currently 10.4.11.
!...

After scanning the recent thread "Keychain use on Mac OS 10.5",
I'm wondering now if this is one of those services that needs to
be run on the console in order for it to work.

The testing I reported in the previous post was all performed
remotely via an SSH connection.
We don't have access to the console until later Monday afternoon.
--
Dr Gary E RAFE: drgerlists at gmail dot com
Steve Hubert
2008-03-24 17:53:02 UTC
Permalink
Post by Dr. Gary E. RAFE
!My wife is a long-time pine(1) user,
!and I've ported versions of UW-pine for her
!on various platforms over the years.
!The last was pine-4.64 with the Chappa combined patches
!on a Mac G4 running 10.4.x.
!
!I was made aware recently of the new Alpine project,
!and built binaries of it on the same Mac G4, running
!currently 10.4.11.
!...
After scanning the recent thread "Keychain use on Mac OS 10.5",
I'm wondering now if this is one of those services that needs to
be run on the console in order for it to work.
The testing I reported in the previous post was all performed
remotely via an SSH connection.
We don't have access to the console until later Monday afternoon.
I think you're on to something there. The Keychain interactions do
sometimes pop up dialog boxes on the console. I don't quite remember what
is supposed to happen when you're coming in remotely. Maybe it is silently
disabling the Keychain code and it should be a little less silent.

There is an alpine-info mailing list similar to the pine-info list that
may be a better target for alpine questions at

http://www.washington.edu/alpine/alpine-info/

Thanks,
Steve
Matt Ackeret
2008-03-24 18:35:57 UTC
Permalink
I think you're on to something there. The Keychain interactions do sometimes
pop up dialog boxes on the console. I don't quite remember what is supposed to
happen when you're coming in remotely. Maybe it is silently disabling the
Keychain code and it should be a little less silent.
Yes, if you're running remotely, you can't access the keychain as far as I know,
since it sometimes can put up dialogs (so and so binary has changed, allow;
type password for keychain, etc..).

It should work for you if you run it directly on the machine with the keychain.
Matt Ackeret
2008-03-24 18:16:26 UTC
Permalink
Post by Dr. Gary E. RAFE
The second version enabled the local password cache,
which in this case, uses the native Mac OS X Keychain.
This appeared to build without complaint, and the binary
executes as it should.
The trouble is that passwords don't appear to be saved
(in ~/Library/Keychains/), thus are not applied when needed
subsequently (in our case, when sending messages through an
authenticated SMTP service).
I don't know if SMTP passwords are saved. I'm only aware of login passwords
being saved. One of the alpine guys will confirm that SMTP passwords should
be saved too.

My standard suggestions:

1) try on a new local user -- if they are saved there, then there is
something 'funky' in the original user that's preventing the passwords
from being saved.

2) I just checked, on my Leopard-based system, and the alpine keychain items
are actually in BOTH my 'login' keychain and my 'mattack' keychain.
I think that is due to a conversion from Tiger -> Leopard but I'm not
sure.

If there are any alpine items (search for alpine in Keychain Access, the
account will be "UWash_Alpine_Prompt_For_Password" in either keychain,
try deleting them or moving them to the other keychain (I'm not even sure
if it allows you to do that).

These are total guesses. I had a problem like this during the development
of Leopard (I know you're on 10.4), but at some point it went away.
I've never been able to reproduce it again, and haven't figured out whether
it's a keychain or alpine problem.
Matt Ackeret
2008-03-24 18:43:19 UTC
Permalink
Post by Matt Ackeret
Post by Dr. Gary E. RAFE
The second version enabled the local password cache,
which in this case, uses the native Mac OS X Keychain.
This appeared to build without complaint, and the binary
executes as it should.
The trouble is that passwords don't appear to be saved
(in ~/Library/Keychains/), thus are not applied when needed
subsequently (in our case, when sending messages through an
authenticated SMTP service).
I don't know if SMTP passwords are saved. I'm only aware of login passwords
being saved. One of the alpine guys will confirm that SMTP passwords should
be saved too.
...

Based upon the further message, the problem in your case is apparently that
you're doing it over a ssh connection. These steps are only useful
if the password isn't being saved when you're running alpine locally.
Loading...