Skip to content

Simple shell script to execute a command when new mail arrives in an (ssl) IMAP account

Notifications You must be signed in to change notification settings

johan-adriaans/shell-imap-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

shell-imap-notify

This is a shell script that can be used to trigger commands on IMAP IDLE events. I use it to trigger mbsync when new mail is received or a message is removed from the server. It keeps connections open by sending a NOOP command every 10 minutes. When the server closes the connection the script ends. For optimal performance I use a wrapper script (see example_use.sh) that fetches my passwords from a gpg encrypted file and opens the connections in an endless loop, thus restarting the IMAP connections when the computer wakes up from a long sleep or the internet connection is interrupted.

About

Simple shell script to execute a command when new mail arrives in an (ssl) IMAP account

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages