‘gotmail’ slightly updated

btw. i’ve slightly updated the ‘gotmail’ script. now it features coloured output which makes it better suitable for console usage. if you pipe its output to a text-to-speech processor you might need to disable the color codes. the most recent version of the script can be found here:


as an addendum to “Make your server play music and talk..” you should modify the crontab entry the following way to prevent cron from sending mail messages (this can be achieved by piping any stdout/stderr output to /dev/null):


# mettlerd: make hal read aloud my new mail every 10 minutes
*/10 * * * * mettlerd /usr/local/bin/gotmail|festival --tts >/dev/null 2>&1

[Update 20031101: minor fix to make gotmail display mailinglist digests correctly: use egrep’s “-m 1” option to prevent multiple listings of from and subject lines]


6 Replies to “‘gotmail’ slightly updated”

  1. Hello, I am new to linux and Gentoo…

    I have postfix and pine installed on my system, how do I get your script to work with them? If it will not work with pine, can you let me know a good email program that it will work with.


  2. hi rob,

    in the present form, “gotmail” requires mail messages to be stored in “maildir” format (as opposed to “mbox” for example). thus if you have a directory named “.maildir” (or similar) in your home directory, “gotmail” will probably work for you. “maildir” format is the default for gentoo and some linux/unix mail clients (e.g. the mail client “mutt” supports the “maildir” format).

    if you intend to use “gotmail”, please download it again from https://news.numlock.ch/docs/gotmail as i’ve just uploaded the most recent version (v0.3). after downloading, do:

    # cp gotmail /usr/bin/local
    # chmod a+x /usr/bin/local/gotmail

    then execute it:
    $ /usr/bin/local/gotmail

    by default, “gotmail” generates output which is ready for feeding to a text-to-speech processor. for using it in an interactive shell you might want to set TTS=”false” (edit the “gotmail” script accordingly) which enables color-output.

    have fun!

  3. Hi, nice script! But I can’t get it to work :(
    This is the output I get:

    Hi lbogaert. Checking your mail now.
    find: /home/lbogaert/.maildir/.Junk/: No such file or directory
    find: E-mail/new/: No such file or directory
    find: /home/lbogaert/.maildir/.Postvak/: No such file or directory

    And a lot more. Do you know what is wrong?

  4. yep, in the current form, the script doesn’t handle blanks in file names. this shortcoming is intentional as this script was merely just for my own use and not masking blanks eventually reduced the complexity. i will take a look at it however. i feel there should be a more or less elegant solution for this problem ;)

    blanks are perfectly legal characters in linux, nevertheless i’d recommend avoiding blanks if possible as one tends to run into certain problems that wouldn’t exist otherwise (blanks often need to be masked).

    stay tuned ;)

Leave a Reply

Your email address will not be published. Required fields are marked *

92 − 87 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.