---
title: "Achieving Inbox Zero"
date: "2014-11-03"
category: "email"
slug: "achieving-inbox-zero"
---

## Overview

[Inbox Zero](http://www.43folders.com/izero) is a methodology for keeping your inbox empty (or nearly so). Using a scheduled script, read messages are automatically moved to a yearly Archives folder after 5 minutes. Starred (flagged) messages remain in the inbox until unstarred.

![Example of an e-mail that remains resident after starring in Thunderbird.](kb-image:starred-test.png)
*Example of an e-mail that remains resident after starring (marking "important") in Thunderbird.*

## Setup

Create a file named `inboxzero.sh` in your home directory (or download from **Resources** below), then schedule it to run every 5 minutes:

1. Upload the script to your home directory
2. In the control panel, go to **Dev** > **Scheduled Tasks** ([[is-terminal-access-available]])
3. Set `*/5` for _minute_ and `*` for all other time parameters
4. Under _Command_, enter `/bin/bash /home/user/inboxzero.sh` (replace `user` with your username)

### Script Contents

#!/bin/sh
ARCHIVE=".Archives.$(date +%Y)"
MAIL="Mail/"
# Time, in minutes, to hold a read, unstarred e-mail
HOLD=5

[[ ! -d "$HOME/$MAIL/$ARCHIVE" && maildirmake "$HOME/$MAIL/$ARCHIVE" ]]

find $HOME/$MAIL/cur -type f -cmin +$HOLD -mmin +$HOLD -regex '[^:]\*:[^F]\*$' -regex '[^:]\*:.\*S.\*$' -exec mv {} $HOME/$MAIL/$ARCHIVE/cur/ \\;

## Resources

[Download](kb-image:inboxzero.zip) inbox-zero script.

> sha-256 sum: e64a95aabd47dfb5fff9d1b2ce9483fe9de2edf28875b27bd992bf5c327c8e61
> md5sum: f39fa0f67adda20d371758f5505b1bd5
