• This repository has been archived on 25/May/2020
  • Stars
    star
    344
  • Rank 123,066 (Top 3 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 12 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NoPriv.py is a python script to backup any IMAP capable email account to a HTML archive, nicely browsable, instead of weird folders (Maildir), one huge file (mbox), only needing a web browser to view (thunderbird) and no propritary code, so you can make sure I don't steal your password.

NoPriv.py - HTML5 IMAP email backup

NoPriv.py is a python script to backup any IMAP capable email account to a bowsable HTML archive and a Maildir folder. Not one huge file (mbox), only needing a web browser to view and no proprietary code, so you can make sure I won't steal your password.

Screenshots

Running the program

Index page

Folder Overview page

Email itself

Attachments

Empty Folder

Command Line Client (links2):

Features

  • Works with any IMAP/IMAPS account
  • Supports multiple IMAP folders
  • Supports text, HTML and multipart email
  • Saves attachments
  • Supports incremental backups
  • Backups to HTML files for easy browsing
  • Small HTML files can be backed up to external medium more easily, and can be sent over the internet more easily.
  • Backs up to Maildir for easy restoring

Changelog

New in version 6: (18-11-2013)

  • Add support to download all folders without typing them all out. Using "NoPriv_All" as foldername now downloads all available folders.
  • Fix quite a few HTML errors
  • Converted layout from HTML Kickstart to Twitter Bootstrap
  • Add offline mode (only converts the Maildir to HTML, does not try to download new email)

New in version 5:
(13-11-2013)

  • Fix issue #22, NoPriv does not crash on empty IMAP folders anymore
  • Fix issue #23, NoPriv now tries a few times when the IMAP connection is reset. This happens with Google Mail sometimes.

New in version 4:

New in version 3.1:

  • Added a sample muttrc file to view NoPriv with the Mutt mail client.

New in version 3:

  • Supports incremental backups
  • If you stop the backup while running, it will now continue were it left off
  • Unread mails stay unread, but are backed up (before they were marked as read)
  • Restoring possible because it also creates a Maildir
  • Better unicode support
  • Attachment page is now also styled

New in version 2:

  • Support for multiple IMAP folders
  • Index page is generated
  • Pages have menu now.
  • On running it shows all available IMAP folders.

Usage

  1. Clone the repository:

    git clone git://github.com/RaymiiOrg/NoPriv.git

  2. Set up your login details, imap server and ssl:

Edit the nopriv.ini file with your IMAP server, login and password:

[nopriv]
imap_server = imap.gmail.com
imap_user = [email protected]
imap_password = my_secrept_password
imap_folder = INBOX, Draft, Newletters

#optional
ssl = true
incremental_backup = true

If you want to use SSL to connect to IMAP, or want to use incremental backups, enable or disable the options.

If you want to backup all folders, enter NoPriv_All as imap_folder.

Nopriv.ini can be in the following locations:

  • './nopriv.ini'
  • './.nopriv.ini'
  • '~/.config/nopriv.ini'
  • '/opt/local/etc/nopriv.ini'
  • '/etc/nopriv.ini'

If you use gmail and want to backup all your email, use the "[Gmail]/All Mail" folder. It might be named different if you use another locale, for me with a Dutch gmail account it is named "[Gmail]/Alle Berichten".

  1. Execute the script:

    python ./nopriv.py

  2. Browse the generated backup:

Open the file index.html in your browser. There are all your folders and emails.

If you only have a console, it works just fine in Links2 (see above screenshot):

links2 ./index.html

Requirements

Python 2.7

Running debian 6 which has python 2.6.6? See here how to install python 2.7 on debian 6.

Known issues

  • Does not work with python3 (Feel free to port/fix it.)
  • Does not handle all charsets. Works best with utf-8 and ascii.
  • No search function.
  • Not able to change default sorting (latest first).

Info on incremental backups

If you disable incremental backups, the script will run over the folders, create a maildir, create the pages and then move the maildir to $maildir.date where date is a timestamp. If you enable incremental backup, it will create a text file nopriv.txt with the mail ID's of the folder, so that it know which ID it needs to continue on the next time it is ran. If you delete emails from the folder, the incremental function will not work as expected because of differing ID's.

Info on restoring

Nopriv creates a Maildir folder, which houses all your email. You can restore this maildir folder to an IMAP account either by using the script linked at the top on this page, or use a mail client like Mutt or Evolution and transport it to an imap account via there.

More Info:

https://raymii.org/s/software/Nopriv.py.html
https://github.com/RaymiiOrg/NoPriv

More Repositories

1

bash-http-monitoring

HTTP(s) monitoring webpage via shell script
Shell
573
star
2

ssl-decoder

Simple PHP script which decodes an SSL connection and displays the information.
PHP
449
star
3

certificate-expiry-monitor

https://certificatemonitor.org
PHP
432
star
4

cipherli.st

Ciplerli.st - strong ciphers for NGINX, Apache and Lighttpd
HTML
315
star
5

ansible

My ansible playbooks
PHP
175
star
6

confluence-python-cli

A simple python script for interaction with a Atlassian Confluence Wiki
Python
121
star
7

simple-nagios-dashboard

Simple PHP 5 Nagios Dashboard.
PHP
57
star
8

to-text.py

Convert URL or RSS feed to text with readability
Python
49
star
9

ansible-vmware

Simple python script which uses PySphere to fill the Ansible inventory from VMWare vCenter.
Python
45
star
10

CertInfo

Which Root Certificates should you trust?
C++
42
star
11

openssl-modern-cpp

Examples showing OpenSSL C API usage with Modern C++ (smart pointers, RAII)
C++
39
star
12

cpp-qr-to-png

A bridge between two great libraries, QR-Code-Generator and Tiny-PNG-Out.
C++
31
star
13

boa-diminish-restricted-shell

A shell where you whitelist commands and only those commands can be executed. Either via ssh, as an interactive shell or launched with commands. Logs everything and escapes "dangerous" characters.
Python
24
star
14

nagios

My Nagios scripts and configs
Shell
20
star
15

restrict_ssh

This bash script restricts ssh to a set of commands via .ssh/authorized_keys
Shell
18
star
16

cpp-command-output

Execute commands and get exit status and stdout
C++
16
star
17

c_ookieclicker

c++ console cookie clicker (linux)
C++
15
star
18

raymiiorg.github.io

Raymii.org
HTML
14
star
19

librenms-api-alerts

Python script to talk to LibreNMS API and get alerts and hosts
Python
9
star
20

securecrt-arch-linux

VanDyke SecureCRT PKGBUILD for Arch Linux
Shell
9
star
21

qml-cpp-integration-example

QML
7
star
22

ScreenSaverStopper

Stop system from going to screensaver by sending F24 keystroke every 40 seconds.
C++
7
star
23

nutsmanager

Power/Water/Gas overview manager written in PHP/JSON
JavaScript
6
star
24

openstack-nova-snapshot

Easy OpenStack Nova snapshots from inside instances
Shell
5
star
25

rasplayer-fm

https://raymii.org/s/articles/Raspberry_Pi_FM_Radio_With_Buttons.html
C
5
star
26

ponify.nl

Lock your workstation or spread the Pony love!
Shell
4
star
27

browsa

Little Python script which browses random websites, to make it harder for spying entities to extract data points and signals from monitoring.
Python
4
star
28

log_vcs

Ansible callback plugin that creates a VCS branch every time you run Ansible. If you ever need to go back to a certain state or environment, check out that branch and be sure nothing has changed.
Python
4
star
29

lobsters-hn-post-compare

Hacker News vs Lobste.rs in C++, an exercise in parsing json http api's and date/time/timezones
C++
4
star
30

apt-update-mailer

This is a bash script which can be ran from a cronjob. It mails which packages can be updated, the current version you have installed, the version you are updating to and an URL to the Ubuntu package archive with more info on the update.
Shell
4
star
31

marktplaats-parser-with-filter

Marktplaats parser with filters
Python
3
star
32

CloudVPS-Boss

https://www.cloudvps.nl/blog/cloudvps-boss-linux-backup-naar-object-store
Shell
3
star
33

munin-plugins

My Munin Plugins, who doens't like nice graphs?
Shell
3
star
34

bind-gnuplot-reports

A very simple script which uses GNUplot to create graphs of Bind Query logs.
3
star
35

hash-check-mail

check-file.py - Python script to monitor a file for changes and then mail the report with the file attached.
Python
3
star
36

qt-http-get-request-qml-cpp

Example Qt code showing HTTP get request in C++ and Qml
C++
3
star
37

ansible-openstack-horizon-dashboard

Installs Horizon on Ubuntu
2
star
38

ckermit-snap

Snap package of Ubuntu 18.04's version of ckermit, because 20.04 repo doesn't have ckermit
Shell
2
star
39

QtQrcSourceCodeToDisk

Embed the source code directly in your application
C++
2
star
40

pygopherdstats

Simple log analyzer for pygopherd. Fun if you have a gopherhole and want statistics.
Shell
2
star
41

qml-responsive-layout-example

QML
2
star
42

WeatherTerminalPart1

QML
1
star
43

Win10KDESplashScreen

Windows 10 KDE Splash Screen
QML
1
star
44

qml_cpp_signal_example

QML
1
star
45

YouLessQt

Helpt de YouLess energiemeter goed op de analoge (draaischijf) meter plakken
QML
1
star
46

openscad

OpenSCAD
1
star
47

cookienumberprinter

C++ class to print idle / incremental style numbers.
C++
1
star