The Fast Mail Remover
Welcome to the rmmail project page. rmmail is a
tool to help you get rid of unwanted mails quickly while they
still sit in your incoming folder.
Latest release: rmmail 0.0.1 (22 Jan 2002)
Graphical (Gtk) version (alpha):
Are you sick of a situation like this?
[esser@dual esser]$ frm
1-800-FLOWERS.COM Last time to get flowers at a 30% discount
email@example.com Special Prices Offered for 15 Days!!! DIXJ
MonsterHut Re: How to get them to open your email...
firstname.lastname@example.org Renowned Doctor reveals Anti-Aging Discove
Then you open your favorite mail program, and off you go with the
keystrokes or mouse clicks necessary to select and delete most of
the new mails. Some have funny dates of last year and go to a place
deep down in your standard mail folder...
rmmail removes them
To help speed up this process, rmmail lets you go through
the deleting process quickly before your standard mailer even touches
the new mails: Call rmmail without any arguments to edit
your system inbox (typically /var/spool/mail/username).
You get a display of all the new mails, showing only sender,
recipient, and subject - which is what you really need to
decide on deletion. The mails are enumerated, and if you find that
all 34 new mails except no. 11 are useless, then getting rid of the
rest is as easy as typing
d 1-10 12-34
on the rmmail command line. A little sample session waits
Check future plans for upcoming features :)
- Open selected mbox folder by giving the filename as argument. When no
argument is given, the system inbox is used (typically
/var/spool/mail/username) - this is the main intended purpose:
Throwing away unwanted mails before they enter the regular mail client.
- rmmail's command line interface knows several one-letter commands
for deleting and undeleting mails, finalizing the deletion, loading another
file etc. (A full list of options can be found in the man page.)
- Rather than really deleting the mails, rmmail appends them to
a folder ~/.rmmail/deleted.mails. This folder is in standard
inbox format and can be used with any mail reader for recovering.
- With the list command you can always see which mails you are going to
keep: These show up checked [x], while files for deletion are unchecked.
(If reverse order would seem a better idea, let me know...)
- For orientation purposes, the rmmail prompt includes name and
size of the recent mailbox.
- Man page and short help inside the tool
[esser@dual rmmail]$ rmmail test.mail
1 [x] GameSpy Daily <porta -> GameSpy Daily < : What new toy could be the next
2 [x] "email@example.com -> "ilewis2921@kal : Get a great mortgage easily an
3 [x] "firstname.lastname@example.org -> "sherry@dbtrigg : Send Real Time eMail Alerts fr
4 [x] email@example.com -> min83203d@justi : Quick Cash and Great Rates!
5 [x] GameSpy Daily <porta -> GameSpy Daily < : Mod Week Begins at GameSpy ...
6 [x] GMX Best Price <best -> GMX Best Price : 215,57 Euro sparen - mit dem I
7 [x] GMX Best Price <best -> GMX Best Price : 215,57 Euro sparen - mit dem I
8 [x] GMX Best Price <best -> GMX Best Price : 215,57 Euro sparen - mit dem I
9 [x] Johnny Mnemonic <joh -> Johnny Mnemonic : silc config 0.8
10 [x] Pekka Riikonen <prii -> Pekka Riikonen : Forwarded mail....
11 [x] firstname.lastname@example.org -> email@example.com. : When you're overweight life st
12 [x] firstname.lastname@example.org () -> email@example.com : hey, how are you doing?
rmmail[test.mail/12]: d 1-9 11 12
11 Mails deleted; saved in /home/esser/.rmmail/deleted.mails
1 Mails saved in test.mail
Installing & Requirements
rmmail is a Python program. It was written with Python 2.2
and uses the modules sys, string, re,
readline, os, os.path. All of these seem to
be part of a standard Python distribution.
To install rmmail, download the archive
and untar it.
Check the first line of rmmail: If your Python binary sits
in a directory other than /usr/bin/python, you'll have to
change the entry in that line. Copy rmmail to a directory in
your path, and the man page rmmail.1 to something like
/usr/man/man1/ or /usr/local/man/man1. Then you're
Please remember this is untested development software. Even
though it tries to make sure data are protected, use of this program
may result in loss of your mails or other data.
To start the program, just type rmmail (if you have mail in
your system inbox) or rmmail filename to open a specified
If things don't work the way, you'd expect, you may try changing the
# BEGIN flags
# END flags
Zeros changed to "1" will increase the amount of output, while the
standard behavior of rmmail is do to its tasks rather quietly.
You might want to replace frm with rmmail: I used to look
at my system inbox using the frm command, would then open mutt
to delete all Spam mails (which was the quickest way for me before there
was rmmail), to finally get into Netscape Mail and retrieve the
surviving personal mails. Now I'm using rmmail to combine the
previous first two steps.
To do this, search for the frm command (mine sits in
/usr/local/bin/ since there was no frm in my distribution),
go into its directory, and then do
mv frm frm.old
ln -s `which rmmail` frm
grmmail - Gtk version
For those who dislike text-mode tools, there is a graphical (Gtk
based) version of rmmail, consistently named grmmail.
Its interface was made with Glade, so Glade modules for Python
need to be installed.
Here's a screenshot (click for full resolution):
It has the same features as the text mode client and some more;
you can select multiple lines (including multiple selections) in
the main window, delete and undelete selected mails by pressing
"d" or "u", reverse the selection with [Ctl-r], etc.
There's a command line that lets you enter commands just as in
the text mode client.
Notice that the graphical version is not fully functional yet.
It does the main functions as the text mode version does, but
some things fail, menus are not complete etc. This is just to
get an idea what a graphical version will finally be like. If you
only use the basic functions, it will be fine.
RMMAIL(1) Mail tools RMMAIL(1)
rmmail - delete mail interactively
rmmail lets you interactively select single mails from an mbox-style mail folder
for deletion. After opening the mail folder, rmmail shows an enumerated list of
headers (From, To, Subject). Commands for deletion and undeletion accept one or
more arguments which can also be ranges (e.g. 3-6).
No changes to the mail folder are made unless the write command is used.
For safety reasons all deleted mails are stored in ~/.rmmail/deleted.mails where
they can be retrieved or finally purged by deleting this backup file.
Notice that none of rmmail's functions will ask any "yes or no?" questions -
especially the write command will be executed immediately. After writing the
file, it is reread.
rmmail knows the following interactive commands:
Delete mail number num or mails from numbers n1-n2 to n1-n2 (inclusive).
It is okay to delete a mail already deleted.
i Show information summary.
l Show list of mails. Displayed headers are the From, To, and Subject
Open a different mail folder. No changes are made to the last folder.
q Quit the program.
Undelete mail number num or mails from numbers n1-n2 to n1-n2 (inclusive).
It is okay to undelete a not yet deleted mail.
w Writes mail folder, saving the changes. rmmail will report how many mails
were rewritten into the original folder and how many have been deleted.
Deleted mails are preserved in the file ~/.rmmail/deleted.mails which
should be purged regularly. The folder is reread after writing.
-h Show help information
HOME Specifies the user's home directory. This variable should be set since
$HOME/.rmmail is created.
MAIL Location of user's incoming mail folder
Hans-Georg Eßer <h.g.esser [at] gmx.de>
This is a Python program. I looked up many things in the decent
"Python - Essential Reference" book by David M. Beazley.
There's a man page that I created with manedit,
The following is a list of features that I'd like to see implemented soon. So
if you feel you would like this feature, just tell me, or perhaps even supply
the patch :)
- Viewing/Editing mails, Resending
Next thing I'll do is add a function to view and also edit one mail. Together
with a "Resend" option this will be nice for updating a saved message
(similar to Netscape's "Send as New Message" feature).
- Quick reply
This will kinda turn rmmail into an almost true mail program: It will
allow for a quick&dirty reply function, basically just opening an editor
with the quoted or non-quoted message text; like mutt does, e.g.
- Deleting attachments
Something I'll try soon is to integrate a function that rids a mail of its
attachments. Most mail programs lack such a function. Mail filters who can
do this kind of job, will strip any attachments. Selecting which mails to
keep, but keep the message text only, would be nice.
- Configuration File
Read from and write to a config file the following info: Headers to be displayed,
truncated length of headers, etc. I plan to use the ConfigParser module,
but haven't worked out yet how it works...
It might be nice to be able to search for text, both in (full) headers and also
in the body, since the mail files are completely read into memory anyway.
- Fancy stuff
Maybe you'd like to see things colorful. I've intended the tool to be as quick
as possible, and thus gave it the beauty of fdisk. However highlighting
data by colors might be helpful rather than just visually nice.
- 22 Jan 2002: 0.0.1, Initial release