The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# Copy this to ~/.offlineimaprc and edit

[general]
accounts = Gmail

[Account Gmail]
localrepository = GmailBox
remoterepository = GmailProxy

[Repository GmailBox]
type = Maildir
localfolders = ~/Gmail

[Repository GmailProxy]
type = IMAP
remotehost = localhost
remoteport = 10143 # from LOCALPORT in gmail-imap-label
remoteuser = user@gmail.com