summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md10
-rwxr-xr-xbin/mw7
-rw-r--r--share/imapnotify-temp15
3 files changed, 31 insertions, 1 deletions
diff --git a/README.md b/README.md
index 07995cf..ba0517e 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ https://muttwizard.com/
Get this great stuff without effort:
-- A full-featured and autoconfigured email client on the terminal with neomutt
+- A full-featured and autoconfigured email client on the terminal wibuiltth neomutt
- Mail stored offline enabling the ability to:
* view and write emails while you're away from
the internet
@@ -54,6 +54,8 @@ A user of Arch-based distros can also install the current mutt-wizard release fr
### Optional Dependencies
+- `goimapnotify` - required for push notifications.
+ [Check here for reference](https://wiki.archlinux.org/title/Isync#With_imapnotify).
- `pam-gnupg` - Automatically logs you into your GPG key on login so you will
never need to input your password once logged on to your system. Check the
repo and directions out [here](https://github.com/cruegge/pam-gnupg).
@@ -134,6 +136,12 @@ To give you an example of the interface, here's an idea:
- <kbd>ctrl-b</kbd> - open a menu to select a URL you want to open in your browser.
- <kbd>p</kbd> - encrypt/sign your message (in compose view, before sending the email).
+## Enable push notifications per mail
+**Note**: Replace the `fulladdrs` with your actual email address. You have to do this for each new mail you want to setup instant notifications.
+```bash
+systemctl enable --user goimapnotify@fulladdrs.service
+```
+
## Additional functionality
- `pam-gnupg` - Automatically logs you into your GPG key on login, so you will
diff --git a/bin/mw b/bin/mw
index 44086be..5503e88 100755
--- a/bin/mw
+++ b/bin/mw
@@ -12,12 +12,14 @@ msmtprc="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/config"
msmtplog="${XDG_STATE_HOME:-$HOME/.local/state}/msmtp/msmtp.log"
mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}"
mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config"
+imapnotify="${XDG_CONFIG_HOME:-$HOME/.config}/imapnotify"
mpoptemp="$muttshare/mpop-temp"
mbsynctemp="$muttshare/mbsync-temp"
mutttemp="$muttshare/mutt-temp"
msmtptemp="$muttshare/msmtp-temp"
onlinetemp="$muttshare/online-temp"
notmuchtemp="$muttshare/notmuch-temp"
+imapnotifytemp="$muttshare/imapnotify-temp"
# With the use of templates, it's impossible to use parameter substitution.
# Therefore, some default variables that might be otherwise overwritten are set
# here.
@@ -78,6 +80,10 @@ prepmpop() {
envsubst <"$mpoptemp" >>"$mpoprc"
}
+prepimapnotify() {
+ mkdir -p "${imapnotify%/*}" ; envsubst < "$imapnotifytemp" >> "$imapnotify/$fulladdr.conf"
+}
+
prepmutt() {
mkdir -p "${muttrc%/*}" "$accdir"
envsubst <"$mutttemp" >"$accdir/$fulladdr.muttrc"
@@ -106,6 +112,7 @@ getprofiles() {
prepmsmtp
prepmutt
prepnotmuch
+ prepimapnotify
}
parsedomains() {
diff --git a/share/imapnotify-temp b/share/imapnotify-temp
new file mode 100644
index 0000000..a81cba2
--- /dev/null
+++ b/share/imapnotify-temp
@@ -0,0 +1,15 @@
+{
+ "host": "$imap",
+ "port": $iport,
+ "tls": true,
+ "tlsOptions": {
+ "rejectUnauthorized": false
+ },
+ "username": "$login",
+ "password": "",
+ "passwordCmd": "pass $passprefix$fulladdr",
+ "onNewMail": "mailsync",
+ "onNewMailPost": "",
+ "boxes": [ "INBOX" ]
+}
+