(b) If web browser downloads fail, use wget instead!
(c) The OpenSSL binary here comes from compiling the latest OpenSSL distribution on Scratchbox. It appears to work ok against the older crypto libraries on the n800. The Scratchbox original binary of openssl just didn't work wnen brought over to the n800!
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi # hack so that Alpine can do execv() ok if [ -z "$SHELL" ] ; then SHELL=/bin/sh export SHELL fi
Upon first launching, it will be necessary to visit Alpine's configuration menus. Under IT OS the default user account is "user". This can't be changed. Both Pine and Alpine will try to use this as the default user account for login into the mail server. You either fill in the desired userid prompt at login time or you hardcode it in the definition of your email server, ie.,
Inbox Path = {mail.foo.com/tls/user=userid}INBOX
Again, because the default userid is "user", Alpine generates outgoing email with FROM: headers using this userid. To overcome this, use the Customized Headers option to customize your From: header as necessary, ie.,
Customized Headers = From: Joe Citizen <userid@foo.com>
Also make sure to set the Alternate Addresses option with this address. It affects the Index Display of folders containing outgoing mail messages.
A more advanced way to achieve this is by means of Roles. "You may play different roles depending on who you are replying to. For example, if you are replying to a message addressed to help-desk you may be acting as a Help Desk Worker. That role may require that you use a different return address and/or a different signature."
To set up the outgoing mail connection use the SMTP Server configuration option. The example below configures a secure SMTP server. The novalidate-cert option (hack) is to get around cert validation problems.
SMTP Server (for sending) = smtp.foo.com/tls/novalidate-cert/user=userid
Alpine is normally configured to try rsh-IMAP authentication to get access to the IMAP server without a password from systems where there is a trust relationship with the IMAP server. However, on the Nokia Internet Tablet, rsh is a symbolic link to ssh. Unlike rsh, ssh will prompt for a password if there is not a trust relationship between the client and the server. Unless your Internet Tablet is configured with such a trust relationship (e.g., has an IP address that allows no-password access via ssh to your IMAP server), you should disable Alpine's attempt to use rsh-IMAP. You can do this either by using /norsh in all references to your IMAP server (don't forget the Folder Collections and the Default Fcc as well as the Inbox Path!), or by doing it globally by setting rsh-open-timeout to 0 in Alpine's .pinerc file.
This binary of Alpine has been compiled with pwfile support. The default name of the password file in this binary is .pinepwd. It can be overriden, if needed, by means of the -passfile <file-name> option when launching Alpine. To use the feature start by creating the requisite password file, ie.,
Once done, Alpine will save both IMAP and SMTP passwords on this file when next run. Warning: your passwords will now reside on the n800. To securely erase and remove this file, use the GNU shred utility available above.~ $ touch .pinepwd ~ $ chmod 600 .pinepwd
Warning: shred follows symbolic links, which can have surprising and probably unintended results. Make sure you only list regular files on the command line.~ $ shred --remove .pinepwd
To configure Nokia's Osso-Browser as the default browser for Alpine to use define
URL-Viewers = /home/user/bin/call-browser
and create a shell script, with the above name, to launch the browser.
#!/bin/sh dbus-send --session --print-reply /com/nokia/osso_browser \ --dest=com.nokia.osso_browser com.nokia.osso_browser.open_new_window \ string:$1
For Alpine to successfully execv() this script, SHELL must be set to the current shell -- see sample .profile script above. Note that if a URL is explicitly written in a email message then it suffices to Tap and Hold on the URL to invoke Osso-Xterm's menu and from there click on Open URL.
An Image Viewer can also be configured. But not Nokia's Image-Viewer as it can't be launched with a parameter. Other image viewers such as Mirage can be used.
Image Viewer = /usr/bin/mirage
But its use is limited as Alpine and the image viewer end up fighting for the temporary file created in /var/tmp. And most often than not this makes Alpine crash.
Alpine can be driven very nicely by point and click by setting the "Enable Mouse in Xterm" configuration option. However, doing so disables text copy since the stylus clicks are captured by Alpine. Disabling the option restores text copy but then one must rely entirely on the virtual keyboard and Osso-Xterm's terminal controls. To alleviate this situation, the Alpine command "^\" (Ctrl-\) may be used to toggle mouse control on|off and be able to use text copy. For convenience, this key sequence can be programmed in Osso-Xterm's shortcuts menu. Within the compose window, double-tapping activates Alpine's Mark set/unset.
If you miss Pine's default MESSAGE Index Screen format, it can be replicate by redefining Alpine's default Index Format in the Setup Configuration menu.
Index Format = STATUS MSGNO DATE FROMORTO(33%) SIZE SUBJKEY(67%)
With external Bluetooth keyboards, Alpine works nicely, as it was designed to. However, the n800 lacks suitable keyboard-mappings beyond those for Nokia's own SU-8W Wireless Keyboard. The utilities needed to create keyboard mappings are available above. And for a step-by-step method to create a working keyboard mapping for the new Apple super-thin wireless keyboards look at this excellent article Using the Apple Bluetooth Keyboard with the Nokia N800. The recipes there can be followed to create support for other Bluetooth keyboards.
Alpine can function too as a very useful NetNews reader. The only reservation is that when trying to subscribe to NetNews groups avoid downloading the entire groups list. With a typical groups list of about 100K groups, Alpine becomes unresponsive when trying to format and display the list -- likely runs out of memory. Instead, try specifying partial group names, ie., comp.mail, comp.sys.mac, etc., and Alpine will speedily fetch that group name hierarchy from the NetNew Server. From this partial list one can easily subscribe to the desired groups.
The issue of using Certicates in Alpine has been avoided so far. Recall that to skip Certificate validation problems the Alpine configuration option novalidate-cert was being used. Mark Crispin, of the Alpine team, was able to ascertain the following facts and solution. Under IT OS, Certicate Management and Use is achieved thru IT OS defined APIs – a custom Certificate Database is also used to store the certificates. Alpine, on the other hand is doing Certificate validation using OpenSSL. OpenSSL is part of IT OS, but the certificate store, tradionally used on Unix systems, has not been installed. This store, Mark, determined is supposed to be at /usr/lib/ssl/certs (ie., use strings to search for the OPENSSLDIR directory path in libcrypto). This directory is supposed to contain both Cert files, in PEM format, and their hash links.
The solution involves creating the above directory, and priming it with CA Certs of your choice, plus generating the requisite hashes. A small Certs bundle is available certs.tar.gz here. Download and untar it; and move the resulting collection of .pem files to the above directory. Next, download the OpenSSL binary and install it in your bin/ directory. Likewise, create and install a shell script with a name like makelinks.
#!/bin/sh rm *.0 for i in *.pem do echo $i ln -s $i `openssl x509 -noout -hash < $i`.0 done
Then proceed with,
~ $ cd /usr/lib/ssl/certs /usr/lib/ssl/certs $ makelinks
And you'll have Certificate Validation working in Alpine – provided the cert being validated belongs to one of the Certificate Authorities (CA) defined in the Cert Store. Additional CA Certs can be added, making sure to run makelinks after every addition.
When dealing with a remote server whose certificate does not validate, use openssl s_client -connect <remote-server>:<port> to trace the connection. The resulting output will show the remote server certificate, as well as it's CA signing authority. If the certificate is self-signed, it suffices to add it to the Cert Store – do so by capturing the PEM dump of the cert in the output above. If the certificate is signed by a CA, then it's certificate must be located and added to /usr/lib/ssl/certs. With luck, such a CA cert exists in the n800's certificate manager DB and it suffices to export a copy.
Another bundle of certs is available ca-bundle.crt.gz here, download it with wget. This is a bundle of X.509 certificates of public Certificate Authorities (CA), that were automatically extracted from Mozilla's root CA list (the file certdata.txt). It contains the certificates in both plain text and PEM format.
Since the last release of IT OS 2007, and thru the current IT OS 2008 releases, input of control character sequences such as Ctrl-\ don't work... bug reports have been filed under Bugzilla. With IT OS 2008, Nokia took over osso-xterm and made it less useful to run full-screen text apps such as Alpine. Hacked versions of osso-xterm restoring the lost functionality have been developed, Please refer to the following Internet Tablet talk discussion threads and resources,
http://www.internettablettalk.com/forums/showthread.php?t=18059&highlight=osso-xterm
http://andrew.olmsted.ca/maemo/osso-xterm/
http://www.internettablettalk.com/forums/showthread.php?t=18388&highlight=osso-xterm
Many thanks go to Mark Crispin <mrc@cac.washington.edu> of the University of Washington, who along with the Alpine team, have provided technical support to make this distribution of Alpine for the n800 feasible. Mark is the inventor of IMAP.