Remove mail config
This commit is contained in:
parent
36975d2eac
commit
665edb56cd
77
config.org
77
config.org
@ -1477,83 +1477,6 @@
|
|||||||
(setq delete-by-moving-to-trash t)
|
(setq delete-by-moving-to-trash t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Mail
|
|
||||||
Using Mu4e. It requires =mu(1)= tool be set up already. The mu4e
|
|
||||||
emacs package is bundled with the system package rather than
|
|
||||||
distributed seperately, so if it's been put somewhere on the
|
|
||||||
[[help:load-path][load-path]] we'd just need to ~require~ it — this is the case on the
|
|
||||||
linux distros that I've used. On OpenBSD, though, packages are
|
|
||||||
installed into =/usr/local/= and =/usr/local/share/emacs/site-lisp=
|
|
||||||
is not in =load-path=, so we need to add it.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(when (string-match-p "OpenBSD" (shell-command-to-string "uname -a"))
|
|
||||||
(add-to-list 'load-path "/usr/local/share/emacs/site-lisp"))
|
|
||||||
(require 'mu4e)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
On Bedrock linux, Mu4e can't the =mu= binary as it's not in a
|
|
||||||
standard location. The location can be specified explicitly by
|
|
||||||
setting [[help:mu4e-mu-binary][mu4e-mu-binary]]. To check whether we're on Bedrock, we'll see
|
|
||||||
if the =brl= program is available, as =uname= will just yield
|
|
||||||
whichever distro bedrock booted from.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(when (< 0 (length (shell-command-to-string "which brl")))
|
|
||||||
(setq mu4e-mu-binary "/bedrock/cross/bin/mu"))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
The folder archived mail gets saved into is determined by
|
|
||||||
[[help:mu4e-refile-folder][mu4e-refile-folder]]. I prefer to have archived mail stored on the
|
|
||||||
remote since then it's accessible from every machine. The default is
|
|
||||||
=/archive=, though, which is outside of any remotes. Easiest thing to
|
|
||||||
do is hardcode =/wip/archive= as the refile folder.
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq mu4e-refile-folder "/wip/archive")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
This only really works because I only have one email account I use
|
|
||||||
with Mu4e. It would archive mail from /all/ accounts onto the wip.sh
|
|
||||||
mail server.
|
|
||||||
|
|
||||||
The final general Mu4e thing is stopping it from prompting on exit:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq mu4e-confirm-quit nil)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Fetching
|
|
||||||
Use =offlineimap(1)= (also needs to be set up seperately) to sync the
|
|
||||||
maildir with the remote server:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq mu4e-get-mail-command "offlineimap")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Sending
|
|
||||||
To send mail we first need to set the mail address:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq user-mail-address "cdo@wip.sh")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
Then set the sent and drafts folders to inside the remote folder:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq mu4e-sent-folder "/wip/sent"
|
|
||||||
mu4e-drafts-folder "/wip/drafts")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
And finally configure SMTP:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(setq smtpmail-smtp-server "mail.wip.sh"
|
|
||||||
smtpmail-smtp-service 587
|
|
||||||
smtpmail-stream-type 'starttls
|
|
||||||
send-mail-function 'smtpmail-send-it)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Remote Access
|
* Remote Access
|
||||||
** Sudo/doas on Remote Hosts
|
** Sudo/doas on Remote Hosts
|
||||||
To edit files as root on remote hosts with sudo or doas while also
|
To edit files as root on remote hosts with sudo or doas while also
|
||||||
|
Loading…
x
Reference in New Issue
Block a user