diff --git a/README.rst b/README.rst index e1b53e8..4ccc372 100644 --- a/README.rst +++ b/README.rst @@ -117,9 +117,11 @@ If the parameter contains @ an email is assumed and synced. *sync* - Syncs mail for all email accounts managed by **mw** (whose paths end in the email). + Syncs mail for all email accounts managed by **mw** (whose paths end in the email), + and pops up notifications for new mail. + + **mw** alone, without *sync*, syncs without notifications. - This is the default, if no parameter is given. If an email address is given, only that email is synced. Every **mw** sync run will re-generate the **mutt** configuration @@ -266,14 +268,24 @@ DETAILS **Gmail accounts** - For Gmail allow "less-secure" applications: - . + For Gmail allow + `less-secure applications `__ Do this before running mutt-wizard. + Gmail uses labels instead of folders. + To avoid local message duplication, remove labels on the + `Gmail web interface `__ + or hide them from IMAP + and remove the according local folders. + To keep a (local) folder from being synced one must exclude it in *mbsyncrc*. + **mw** generates this default:: + + Patterns * !"_/*" !"[Gmail]" !"[Gmail]/All Mail" + **Protonmail accounts** - Protonmail users must use the Protonmail Bridge - + Protonmail users must use the + `Protonmail Bridge `__ to access their IMAP and SMTP servers. Do this before running mutt-wizard. @@ -298,7 +310,7 @@ FILES BUGS ==== -GitHub Issues: +`GitHub Issues `__ AUTHORS ======= @@ -306,14 +318,14 @@ AUTHORS *Luke Smith* Original author, started in 2018. - Github + `Github `__ - Gitlab + `Gitlab `__ *Roland Puntaier* Bugfixes, Improvements in 2019. - GitHub: + `GitHub: `__ LICENSE ======= diff --git a/bin/mw b/bin/mw index 0e5017e..461b382 100755 --- a/bin/mw +++ b/bin/mw @@ -219,7 +219,7 @@ Channel $mwaddr Expunge Both Master :$mwaddr-remote: Slave :$mwaddr-local: -Patterns * !"[Gmail]" !"[Gmail]/All Mail" +Patterns * !"_/*" !"[Gmail]" !"[Gmail]/All Mail" Create Both SyncState * MaxMessages 0 @@ -645,6 +645,7 @@ _mwsyncandnotify() { else $mwmbsyncbin $mwaddr fi + [ -z "$mwnono" ] && return mwlastrun="$mwaccmaildir/.mw.lastrun" mwnew=$(find "$mwaccmaildir/INBOX/new/" "$mwaccmaildir/Inbox/new/" "$mwaccmaildir/inbox/new/" -type f -newer "$mwlastrun" 2> /dev/null) newcount=$(echo "$mwnew" | sed '/^\s*$/d' | wc -l) @@ -716,6 +717,7 @@ if [ "$#" -gt 1 ]; then fi if [ "$1" = "" ]; then + mwnono="NO" _mwsync else case "$1" in diff --git a/mw.1 b/mw.1 index 7dcded3..650ebeb 100644 --- a/mw.1 +++ b/mw.1 @@ -175,9 +175,10 @@ mwcronminutes=99 mw cron .RS .PP Syncs mail for all email accounts managed by \f[B]mw\f[R] (whose paths -end in the email). +end in the email), and pops up notifications for new mail. +.PP +\f[B]mw\f[R] alone, without \f[I]sync\f[R], syncs without notifications. .PP -This is the default, if no parameter is given. If an email address is given, only that email is synced. .PP Every \f[B]mw\f[R] sync run will re-generate the \f[B]mutt\f[R] @@ -366,16 +367,30 @@ downloaded mail. \f[B]Gmail accounts\f[R] .RS .PP -For Gmail allow \[dq]less-secure\[dq] applications: -<>. -Do this before running mutt-wizard. +For Gmail allow less-secure +applications (https://support.google.com/accounts/answer/6010255) Do +this before running mutt-wizard. +.PP +Gmail uses labels instead of folders. +To avoid local message duplication, remove labels on the Gmail web +interface (https://mail.google.com/mail/u/0/#settings/labels) or hide +them from IMAP and remove the according local folders. +To keep a (local) folder from being synced one must exclude it in +\f[I]mbsyncrc\f[R]. +\f[B]mw\f[R] generates this default: +.IP +.nf +\f[C] +Patterns * !\[dq]_/*\[dq] !\[dq][Gmail]\[dq] !\[dq][Gmail]/All Mail\[dq] +\f[R] +.fi .RE .PP \f[B]Protonmail accounts\f[R] .RS .PP -Protonmail users must use the Protonmail Bridge -<> to access their IMAP and SMTP +Protonmail users must use the Protonmail +Bridge (https://protonmail.com/bridge/) to access their IMAP and SMTP servers. Do this before running mutt-wizard. .RE @@ -397,23 +412,23 @@ Default mailcap file. Email server database. .SH BUGS .PP -GitHub Issues: <> +GitHub Issues (https://github.com/rpuntaie/mutt-wizard/issues) .SH AUTHORS .TP .B \f[I]Luke Smith\f[R] <> Original author, started in 2018. .RS .PP -Github <> +Github (https://github.com/lukesmithxyz/mutt-wizard) .PP -Gitlab <> +Gitlab (https://gitlab.com/lukesmithxyz/mutt-wizard) .RE .TP .B \f[I]Roland Puntaier\f[R] <> Bugfixes, Improvements in 2019. .RS .PP -GitHub: <> +GitHub: (https://github.com/rpuntaie/mutt-wizard) .RE .SH LICENSE .PP