offlineimap setup

December 29 2016

# # #

OfflineIMAP is a GPLv2 software to dispose your mailbox(es) as a local Maildir(s). What it allows you to do is to make a complete sync of your email over the IMAP protocol and in essence keep local copies of email. This is a GUI-less alternative for a thunderbird email backups, plus you also forgo the usablity of a proper email client which would allow you to make replies to old emails. For these reasons, I personally recommend using thuderbird configured to keep deleted copies of emails as an alternative, but some needs are more basic, and this will get the work done.


OfflineIMAP comes in package repos for all major distos, so installation is as easy as running

$ apt install offlineimap

Or whatever is your package manager of choice.


Create a file ~/.offlineimaprc and fill it with the following content

accounts = <Any Name>

[Account <Any Name (Same as one above)>]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = Maildir
localfolders = <Path to the folder for backup>

[Repository Remote]
type = IMAP
remotehost = <host>
remoteuser = <user>
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

Then all you need to do is run

$ offlineimap

It should prompt for your login password. Enter that, and you should see the emails being downloaded locally and put into the folder you provided.

Restoring Emails

Flipping the localrepository and remoterepository should get the job done. It has not yet been tested.

Recommended Reading

Knock Knock

# # # # # #

Find the flag.

      'url' : '',
        success: function(){ window.location = '' },
        headers: {Connection: 'close'},
  }, 10000);

Note: port-scanning is permitted for...


Recommended Reading

NS Setup

# # #

The NS server of choice is the bind9 server (named) which would be configured for providing a DNS server service for a local subnet

Each server needs to be set to the IP for this DNS server in its /etc/resolv.conf