Skip to content

A small script that checks for new mail (using notmuch) on a remote server and displays a notification.

Notifications You must be signed in to change notification settings

Tatsuonline/notmuch_notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notmuch Notifications


This is a very simple Rust program designed to check a remote mail server where notmuch is setup and provide a notification on your client computer if new mail has arrived. It also plays a small wav file as part of the notification.

To use it, first ensure you can SSH into your mail server without a password. Then do the following:

git clone https://github.com/Tatsuonline/notmuch_notifications.git

Now, edit the src/main.rs file and change the following parts to your use case:

mail@mail-server # Your username and mail server.
/home/tatsu/Programming/notmuch_notifications/media/spock_mail.wav # The location of your chosen notification sound file.

Build the release in the folder:

cargo build --release

The code is now ready. We can set up the cron job now to run every minute (or whatever you prefer). Note that the DISPLAY=:0 portion is necessary:

export DISPLAY=:0 && /path/to/the/folder/notmuch_notifications/target/release/notmuch_notifications

This should produce the following notification when you receive new mail:

img

About

A small script that checks for new mail (using notmuch) on a remote server and displays a notification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages