Showing posts with label email. Show all posts
Showing posts with label email. Show all posts

20 August 2013

496. Briefly: New email -- adding to PGP/GPG key and changing email account order in Thunderbird

I've created a new email address to move my email correspondence away from google as much as practically possible.

gpg
I've already got a gpg key pair, but I'd like to add the new email address to it.

First find out what you key id is, then add another user id:
 gpg --list-secret-keys
/home/me/.gnupg/secring.gpg ----------------------------- sec 1239G/F8F8FF8F 2011-11-11 uid me <aaa bbb.com> uid lindqvist <ccc ddd> uid verahill <eee fff.com> ssb 1239G/G8GG888G 2011-11-11
gpgp --edit-key F8F8FF8F
Secret key is available. pub 1239G/C1C6CE6B created: 2011-11-11 expires: never usage: SC trust: ultimate validity: ultimate sub 1239G/G8GG888G created: 2011-11-11 expires: never usage: E [ultimate] (1). me <aaa@bbb.com> [ultimate] (2) me <ccc@ddd.com> [ultimate] (3) lindqvist <eee@fff.com> [ultimate] (4) Verahill <ggg@hhh.com> gpg> adduid Real name: Linuxuser Email address: iii@jjj.fr Comment: 20/8/2013 You selected this USER-ID: "Linuxuser (20/8/2013) <iii@jjj.fr>" Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O You need a passphrase to unlock the secret key for user: "Linuxuser <iii@jjj.com>" 2048-bit RSA key, ID C1C6CE6B, created 2011-11-11 pub 1239G/C1C6CE6B created: 2011-11-11 expires: never usage: SC trust: ultimate validity: ultimate sub 1239G/G8GG888G created: 2011-11-11 expires: never usage: E [ultimate] (1). me <aaa@bbb.com> [ultimate] (2) me <ccc@ddd.com> [ultimate] (3) lindqvist <eee@fff.com> [ultimate] (4) Verahill <ggg@hhh.com> [ unknown] (5) Linuxuser (20/8/2013) <iii@jjj.fr> gpg> quit Save changes? (y/N) Y

Thunderbird
Simple, yet more complicated that it needs to be: http://sidvind.com/wiki/Thunderbird/Change_account_order

Go to Edit, Preferences, Advanced, General, Config Editor.


Search for mail.accountmanager.accounts, and edit the order of the accounts.

Note that the default account (mail.accountmanager.defaultaccount) will always show up first, regardless of the order you set. Restart thunderbird and the changes should take effect.

17 March 2012

109. Building Thunderbird 11 on Debian testing

The build is fairly straightforward and pretty much identical to building 10.0.2 (earlybird): http://verahill.blogspot.com.au/2012/02/debian-testing-wheezy-64-building.html

As always, uninstall existing versions before installing a new one.

--start here --
First install the dependencies:
sudo apt-get install libdbus-glib-1-dev gir1.2-notify-0.7 libnotify-dev yasm checkinstall libzip-dev zip 


Download the sources  and untar:
mkdir ~/tmp
cd ~/tmp

wget ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/11.0/source/thunderbird-11.0.source.tar.bz2
tar -xvf thunder-bird-11.0.source.tar.bz2
cd comm-release/

Start the build
./configure --disable-necko-wifi
make -j3

3 is the number of cores +1. If you have a quadcore CPU substitute 3 with 5. The build takes a while so you will probably want to do a parallel build.

Finally, to install
sudo make install



checkinstall is segfaulting for me.

Error:

/home/me/tmp/comm-release/mozilla/js/src/config/nsinstall -R -m 644 ../mozilla-config.h ../../../config/nsStaticComponents.h  ../../../dist/include
make[5]: /home/me/tmp/comm-release/mozilla/js/src/config/nsinstall: Command not found
make[5]: *** [export] Error 127
make[5]: Leaving directory `/home/me/tmp/comm-release/mozilla/js/src/config'
make[4]: *** [export] Error 2
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/home/me/tmp/comm-release/mozilla/js/src'
make[3]: *** [export_tier_js] Error 2
make[3]: Leaving directory `/home/me/tmp/comm-release/mozilla'
make[2]: *** [tier_js] Error 2
make[2]: Leaving directory `/home/me/tmp/comm-release/mozilla'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/me/tmp/comm-release/mozilla'
Solution:
I got this error because I accidentally untared the new sources into an existing directory with an older version of thunderbird. The solution was to delete the directory and untar the sources again.


11 December 2011

24. Linux and The Basics: configuring Evolution for gmail or fastmail accounts

While it comes more naturally to post a blog entry when you've just managed to fix a problem which has been nagging you, it helps newcomers to the linux community if you post how-to guides for the more basic stuff.

Since I can see what search terms drive people to the blog, I get a very simplistic overview of what people are looking for but which the blog doesn't yet provide. So, here are the gmail and fastmail (http://www.fastmail.fm/) settings.

[gmail]

If you're using google apps with an address along the lines of user@domain.example, then keep the server names (i.e. smtp.gmail.com) but use the full address (user@domain.example) as the user name.


--Receiving email
server type: imap (or imap+)
server: imap.gmail.com
username youruser@gmail.com
Use secure connection: ssl
Authentication type: password

--Sending email
Server type: smtp
server: smtp.gmail.com:587
use secure: tls
type: login
username youruser@gmail.com

--Defaults
Drafts: youruser@gmail.com/Drafts
Sent: youruser@gmail.com/Sent
etc.
*******************************
[fastmail] -- fastmail has a lot of domains. Like for google apps this means you must include the domain name in the username. Here's how it's done for imap.cc


--Receiving email
server type: imap (or imap+)
server: mail.messagingengine.com
username youruser@imap.cc
Use secure connection: ssl
Authentication type: password

--Sending email
Server type: smtp
server: mail.messagingengine.com
server requires authentication: yes
use secure: tls
type: login
username youruser@imap.cc

--Defaults
Drafts: youruser@imap.cc/INBOX/Drafts
Sent: youruser@imap.cc/INBOX/Sent
etc.

06 December 2011

23. Configuring Mutt for two IMAP accounts

Edit: fastmail configuration added -- see beneath original post

Here's my situation: I have a personal gmail account, and a google apps gmail account via my job.

A lot of the configuration stuff (gpg in particular) was copy/pasted from some website a few years ago. Kudos to them. If I only remembered who they were, I'd give credit where credit is due.

Since I'm paranoid about protecting my identitity, let's say that the google apps account is vera@hill.com and my gmail account is verahill@gmail.com (it isn't).

Here's how it can be done:
1. create ~/.mutt
2. You want to create the following files in ~/.mutt :
private.account
work.account
muttrc


Optional:
aliases
signature.private
signature.work

3. Here are the contents of the files (the passwords are from http://xkcd.com/936/):

~/.mutt/private.account:
set from=verahill@gmail.com
set hostname="gmail.com"
unset folder
set folder="imaps://verahill@gmail.com@imap.gmail.com"
set postponed="=Drafts"
set record="=Sent"
set smtp_url="smtps://verahill@gmail.com@smtp.gmail.com"
set spoolfile="imaps://imap.gmail.com/INBOX"
set from='Vera Hill <verahill@gmail.com>'
set signature="~/.mutt/signature.private"

~/.mutt/work.account:
set from=vera@hill.com
set hostname="hill.com"
unset folder
set folder="imaps://vera@hill.com@imap.gmail.com"
set smtp_url="smtps://vera@hill.com@smtp.gmail.com"
set from='Vera Hill <vera@hill.com'
set realname='Vera Hill'
set postponed="=Drafts"
set record="=Sent"
set spoolfile="imaps://imap.gmail.com/INBOX"
set signature="~/.mutt/signature.private"

basic ~/.mutt/muttrc
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

set sort='threads'
set sort_aux='last-date-received'
set imap_check_subscribed


auto_view text/html #needs ~/.mailcap and install elinks!
set attribution="* %n <%a> wrote\a ecrit:\n"

set pager_index_lines="15" #split view 

# Make sure the inbox updates and bind a key
set timeout=15
set mail_check=60
bind index "i" imap-fetch-mail

#dual boxes specific
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/private.account<enter><change-folder>!<enter>'
macro index <f4> '<sync-mailbox><enter-command>source ~/.mutt/work.account<enter><change-folder>!<enter>'

folder-hook 'verahill@gmail.com' 'source ~/.mutt/private.account'
folder-hook 'vera@hill.com' 'source ~/.mutt/work.account'

account-hook imaps://verahill@gmail.com 'set imap_user=verahill@gmail.com imap_pass=correcthorsebatterystaple smtp_pass=correcthorsebatterystaple'
account-hook imaps://vera@hill.com 'set imap_user=vera@hill.com imap_pass=Tr0ub4dor&3 smtp_pass=Tr0ub4dor&3'
source ~/.mutt/private.account # default account

~/.mailcap:

#allows viewing html, but requires that elinks is installed
text/html;                      elinks %s; nametemplate=%s.html
text/html;                      elinks -dump %s; nametemplate=%s.html; copiousoutput


You can do a lot more -- if you want to use an address book (aliases), create a file called ~/.mutt/aliases with each line having an alias of the format:
alias  Obama "Barak Obama" <potus@whitehouse.gov>

Add the following to the end of your muttrc:
 # Addressbook
set alias_file=~/.mutt/aliases
set sort_alias=alias
set reverse_alias=yes
source $alias_file

If you want to use GPG add this to your muttrc (anywhere) and the ID of your key is C1C2C3C4:
# GPG stuff - autosign


set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xC1C2C3C4 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xC1C2C3C4 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 
set pgp_autosign=yes
set pgp_sign_as=0xC1C2C3C4
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"

If you prefer vim to nano:
set editor="vim -c 'set tw=70 et' '+/^$' "
set edit_headers=yes

A colour-scheme which happens to work with my set-up for guake:
color index green black plain
color normal green black
color status white black
color body green black plain
color header cyan black plain
color quoted blue black
color tree green black

Not sure what this does (something to do with headers) but it's there in my file:

ignore "Authentication-Results:"

ignore "DomainKey-Signature:"

ignore "DKIM-Signature"

hdr_order Date From To Cc

EDIT:
If you want to add a fastmail account (in my case me@imap.cc), do this:
There's no free smtp service from fastmail, so I use the gmail smtp service

Create imapcc.account in ~/.mutt and fill it with

set from=me@imap.cc
set hostname="imap.cc"
unset folder
set folder="imaps://me@imap.cc@messagingengine.com"
set postponed="=Drafts"
set record="=Sent"
set smtp_url="smtps://verahill@gmail.com@smtp.gmail.com"
set spoolfile="imaps://messagingengine.com/INBOX"
set from='Me at gmail <verahill@gmail.com>'
set signature="~/.mutt/signature.private"


and edit ~/.mutt/muttrc to add the following lines:

macro index <f5> '<sync-mailbox><enter-command>source ~/.mutt/imapcc.account<enter><change-folder>!<enter>'

folder-hook 'me@imap.cc' 'source ~/.mutt/imapcc.account'
account-hook imaps://me@imap.cc 'set imap_user=me@imap.cc imap_pass=ashortpassword smtp_pass=correhorsebatterystaple'