Procházet zdrojové kódy

Merge pull request #924 from CarlosLoboxyz/master

Add goimapnotify for push notifications
pull/1009/head
Luke Smith před 1 rokem
committed by GitHub
rodič
revize
5300aa7f72
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: B5690EEEBB952194
3 změnil soubory, kde provedl 31 přidání a 1 odebrání
  1. +9
    -1
      README.md
  2. +7
    -0
      bin/mw
  3. +15
    -0
      share/imapnotify-temp

+ 9
- 1
README.md Zobrazit soubor

@@ -4,7 +4,7 @@ https://muttwizard.com/


Get this great stuff without effort: 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: - Mail stored offline enabling the ability to:
* view and write emails while you're away from * view and write emails while you're away from
the internet the internet
@@ -54,6 +54,8 @@ A user of Arch-based distros can also install the current mutt-wizard release fr


### Optional Dependencies ### 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 - `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 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). 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>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). - <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 ## Additional functionality


- `pam-gnupg` - Automatically logs you into your GPG key on login, so you will - `pam-gnupg` - Automatically logs you into your GPG key on login, so you will


+ 7
- 0
bin/mw Zobrazit soubor

@@ -12,12 +12,14 @@ msmtprc="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/config"
msmtplog="${XDG_STATE_HOME:-$HOME/.local/state}/msmtp/msmtp.log" msmtplog="${XDG_STATE_HOME:-$HOME/.local/state}/msmtp/msmtp.log"
mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}" mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}"
mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config" mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config"
imapnotify="${XDG_CONFIG_HOME:-$HOME/.config}/imapnotify"
mpoptemp="$muttshare/mpop-temp" mpoptemp="$muttshare/mpop-temp"
mbsynctemp="$muttshare/mbsync-temp" mbsynctemp="$muttshare/mbsync-temp"
mutttemp="$muttshare/mutt-temp" mutttemp="$muttshare/mutt-temp"
msmtptemp="$muttshare/msmtp-temp" msmtptemp="$muttshare/msmtp-temp"
onlinetemp="$muttshare/online-temp" onlinetemp="$muttshare/online-temp"
notmuchtemp="$muttshare/notmuch-temp" notmuchtemp="$muttshare/notmuch-temp"
imapnotifytemp="$muttshare/imapnotify-temp"
# With the use of templates, it's impossible to use parameter substitution. # With the use of templates, it's impossible to use parameter substitution.
# Therefore, some default variables that might be otherwise overwritten are set # Therefore, some default variables that might be otherwise overwritten are set
# here. # here.
@@ -78,6 +80,10 @@ prepmpop() {
envsubst <"$mpoptemp" >>"$mpoprc" envsubst <"$mpoptemp" >>"$mpoprc"
} }


prepimapnotify() {
mkdir -p "${imapnotify%/*}" ; envsubst < "$imapnotifytemp" >> "$imapnotify/$fulladdr.conf"
}

prepmutt() { prepmutt() {
mkdir -p "${muttrc%/*}" "$accdir" mkdir -p "${muttrc%/*}" "$accdir"
envsubst <"$mutttemp" >"$accdir/$fulladdr.muttrc" envsubst <"$mutttemp" >"$accdir/$fulladdr.muttrc"
@@ -106,6 +112,7 @@ getprofiles() {
prepmsmtp prepmsmtp
prepmutt prepmutt
prepnotmuch prepnotmuch
prepimapnotify
} }


parsedomains() { parsedomains() {


+ 15
- 0
share/imapnotify-temp Zobrazit soubor

@@ -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" ]
}


Načítá se…
Zrušit
Uložit