Преглед на файлове

Merge pull request #924 from CarlosLoboxyz/master

Add goimapnotify for push notifications
pull/1009/head
Luke Smith преди 1 година
committed by GitHub
родител
ревизия
5300aa7f72
No known key found for this signature in database GPG ключ ID: B5690EEEBB952194
променени са 3 файла, в които са добавени 31 реда и са изтрити 1 реда
  1. +9
    -1
      README.md
  2. +7
    -0
      bin/mw
  3. +15
    -0
      share/imapnotify-temp

+ 9
- 1
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


+ 7
- 0
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() {


+ 15
- 0
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" ]
}


Зареждане…
Отказ
Запис