gubby − The Procmail Log Monitor

gubby [hvcowlV] [BmMpC value] [procmail logfile]

Displays a formatted screen of incoming email in your
Procmail logfile.

     Can run both from the commandline and in a curses

     When called without arguments, gubby will search for
$HOME/.procmailrc and then try to find a line LOGFILE=... to
find the name of the procmail logfile, and then open up a
curses environment with a formatted display of its contents.

−h or ‐‐help
    Print help and exit

−v or ‐‐version
    Print version info and exit

−c or ‐‐clear
    Clear contents of Procmail logfile.

−m path or ‐‐mailexec=path
    Specify program to read mailfolders with

−M path or ‐‐maildir=path
    Specify directory where mailfolders are stored

−p args or ‐‐mailprefix=path
    Specify mailprogram arguments to choose a mailfolder

−C args or ‐‐mailcompose=path
    Specify mailprogram arguments to compose a new mail

−o or ‐‐once
    Print new mail and exit

−w or ‐‐wide
    Used with −o this will print folder contents as well

−l or ‐‐loop
    Start in curses screen

−V or ‐‐verbose
    Be verbose: Send warnings and notices to stderr

0   Successful exit


1   General Error

    Gubby catches exceptions and prints a cursory
    explanation to stderr if option −V is set.  The most
    common problem is that Gubby can’t find the Procmail
    logfile.  This may result in the somewhat obscure
    message "file_ptr: FILE* == NULL", which means that the
    file was either not found, or could not be opened.  An
    inspection with −V will produce a list of steps Gubby
    takes when trying to find your logfile.  If in doubt,
    specify the logfile as a program argument, e.g. gubby

    Gubby will look for a LOGFILE=... variable in this
    Procmail configuration file for finding the localtion of
    the Procmail logfile.  This will be done if no logfile
    is specified as a program argument, or the specified
    logfile was not found.

gubby ~/.log‐procmail
    Run gubby and read from ~/.log‐procmail

gubby −m /usr/bin/mutt −M ~/mail/ −p ’−f’
    Run gubby on procmail logfile specified in
    $HOME/.procmailrc, use /usr/bin/mutt as a mailreader.
    When a folder is selected, the command /usr/bin/mutt −f
    ~/mail/foldername will be executed.

gubby −o
    Read Procmai logfile (finding its path from
    $HOME/.procmailrc), print its contents in a formatted
    and sorted style, and exit.

    Try to find Procmail logfile from $HOME/.procmailrc and
    enter curses environment for displaying folders. Default
    mailreader is mutt.

procmail(1), procmailrc(5), procmailex(5), curses(3),
ncurses(3), gpl(7)

If gubby has trouble finding your Procmail logfile, be sure
to specify it as the last argument.

     If you terminal is messed up, try setting the TERM
variable to another value.  On Cygwin, I’ve had to set


TERM=xterm og TERM=xterm‐color instead of TERM=cygwin to get
curses to draw to the screen properly.

This  program  is  distributed  in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied
PURPOSE.  See the GNU General Public License for more

Christian Stigen Larsen

Feb 24, 2003