Following my
previous article I want to say more about the client side of the
setup. There are many e-mail clients today, with numerous features,
but what can we do to integrate a text-based client into a modern
desktop environment? If you missed my
earlier article
on Zenburn you should know that I made a theme
for Alpine. On to more practical matters, probably the first
thing a new user wants is to be able to launch Alpine
from Firefox when he clicks on a
mailto link. I use a simple shell script which is used as the
"network.protocol-handler.app.mailto" setting in Firefox:
#!/bin/bash urxvt -title Alpine -e alpine ${1:+-url "$1"}One interesting "problem" is when you run your MUA on a remote machine. Once I was in that situation and wanted to have a launcher for Alpine, as just another icon, I solved it with expect. The launcher would start my terminal emulator which would execute the script:
#!/usr/bin/expect spawn ssh mail.host.com #send "export LANG=hr_HR.iso8859-2\r" send "alpine\r" # or maybe jump to Compose right away #send "alpine -I m,c\r" interact #expect "Pine finished -- Closed folder" #send "exit\r" #expect eofA good mailer needs to have spell checking, instead of calling aspell directly I use a script like this, that is set as the "speller" in "~/.pinerc":
#!/bin/bash echo "Language selection:" select name in EN HR ; do case $REPLY in 2|[Hh]) opts=( -l hr_HR.UTF-8 ) ;; esac exec aspell ${opts[@]} -e -c $1 doneThat leaves just one more thing, GnuPG support, and it's easy to setup. You can even call GPG directly from your display and sending filters but it's not very elegant. However there are many simple wrappers that offer a little higher level of usability. My personal favorite is the Pine Privacy Guard.