Alpine and GPG
by Kevin on November 25, 2008
in Random Knowlege
For a while I have been trying to get used to using the command line for all of my application needs. One of the sticking points for me is email. As far as I can see, the two main text based email clients are Alpine and Mutt.
Mutt seemed to be a pain to configure, I couldn’t find an entry in the config file to put in my details and it brought in a whole bunch of other packages onto my system. Mutt seems to only be able to retrieve mail on its own. Sending requires the extra software which is a downside to me. Extra stuff to update, more possibility of security holes. Alpine on the other hand, has no such problems.
The other main part of email for me is GPG functionality. The default email client in Ubuntu, Evolution, has a really simple way of configuring GPG, just put your key ID into a text field and it does the rest. However, Evolution has a ton of bells and whistles like calendars and address book functionality. Plus I can’t have it backgrounded.
Klaatu did a Hacker Public Radio episode on how to integrate GPG and Alpine but I felt that during the main part he spoke too fast and never went over the proper syntax of the configuration lines, like the need for correct capitalisation. After hunting around a bit more, I found a page that had the correct lines ready for copy and paste (Edit: the symlinks are needed to use the filters properly).
First, open a shell and do the following commands:
sudo ln -s /usr/bin/gpg /usr/bin/encrypt sudo ln -s /usr/bin/gpg /usr/bin/sign
Then open your .pinerc file and amend the display and sending filters to this:
display-filters=_LEADING("-----BEGIN PGP SIGNED MESSAGE")_ /usr/bin/gpg --decrypt,
_LEADING("-----BEGIN PGP MESSAGE")_ /usr/bin/gpg --decrypt
sending-filters=/usr/bin/encrypt --encrypt -r _RECIPIENTS_ -a,
/usr/bin/sign --clearsign
Whack that into your .pinerc file in the right places and so long as you have GPG set up encrypted mail should work.
Gmail Backup
A lot of folk these days are using Gmail as their email provider. There are some good (interface is the best I have used) and bad (the whole cloud computing thing) points to this. An entry on Digg popped up in my news feeds with a link to a program called Gmail Backup. It does exactly what it says. You give it your login details, pick a folder and it dumps all your email into that folder so in the event of Google being evil, you have a backup of all your mail. Very handy.
Comes in both Windows and Linux flavours. The Linux one needs a copy of wxpython installed. There is a command line mac version but it is unsupported.
Email on phone
After much faffing about, I now have email retrieval on my phone. Sending doesn’t work yet which is a bit of a pain but not a huge deal.
I also have 600 minutes and 500 texts to burn through each month so if you want a chat gimmie your number and I’ll call/text you (no international stuff, UK only).
Email Server
For a bloody long time I have been wanting to get my own mail server that I have 100% control of set up. None of the guides I followed were any use to me. A couple of weeks ago, Pig Monkey wrote a series of guides on configuring a web and email server. His guide on email setup seemed to explain the process better so I gave it a shot.
Short story is I now have a functioning web server, w00t! Bad news is that due to my ip address, some email servers won’t accept mail from me and I need to make use of some form of relay that will be accepted. The crappy news is that most of the free relays I could use would also be in use by spammers and they would get blackholed pretty quickly. I could pay for a relay service but I am a cheapskate. Seems I’m gonna be stuck with 3rd party email services for the near future. At least now I know what to do.