SM
Size: a a a
SM
SM
a
~/.msmtprc
, там написано что-то типа этого:# Set default values for all following accounts.
defaults
logfile ~/.msmtp.log
# aliases /etc/aliases
# Primary account
account nuclearspace-gmail
host smtp.googlemail.com
protocol smtp
auth plain
tls on
tls_starttls off
tls_trust_file /etc/ssl/certs/ca-certificates.crt
#port 587
port 465
# 465 is for (older) SSL, 587 is for TLS
# google recommends 587 on their webpage but it didn't work for me
from "nuclearspace@gmail.com"
user "nuclearspace@gmail.com"
# passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt ~/.password-store/akater/google/nuclearspace/msmtp.gpg"
passwordeval "echo -e `pass akater/google/nuclearspace/msmtp`\\n"
# what if there's double backslash in a password?
account nuclearspace : nuclearspace-gmail
from nuclearspace@gmail.com
VL
a
a
init.el
, где написано примерно вот что, но тут некое дублирование, и я не помню, оно реально нужно, или это просто я так искал нужный кимап:(use-package notmuch
:commands (notmuch)
:custom
;; set sent mail directory
(notmuch-fcc-dirs
'(("nuclearspace@gmail.com" . "~/Maildir/nuclearspace-gmail/Sent")
(".*" . "~/Maildir/default/Sent")))
;; Settings for main screen
(notmuch-hello-hide-tags '("killed"))
(notmuch-show-all-tags-list t)
(notmuch-show-logo nil)
(notmuch-search-oldest-first nil)
;; Automatically check signatures
(notmuch-crypto-process-mime t)
(notmuch-saved-searches
'((:name "inbox" :query "tag:inbox AND -tag:work" :key "i" :sort-order newest-first)
(:name "lists" :query "tag:lists" :key "l" :sort-order newest-first)
(:name "sent" :query "tag:sent -tag:work" :key "t" :sort-order newest-first)
(:name "drafts" :query "tag:draft" :key "d" :sort-order newest-first)
(:name "fc" :query "tag:lists/fc" :key "c" :sort-order newest-first)
(:name "all mail" :query "*" :key "a" :sort-order newest-first)))
;; :config
;; needed for debians message.el cf. README.Debian.gz
;; (setq sendmail-program "/usr/local/bin/msmtpq")
;; (defun my-notmuch-search-setup-hook nil
;; (setq gc-cons-threshold most-positive-fixnum))
;; (defun my-notmuch-search-exit-hook nil
;; (setq gc-cons-threshold (* 4 100)))
;; (add-hook 'notmuch-search-setup-hook #'my-notmuch-search-setup-hook)
;; (add-hook 'notmuch-exit-hook #'my-notmuch-search-exit-hook)
;; Reading mail settings:
:bind
(:map notmuch-show-mode-map
("S" . (lambda ()
"mark message as spam"
(interactive)
(notmuch-show-tag (list "+spam" "-inbox"))))
("A" . (lambda ()
"mark message as archived"
(interactive)
(notmuch-show-tag (list "+archived" "-inbox"))))
("d" . (lambda ()
"mark message as deleted"
(interactive)
(notmuch-show-tag (list "+deleted" "-inbox")))))
(:map notmuch-search-mode-map
("S" . (lambda ()
"mark message as spam"
(interactive)
(notmuch-search-tag (list "+spam" "-inbox"))
(forward-line)))
("d" . (lambda ()
"toggle deleted flag"
(interactive)
(if (member "deleted" (notmuch-show-get-tags))
(notmuch-search-tag (list "-deleted" "-inbox"))
(notmuch-search-tag (list "+deleted" "-inbox")))
(forward-line)))
("A" . (lambda ()
"mark message as deleted"
(interactive)
(notmuch-search-tag (list "+archived" "-inbox"))
(forward-line))))
(:map global-map ("C-c m" . notmuch)))
a
~/checkmail.sh
, где написано примерно вот что (и мне не нравится, что написано):#!/bin/sh
# note that leading space is important
STATE=`ping -c 1 8.8.8.8 | grep " 0% packet loss"`
# Note: it's better to check if particular mail servers are reachable.
# if yes then sync mail
# if not then check if internet is reachable
# then check if local network is reachable
# and return appropriate error
#
# I'm not doing this in sh, thank you
if [ -n "$STATE" ]
then
# we check for incoming mail
mbsync nuclearspace-googlemail
notmuch new
# new messages should be tagged with new and unread for the following to work
# messages from me should not be archived immediately
# for now let's treat them all as issues I raise
# once issue is resolved, message (and the whole thread) can be archived
notmuch tag +sent -- tag:new and from:nuclearspace@gmail.com
# first tag all mail with topics interesting to me
# appearing in unexpected contexts
# as "special"
# not yet sure how to do this
# delete all messages from spammers:
notmuch tag +spam +deleted -new -- tag:new and from:/linkedin/
# tag notifications
notmuch tag +notifications +notifications/github -- tag:new and from:notifications@github.com
notmuch tag +notifications +notifications/google -- tag:new and from:no-reply@accounts.google.com
notmuch tag +notifications +notifications/matrix -- tag:new and from:noreply@matrix.org
# archive tagged notifications
notmuch tag -new +archived -- tag:new and tag:notifications
# tag all message from mailing lists
notmuch tag +lists +lists/gentoo-lisp -- tag:new and to:gentoo-lisp@lists.gentoo.org
notmuch tag +lists +lists/gentoo-user -- tag:new and to:gentoo-user@lists.gentoo.org
notmuch tag +lists +lists/sbcl-announce -- tag:new and to:sbcl-announce@lists.sourceforge.net
notmuch tag +lists +lists/sbcl-bugs -- tag:new and to:sbcl-bugs@lists.sourceforge.net
notmuch tag +lists +lists/sbcl-devel -- tag:new and to:sbcl-devel@lists.sourceforge.net
notmuch tag +lists +lists/sbcl-help -- tag:new and to:sbcl-help@lists.sourceforge.net
# these don't have lists substring in address, thus have to be filtered in gmail explicitly
notmuch tag +lists +lists/debbugs -- tag:new and to:*@debbugs.gnu.org
notmuch tag +lists +lists/emacs-devel -- tag:new and to:emacs-devel@gnu.org
notmuch tag +lists +lists/emacs-orgmode -- tag:new and to:emacs-orgmode@gnu.org
notmuch tag +lists +lists/emms-help -- tag:new and to:emms-help@gnu.org
notmuch tag +lists +lists/bug-gnu-emacs -- tag:new and to:bug-gnu-emacs@gnu.org
# archive tagged messages from mailing lists
notmuch tag -new +archived -- tag:new and tag:lists
# what if a message in a list was for me?
# so far I don't seem to miss anything but I don't really get it
# finally, retag all "new" messages "inbox"
notmuch tag +inbox -new -- tag:new
exit 0
fi
echo "No Internets!"
exit 0
(defun akater-isync-check-mail ()
(interactive)
(with-current-buffer (let ((default-directory "~"))
(compile "./checkmail.sh" t))
(rename-buffer "*check-mail*" t)))
T
DL
T
DL
ДП
y
T
a
M-x info
ДП
𝘎(
AS
𝘎(
𝘎(