http://www.hgesser.de/

Private Homepage von Hans-Georg Eßer

header

Navigation

Privates

Publikationen

Studium

Software

Vorlesungen

Online-Training

Sonstiges

Blaue Links: intern
Rote Links: extern


 rmmail   |   Intro | Features | Example | Installing | Gtk version | Man Page | Credits | Future plans | Changes

[rmmail screenshot]

rmmail

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)
Download: rmmail-0.0.1.tar.gz
Graphical (Gtk) version (alpha): grmmail-0.0.2.tar.gz

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
  masterdisc5995@postino.ch   Special Prices Offered for 15 Days!!! DIXJ
  MonsterHut                  Re: How to get them to open your email...
  tawallace@earthlink.net     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 further down.

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
Check future plans for upcoming features :)

Example session

[esser@dual rmmail]$ rmmail test.mail
 1 [x]  GameSpy Daily <porta -> GameSpy Daily < : What new toy could be the next
 2 [x]  "ilewis2921@kali.com -> "ilewis2921@kal : Get a great mortgage easily an
 3 [x]  "sherry@dbtrigger.co -> "sherry@dbtrigg : Send Real Time eMail Alerts fr
 4 [x]  min83203d@justinfo.c -> 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]  a4414@lycos.ne.jp    -> a4414@lycos.ne. : When you're overweight life st
12 [x]  mandi18@aol.com ()   -> mandi18@aol.com : hey, how are you doing?       
rmmail[test.mail/12]: d 1-9 11 12
rmmail[test.mail/12]: w
11 Mails deleted; saved in /home/esser/.rmmail/deleted.mails
1 Mails saved in test.mail
test.mail reopened
rmmail[test.mail/1]: _

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 rmmail-0.0.1.tar.gz, 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 done.

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 mail folder.

If things don't work the way, you'd expect, you may try changing the section

# BEGIN flags
deb_flag=0
verbose_flag=0
# 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.

Suggestion

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.

man page

RMMAIL(1)                   Mail tools                  RMMAIL(1)
 
rmmail
       rmmail - delete mail interactively
 
SYNTAX
       rmmail <filename>
       rmmail -h
 
DESCRIPTION
       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:
 
       d  num|n1-n2
              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
              fields.
 
       o  <filename>
              Open a different mail folder. No changes are made to the last folder.
 
       q      Quit the program.
 
       u  num|n1-n2
              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.
 
OPTIONS
       -h     Show help information
 
FILES
       ~/.rmmail/deleted.mails
 
ENVIRONMENT VARIABLES
       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
 
AUTHOR
       Hans-Georg Eßer <h.g.esser [at] gmx.de>
 
SEE ALSO
       mail(1)

Credits

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, http://wolfpack.twu.net/ManEdit/.

Future plans

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...
  • Searching
    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.

Changes

  • 22 Jan 2002: 0.0.1, Initial release

 rmmail   |   Intro | Features | Example | Installing | Gtk version | Man Page | Credits | Future plans | Changes



Copyright © 1997-2017 Hans-Georg Eßer; Server: Debian Linux, Apache Web Server, letzte Änderung: Wednesday, 30-Aug-2006 11:38:18 CEST
Theme: Hazard Area 1.6 (modified), created by Bryan Bell, Copyright © 2000-2006 Weblogger.com.