mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
feat(mail): ensure password
This commit is contained in:
parent
77b0edc82a
commit
f3edaa6f81
4 changed files with 22 additions and 1 deletions
|
|
@ -106,3 +106,9 @@
|
||||||
(user-error "Aborting.")))
|
(user-error "Aborting.")))
|
||||||
|
|
||||||
(add-hook 'notmuch-mua-send-hook #'my/message-ensure-subject)
|
(add-hook 'notmuch-mua-send-hook #'my/message-ensure-subject)
|
||||||
|
|
||||||
|
(defun my/ensure-password ()
|
||||||
|
(interactive)
|
||||||
|
(my/password-store-get "Job/Digital/Email/pvkorytov@etu.ru"))
|
||||||
|
|
||||||
|
(add-hook 'notmuch-mua-send-hook #'my/ensure-password)
|
||||||
|
|
|
||||||
12
Mail.org
12
Mail.org
|
|
@ -186,6 +186,7 @@ So, here are the rules which match tags & folders:
|
||||||
| job.digital.support | Job_Digital.Support |
|
| job.digital.support | Job_Digital.Support |
|
||||||
| job.digital.superservice | Job_Digital.Superservice |
|
| job.digital.superservice | Job_Digital.Superservice |
|
||||||
| job.digital.applicants | Job_Digital.Applicants |
|
| job.digital.applicants | Job_Digital.Applicants |
|
||||||
|
| job.moevm | Job_Moevm |
|
||||||
| etu | Etu |
|
| etu | Etu |
|
||||||
|
|
||||||
And below is a noweb function, which generates the following commands for notmuch to execute:
|
And below is a noweb function, which generates the following commands for notmuch to execute:
|
||||||
|
|
@ -568,6 +569,17 @@ Then advice the =notmuch-mua-reply= function:
|
||||||
|
|
||||||
(add-hook 'notmuch-mua-send-hook #'my/message-ensure-subject)
|
(add-hook 'notmuch-mua-send-hook #'my/message-ensure-subject)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
** Ensure password is loaded
|
||||||
|
Otherwise =msmtp= may call =pinentry= while Emacs is locked, which means EXWM can't process the password window.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun my/ensure-password ()
|
||||||
|
(interactive)
|
||||||
|
(my/password-store-get "Job/Digital/Email/pvkorytov@etu.ru"))
|
||||||
|
|
||||||
|
(add-hook 'notmuch-mua-send-hook #'my/ensure-password)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* mailcap
|
* mailcap
|
||||||
mailcap file is a file which defines how to read to different MIME types. Notmuch also uses it, so why not keep it here.
|
mailcap file is a file which defines how to read to different MIME types. Notmuch also uses it, so why not keep it here.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ notmuch tag +job.digital.superservice "path:pvkorytov_etu/Job_Digital.Superservi
|
||||||
notmuch tag -job.digital.superservice "NOT path:pvkorytov_etu/Job_Digital.Superservice/cur/** AND tag:job.digital.superservice AND tag:pvkorytov"
|
notmuch tag -job.digital.superservice "NOT path:pvkorytov_etu/Job_Digital.Superservice/cur/** AND tag:job.digital.superservice AND tag:pvkorytov"
|
||||||
notmuch tag +job.digital.applicants "path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND NOT tag:job.digital.applicants"
|
notmuch tag +job.digital.applicants "path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND NOT tag:job.digital.applicants"
|
||||||
notmuch tag -job.digital.applicants "NOT path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND tag:job.digital.applicants AND tag:pvkorytov"
|
notmuch tag -job.digital.applicants "NOT path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND tag:job.digital.applicants AND tag:pvkorytov"
|
||||||
|
notmuch tag +job.moevm "path:pvkorytov_etu/Job_Moevm/cur/** AND NOT tag:job.moevm"
|
||||||
|
notmuch tag -job.moevm "NOT path:pvkorytov_etu/Job_Moevm/cur/** AND tag:job.moevm AND tag:pvkorytov"
|
||||||
notmuch tag +etu "path:pvkorytov_etu/Etu/cur/** AND NOT tag:etu"
|
notmuch tag +etu "path:pvkorytov_etu/Etu/cur/** AND NOT tag:etu"
|
||||||
notmuch tag -etu "NOT path:pvkorytov_etu/Etu/cur/** AND tag:etu AND tag:pvkorytov"
|
notmuch tag -etu "NOT path:pvkorytov_etu/Etu/cur/** AND tag:etu AND tag:pvkorytov"
|
||||||
echo "Post-new filters done"
|
echo "Post-new filters done"
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@ notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Docs/cur/** AN
|
||||||
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Support/cur/** AND tag:job.digital.support AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Support/cur/
|
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Support/cur/** AND tag:job.digital.support AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Support/cur/
|
||||||
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Superservice/cur/** AND tag:job.digital.superservice AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Superservice/cur/
|
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Superservice/cur/** AND tag:job.digital.superservice AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Superservice/cur/
|
||||||
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND tag:job.digital.applicants AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Applicants/cur/
|
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Digital.Applicants/cur/** AND tag:job.digital.applicants AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Digital.Applicants/cur/
|
||||||
|
notmuch search --output=files "NOT path:pvkorytov_etu/Job_Moevm/cur/** AND tag:job.moevm AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Job_Moevm/cur/
|
||||||
notmuch search --output=files "NOT path:pvkorytov_etu/Etu/cur/** AND tag:etu AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Etu/cur/
|
notmuch search --output=files "NOT path:pvkorytov_etu/Etu/cur/** AND tag:etu AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Etu/cur/
|
||||||
notmuch search --output=files "NOT path:pvkorytov_etu/Archive/cur/** AND NOT tag:inbox AND NOT tag:sent AND NOT tag:spam AND NOT tag:trash AND NOT tag:job.digital AND NOT tag:job.digital.docs AND NOT tag:job.digital.support AND NOT tag:job.digital.superservice AND NOT tag:job.digital.applicants AND NOT tag:etu AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Archive/cur/
|
notmuch search --output=files "NOT path:pvkorytov_etu/Archive/cur/** AND NOT tag:inbox AND NOT tag:sent AND NOT tag:spam AND NOT tag:trash AND NOT tag:job.digital AND NOT tag:job.digital.docs AND NOT tag:job.digital.support AND NOT tag:job.digital.superservice AND NOT tag:job.digital.applicants AND NOT tag:job.moevm AND NOT tag:etu AND tag:pvkorytov" | xargs -I ! mv ! ~/Mail/pvkorytov_etu/Archive/cur/
|
||||||
echo "Pre-new filters done"
|
echo "Pre-new filters done"
|
||||||
|
|
||||||
parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync ""
|
parallel --link -j0 "(cd /home/pavel/Mail/{1}/ && {2} {3})" ::: thexcloud progin6304 pvkorytov_etu ::: "$GMI" "$GMI" "offlineimap" ::: sync sync ""
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue