Skip to content

Display new mails in Maildir directories via terminal-notifier

Notifications You must be signed in to change notification settings

mavam/maildir-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

maildir-notifier

The maildir-notifier tool checks Maildir directories for new mail. For each new message, it invokes terminal-notifier to show a notification that contains the message From and Subject header.

Usage

Invoking maildir-notifier without any arguments prints the usage:

usage: maildir-notifier [options] <maildir...>

options:
    -a <age>     number of seconds a cache entry remains fresh [86400]
    -c <cache>   message cache [~/.maildir-notifier-cache]
    -e <cmd>     command to execute when clicking notification []
    -s <sound>   name of sound to play for each new message [Submarine]
    -t <timeout> number of seconds to show notification [2]
    -d <delay>   seconds to wait between each mail [0]

To avoid duplicate notifications, the script keeps a cache to determine which messages have been reported.

Integration

Any application that fetches mail into a Maildir format can easily be integrated with maildir-notifier. For example, OfflineIMAP can execute a post-sync hook. This requries adding the following entry to your .offlineimaprc:

[Account Test]
postsynchook = maildir-notifier ~/.mail/INBOX

License

maildir-notifier is a POSIX-compliant shell script that comes with a 3-clause BSD license.

About

Display new mails in Maildir directories via terminal-notifier

Topics

Resources

Stars

Watchers

Forks