From b1af6ad2aa8a3900a66998fc64929eb15603d461 Mon Sep 17 00:00:00 2001 From: Ashish Panigrahi Date: Thu, 12 Oct 2023 17:35:54 +0200 Subject: fixed domain for niser.ac.in --- share/domains.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/domains.csv b/share/domains.csv index 835d96c..cf0726e 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -200,7 +200,7 @@ national.shitposting.agency,mail.cock.li,993,mail.cock.li,587 ncsu.edu,imap.gmail.com,993,smtp.gmail.com,587 netcourrier.com,mail.netcourrier.com,993,mail.netcourrier.com,465 nigge.rs,mail.cock.li,993,mail.cock.li,587 -niser.ac.in,imap.gmail.com,993,smtp.gmail.com,587 +niser.ac.in,imap.gmail.com,993,smtp.gmail.com,465 nixnet.email,imap.nixnet.email,143,smtp.nixnet.email,587 nixnet.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 nixnetmail.com,imap.nixnet.email,143,smtp.nixnet.email,587 -- cgit v1.2.3 From 97f58830175b1fa9180dfc318c99d225ce672dd1 Mon Sep 17 00:00:00 2001 From: Ashish Panigrahi Date: Thu, 12 Oct 2023 17:38:34 +0200 Subject: added `fz-juelich.de` into domain list --- share/domains.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/share/domains.csv b/share/domains.csv index cf0726e..beb7a1e 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -117,6 +117,7 @@ freedom.nl,imap.freedom.nl,993,smtp.freedom.nl,465 freedom.xyz,imap.nixnet.email,143,smtp.nixnet.email,587 fsmpi.rwth-aachen.de,mail.fsmpi.rwth-aachen.de,993,mail.fsmpi.rwth-aachen.de,465 fsu-jena,exchange.uni-jena.de,993,smtp.uni-jena.de,587 +fz-juelich.de,imap.fz-juelich.de,993,mail.fz-juelich.de,587 gcc.edu,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 getbackinthe.kitchen,mail.cock.li,993,mail.cock.li,587 ghalv.no,mail.ghalv.no,993,mail.ghalv.no,465 -- cgit v1.2.3 From 0cb17135b9ed52c89f20e671b03decd94ab7b2fe Mon Sep 17 00:00:00 2001 From: burbschat Date: Fri, 24 Nov 2023 21:39:31 +0100 Subject: Fix escaping in message IDs from notmuch `+` was properly escaped but only once. `$` was not escaped at all. This would result in messages with message IDs containing more than one `+` or at least on `$` to not be shown after limiting. `$` itself has to be escaped presumably for the shell. This results in three prepended backslashes in the limit string and six in the config file, as there backslashes themselves have to be escaped. --- share/mutt-wizard.muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 95a9ae9..27ae216 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -101,7 +101,7 @@ macro index \eh "$prefix/libexec/gpg-wks-client --receive | msmtp macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" macro index \Cr "T~UN." "mark all messages as read" macro index O "mailsync" "run mailsync to sync all mail" -macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \`\"" "show only messages matching a notmuch pattern" +macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/g for@a; s/\\$/\\\\\\$/g for@a;print@a' \`\"" "show only messages matching a notmuch pattern" macro index A "all\n" "show all messages (undo limit)" # Sidebar mappings -- cgit v1.2.3 From 32b5e833159ce2041e2f5c62dd36df7a3e370282 Mon Sep 17 00:00:00 2001 From: Jonas Dujava Date: Sun, 3 Dec 2023 13:39:12 +0100 Subject: fix: rename variables According to: https://neomutt.org/guide/reference.html#3-380-%C2%A0realname https://neomutt.org/guide/reference.html#3-480-%C2%A0spoolfile --- share/mutt-temp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/mutt-temp b/share/mutt-temp index 81148a1..63841ad 100644 --- a/share/mutt-temp +++ b/share/mutt-temp @@ -1,6 +1,6 @@ # vim: filetype=neomuttrc # muttrc file for account $fulladdr -set realname = "$realname" +set real_name = "$realname" set from = "$fulladdr" set sendmail = "msmtp -a $fulladdr" alias me $realname <$fulladdr> @@ -10,7 +10,7 @@ set message_cachedir = "$cachedir/$safename/bodies" set mbox_type = Maildir set hostname = "$hostname" source $muttshare/switch.muttrc -set spoolfile = "+INBOX" +set spool_file = "+INBOX" set postponed = "+Drafts" set trash = "+Trash" set record = "+Sent" -- cgit v1.2.3 From 77647d101d445331cdf0544ec18f4517031993d2 Mon Sep 17 00:00:00 2001 From: Randy Palamar Date: Thu, 28 Dec 2023 13:00:01 -0700 Subject: cleanup Makefile * OS variable was unused * ifndef section is not needed since "make PREFIX=... MANPREFIX=..." overwrites whatever is set there * notdir is a GNU specific function (not POSIX) and doesn't do anything in this case * "sed -i" is not POSIX and pointless if pipes are used correctly * the "if" block can be removed since "sed" can also be used to copy files to the destination. --- Makefile | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index a150447..623aaf7 100644 --- a/Makefile +++ b/Makefile @@ -1,39 +1,27 @@ .POSIX: -OS = $(shell uname -s) -ifndef PREFIX - PREFIX = /usr/local -endif -ifndef MANPREFIX - MANPREFIX = $(PREFIX)/share/man -endif +PREFIX = /usr/local +MANPREFIX = $(PREFIX)/share/man install: mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard - cp -f bin/mw bin/mailsync $(DESTDIR)$(PREFIX)/bin/ - cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard - chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard + cp -f bin/mailsync $(DESTDIR)$(PREFIX)/bin + cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard for shared in share/*; do \ cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \ chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \ done mkdir -p $(DESTDIR)$(MANPREFIX)/man1 - cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1 cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 + sed 's:/usr/local:$(PREFIX):' < share/mutt-wizard.muttrc > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc + sed 's:/usr/local:$(PREFIX):' < share/mailcap > $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap + sed 's:/usr/local:$(PREFIX):' < bin/mw > $(DESTDIR)$(PREFIX)/bin/mw + sed 's:/usr/local:$(PREFIX):' < mw.1 > $(DESTDIR)$(MANPREFIX)/man1/mw.1 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1 - if [ "$(PREFIX)" ]; then \ - sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \ - rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \ - sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \ - rm -f $(DESTDIR)$(PREFIX)/bin/mwba; \ - sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mw.1; \ - rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1ba; \ - sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap; \ - rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcapba; \ - fi + chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/ cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh -- cgit v1.2.3 From 11e54213dd16fb3b39be934ce0d465483ddfed80 Mon Sep 17 00:00:00 2001 From: speedie Date: Mon, 18 Mar 2024 17:48:15 +0100 Subject: Don't prompt for password, if the email address already has a saved password. This is useful if you copy your .password-store directory from one computer to another. --- bin/mw | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/mw b/bin/mw index cdb7856..44086be 100755 --- a/bin/mw +++ b/bin/mw @@ -173,11 +173,11 @@ askinfo() { [ -z "$passprefix" ] && passprefix="" hostname="${fulladdr#*@}" login="${login:-$fulladdr}" - if [ -n "${password+x}" ]; then + if [ -n "${password+x}" ] && [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then insertpass - else + elif [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then getpass - fi + fi } insertpass() { -- cgit v1.2.3 From 1d89388a0e6c83f6ac0ca103ff2890e807fa3b0e Mon Sep 17 00:00:00 2001 From: Karim Hussein Date: Wed, 22 May 2024 09:17:38 +0300 Subject: Added direct link to Google App Password page for easier access --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 76e2461..07995cf 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,8 @@ To give you an example of the interface, here's an idea: applications requires turning off two-factor authentication and this will circumvent that. You might also need to manually "Enable IMAP" in the settings. + To create an App Password for your Google account, + you can directly visit the [App Passwords](https://myaccount.google.com/apppasswords) page in your Google Account settings. - If you have a university email or enterprise-hosted email for work, there might be other hurdles or two-factor authentication you have to jump through. Some, for example, will want you to create a separate IMAP password, etc. -- cgit v1.2.3 From 86a1f1d66fb463a8745c3957d8a47037ac9e6ff6 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Wed, 14 Aug 2024 18:54:04 +0300 Subject: muttrc: use XDG_CACHE_HOME in notmuch integration Fixes `sh: 1: cannot create /home//.cache/mutt_terms: Directory nonexistent`. --- share/mutt-wizard.muttrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mutt-wizard.muttrc b/share/mutt-wizard.muttrc index 27ae216..f236bc4 100644 --- a/share/mutt-wizard.muttrc +++ b/share/mutt-wizard.muttrc @@ -101,7 +101,7 @@ macro index \eh "$prefix/libexec/gpg-wks-client --receive | msmtp macro index,pager a "set my_pipe_decode=\$pipe_decode pipe_decodeabook --add-emailset pipe_decode=\$my_pipe_decode; unset my_pipe_decode" "add the sender address to abook" macro index \Cr "T~UN." "mark all messages as read" macro index O "mailsync" "run mailsync to sync all mail" -macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/g for@a; s/\\$/\\\\\\$/g for@a;print@a' \`\"" "show only messages matching a notmuch pattern" +macro index \Cf "unset wait_keyprintf 'Enter a search term to find with notmuch: '; read x; echo \$x >\"\${XDG_CACHE_HOME:-\$HOME/.cache}/mutt_terms\"~i \"\`notmuch search --output=messages \$(cat \"\${XDG_CACHE_HOME:-\$HOME/.cache}/mutt_terms\") | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/g for@a; s/\\$/\\\\\\$/g for@a;print@a' \`\"" "show only messages matching a notmuch pattern" macro index A "all\n" "show all messages (undo limit)" # Sidebar mappings -- cgit v1.2.3 From 43eceb55364dc0e6b1bf35ff461f7c2554ff8e8e Mon Sep 17 00:00:00 2001 From: Jonas Dujava Date: Mon, 2 Sep 2024 12:24:34 +0200 Subject: Fix notifications for mails with multiline subject Signed-off-by: Jonas Dujava --- bin/mailsync | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index cbd36ff..2cf6619 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -70,9 +70,10 @@ syncandnotify() { echo "$newcount new mail for $2." [ -z "$MAILSYNC_MUTE" ] && for file in $new; do - # Extract and decode subject and sender from mail. - subject="$(sed -n "/^Subject:/ s|Subject: *|| p" "$file" | - perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')" + # Extract and decode subject and sender from mail. + subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 | + perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | + sed 's/^Subject: //' | tr -d '\n\t') from="$(sed -n "/^From:/ s|From: *|| p" "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')" from="${from% *}" ; from="${from%\"}" ; from="${from#\"}" -- cgit v1.2.3 From 8e35e474c585adb428a88ff6da5e89754c49a448 Mon Sep 17 00:00:00 2001 From: Jonas Dujava Date: Mon, 2 Sep 2024 13:01:41 +0200 Subject: Fix usages of mail/mails Signed-off-by: Jonas Dujava --- bin/mailsync | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index cbd36ff..792e7af 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -63,11 +63,11 @@ syncandnotify() { newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) case 1 in $((newcount > 5)) ) - echo "$newcount new mail for $2." - [ -z "$MAILSYNC_MUTE" ] && notify "New Mail!" "📬 $newcount new mail(s) in \`$2\` account." + echo "$newcount new mails for $2." + [ -z "$MAILSYNC_MUTE" ] && notify "New Mail!" "📬 $newcount new mails in \`$2\` account." ;; $((newcount > 0)) ) - echo "$newcount new mail for $2." + echo "$newcount new mail(s) for $2." [ -z "$MAILSYNC_MUTE" ] && for file in $new; do # Extract and decode subject and sender from mail. -- cgit v1.2.3 From 0a95e2cb9b939e33bc6a6decc517204a63160bbb Mon Sep 17 00:00:00 2001 From: Alexandr Sychev Date: Sat, 21 Sep 2024 14:12:47 +0300 Subject: fix -P option description formatting in mw.1 --- mw.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/mw.1 b/mw.1 index 4a136ee..f40db45 100644 --- a/mw.1 +++ b/mw.1 @@ -70,6 +70,7 @@ SMTP server port (assumed to be 465 if not specified) .TP .B -x Account password. You will be prompted for the password interactively if this option is not given. +.TP .B -P Pass Prefix. The password will be stored using pass at .SH OTHER OPTIONS -- cgit v1.2.3