Migrate Gmail to Gmail

If you created a new Gmail account and wished you could migrate all your mail from an old Gmail account across, or if you yearned to make a seamless switch from Gmail to Google Apps, then this will provide a solution for you.

The Solution: imapsync

This method uses imapsync and preserves labels and mail, including Sent items. imapsync is available in many linux distributions.

You must have enabled IMAP access on both your source and destination Gmail accounts. If you have enabled the IMAP-Controls feature in Gmail labs you must ensure all labels have been tagged “Show in IMAP”

This script will sync all labels and mail from user1 to user2. The process is done in two steps, first all labels are created, then the mail is copied. Mail from Trash and Spam is excluded.

It requires you have your passwords in $HOME/.imap/passfile1 and passfile2 for authentication.

#!/bin/bash
 
user1='username1@gmail.com'
user2='username2@gmail.com'
 
# escape the @ symbols
user1e=${user1//@/\\@}
user2e=${user2//@/\\@}
 
# Create folders/labels first
imapsync --host1 imap.gmail.com \
--port1 993 --user1 "$user1" \
--passfile1 $HOME/.imap/passfile1 --ssl1 \
--host2 imap.gmail.com \
--port2 993 --user2 "$user2" \
--passfile2 $HOME/.imap/passfile2 --ssl2 \
--syncinternaldates --split1 100 --split2 100 \
--authmech1 LOGIN --authmech2 LOGIN \
--exclude "\[Gmail\].*" \
--justfolders --nofoldersizes
 
# Sync mail, only copy new items
imapsync --host1 imap.gmail.com \
--port1 993 --user1 "$user1" \
--passfile1 $HOME/.imap/passfile1 --ssl1 \
--host2 imap.gmail.com \
--port2 993 --user2 "$user2" \
--passfile2 $HOME/.imap/passfile2 --ssl2 \
--syncinternaldates --split1 100 --split2 100 \
--authmech1 LOGIN --authmech2 LOGIN \
--useheader "Message-ID" --skipsize --allowsizemismatch \
--exclude "\[Gmail\]\/Spam|\[Gmail\]\/Trash" \
--regexmess "s/Delivered-To: $user1e/Delivered-To: $user2e/g"

References

Gmail to Google Apps Email Migration

Migrate email from Gmail to Google Apps

Other Options

Gmail-Backup (not tested)

Python migration script (not tested)

Tags: , , , ,

SSH Proxy

Did you know that OpenSSH includes function to act as a SOCKS4 and SOCKS5 host? (I didn’t)

It is as simple as creating a “Dynamic forwarded port” in PuTTY or using the -D switch with the SSH client.

Tunnelling just became a whole lot easier.

References

HOWTO: Secure Firefox and IM with PuTTY

Tags: , ,

Comparison of Twitter clients

Echofon

(formally known as Twitterfox)

Pros Cons
  • Easy to favourite, reply, retweet
  • Shortcut key for open and paste in current page’s url
  • Automatically shrinks urls
    Uses browser’s dictionary
  • Easy to open selected tweet’s owner’s page in browser
  • Compact user interface
  • Preview destination of short urls before clicking
  • Only loads subset of recent tweets, not all since last runtime
  • Seems to randomly switch between using bit.ly and tinyurl.com
  • Ugly theme since renaming to “Echofon”
  • No marking of posts as read

Tweetdeck

Pros Cons
  • Preview destination of shortened links before opening in browser
  • Can mark posts ‘read’
  • Fixed height for all tweets wastes precious screen space.
  • NO colourcoding of text (eg. links, usernames, etc)
  • Marking post ‘read’ only marks it in current tab
  • No smooth scrolling, scrolls item by item

Seesmic

Pros Cons
  • Different Tweet types are colourcoded (eg. messages, replies, ReTweets)
  • No checklist of current followed accounts, makes it tedious to create a list of friends – have to locate an existing tweet and then click ‘add to userlist’. (compared to how Tweetdeck does it)
  • Adding a user to a list will not bring over their existing tweets (unless you restart the program)
  • No marking of posts as read
  • No smooth scrolling, scrolls item by item

Peoplebrowsr

Pros Cons
  • Has web and desktop versions (thus far appear identical, and settings carry-over between them)
  • Can switch between Lite, Advanced, and Business modes.
  • Can show people’s @replies that are not directed at you
  • Marking a post as ‘read’ markes it in ALL tabs (and changes its colour)
  • Smooth scrolling
  • Preview the destination of short urls
  • Desktop App (Adobe Air) is buggy and slow

Tags: , , , , , ,

Deleting in Gmail IMAP

Getting “Delete” to work as expected in Gmail IMAP was surprisingly complicated.

The default action when a client deletes a message is to archive it (ie: move it to “All Mail”). I didn’t like this because then if I accessed the account from POP the deleted mail would still be downloaded.

Recommended IMAP settings tells you all the things NOT to do, but doesn’t give any useful advice on how to setup clients.

Eventually after trying many different settings I realised the simplest method was to tell the client to MOVE the message to the Gmail Trash folder when it is deleted. To do this in Thunderbird2 required manually editing the prefs.js file to specify a custom IMAP trash folder:

user_pref("mail.server.server#.trash_folder_name", "[Gmail]/Trash");

Note that the case of the trash folder name IS important.

Tags: , , ,

Better GMail Sending

Sending email from Gmail without adding on the custom “Sender: youraccount@gmail.com” has been a long requested feature from users. So frequently requested was this feature that search results were flooded with complaints and requests even after Gmail provided a solution and announced it on their blog.

The solution is an enhancement to the “Send as” options that allow you to specify a different “From” address to your Gmail account. Within this is now an option to send the mail via your own server thus completely bypassing Gmail’s outbound SMTP, and thus your mail appears as if it were send from your own host.

For this to work you must have a SMTP account that will accept outgoing mail via Google’s servers (with or without authentication), and be able to verify that you own the email account (which is the same method of verifying that you receive a unique code that is emailed to the account).

References

Send mail from another address without “on behalf of”

Tags:

Disable WordPress Autosave

WordPress’ Autosave feature was getting on my nerves. Often I make several revisions of a page before I save and WordPress was saving intermediate drafts that I didn’t want to keep.

I was surprised to find that there is no option in WordPress core to disable Autosave. Thankfully though it is incredibly easy to disable through editing the source or creating a custom plugin.

The following code (take from the reference link below) will function as a WordPress plugin and will disable autosave (works in WordPress 2.8)

<?php
/*
Plugin Name: Disable Autosave
*/
function disable_autosave() {
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'disable_autosave' );
?>

References

Adjust WordPress Autosave or Disable It Completely

Tags: ,

Multiple accounts with Gmail

There are two separate features of Gmail, that when used together can greatly ease the management of multiple email accounts.

Firstly, setup a mail import using POP3 and select the options “Archive incoming” and “Label incoming”. This will have the effect of labelling all your mail from that account (call it “Account1″) and more importantly NOT displaying it in your regular Inbox.

Now for the magic, go to Gmail Labs and enable “Multiple Inboxes”. At its base this tool simply allows you to have multiple panes above or below your regular Inbox, and the contect of each pane is specified as a Gmail search (can be keyword, label, or anything else).

So set a pane’s search as “is:Account1″, and the mail that is imported by POP3 will show ONLY in this pane, and you can check it at the same time you are checking your Inbox.

References

How to use Gmail’s “Multiple Inboxes” for extra Gmail accounts

Tags:

OpenSSH escape characters

SSH has tilde (~) as an escape character by default. Make sure that the last you typed in was nothing or a newline, then type one of the following sequences:

~. - terminate connection
~B - send a BREAK to the remote system
~C - open a command line
~R - Request rekey (SSH protocol 2 only)
~^Z - suspend ssh
~# - list forwarded connections
~& - background ssh (when waiting for connections to terminate)
~? - this message
~~ - send the escape character by typing it twice

References

OpenSSH Escape Characters
man page ssh(1)

Tags: ,

Safe reboot a crashed Linux

Originally seen here as Skinny Elephants, this sequence of keys allows you to safely reboot a Linux system that has blocked – avoiding hitting the reset button.

Raising Skinny Elephants Is Utterly Boring

Here is how you “raise the elephant”:

Alt+SysRq+r ( The LEFT Alt key ) ( SysRq is on the same button as print screen )
Alt+SysRq+s
Alt+SysRq+e
Alt+SysRq+i
Alt+SysRq+u
Alt+SysRq+b

Give a little time between keystrokes.

The r stands for put keyboard in raw mode
The s for sync the disk
The e for terminate all processes
The i for kill all processes
The u for remount all filesystems read only
The b for reboot the system

THIS IS THE VERY LAST SAVE YOUR BUTT PROCEDURE ! ONLY IF ALL ELSE FAILS !

Bruno

PS: If your filesystem is Ext3 or ReiserFS and on reboot it wants you to do a filesystem check, don’t touch any key when it asks you to press “Y” and let it recover the journal automatically.

NOTE: For the skinny elephants to work you need to have the sysrq-key enabled in the kernel. (CONFIG_MAGIC_SYSRQ)
You can check if it is enabled by typing “cat /proc/sys/kernel/sysrq”, if the command returns “1″ the sysrq-key is enabled.
If it returns “0″ you can enable it with “echo 1 > /proc/sys/kernel/sysrq”

Tags:

PowerPoint vs OpenOffice

Comparing PowerPoint 2007 vs OpenOffice 3.1.0 vs GoOo 3.1-10.

There is one crucial feature I use in PowerPoint that has prevented me from switching to OpenOffice: the Presenter View.

Microsoft PowerPoint

PowerPoint 2007 has further improved the presenter view from previous versions: it can now no longer hogs your primary display and can even be resized. This allows for even easier access to the main program window while a slideshow is running.

Why would you want that you may ask? Realtime edits. You can edit your slideshow while you are showing it. From adding new slides, rearranging slides, and editing slide contents – changes are updated immediately.

Editing the current live slide is also possible – with changes appearing AS YOU TYPE. It is also very easy to annotate slides, with various pen and marking tools.

OpenOffice Impress

OOo Impress does not currently include a presentation manager of any description. Well at least that’s what I can tell from the documentation and options. Worse still, this version of OOo crashes every time I attempt to run a slideshow. So at this point I gave up and decided to look at an alternative build named Go-oo.

There is a Presenter Screen plugin for OOo 3.0, but had no luck getting it to work with current builds of OOo.

Go-oo Impress

Go-oo Impress already includes the Presenter Console plugin so I was finally able to test it. Lets see how it compares to PowerPoint 2007.

PowerPoint OpenOffice
Presenter Views Single view with resizable panes: Slide scroller, Notes, and Current slide Pre-set views: Notes/Slides/Current Slide
Presenter Window Resizable Locked Fullscreen
Live Edit Yes, changes are immediate No, program interface completely locked
Go-to Slide Yes No
Annotation Yes, Pens, Hi-lighters, etc No
Blank screen Yes, Black/white screen options No

Both contain a timer and simple back/forward navigation.

This comparison reflects the features I use regularly in PowerPoint, and as you can see Impress is still rather unimpressive in this regard. I have hope that OpenOffice will continue to improve, but by the time it catches up to where PowerPoint is today the goalposts will have already moved.

Tags: , ,