Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: jindam.vani@disroot.org
To: info-gnus-english@gnu.org
Subject: v [2.0] disroot email pop3 gnus configuration on debian gnu/linux
Date: Fri, 16 Dec 2022 02:27:47 +0000	[thread overview]
Message-ID: <ygfr0x0gk0s.fsf@localhost.i-did-not-set--mail-host-address--so-tickle-me> (raw)

* i am running debian 11 (bullseye) [1] on userland [2]

;; what is v [2.0]
to minimise errors only .emacs code is provided
you will receive error without creating "new, cur, 
tmp" directories when you run getmail.
error: (path: maildir subdirectory "~/.Maildir/INBOX/cur" does not exist)

;; please remember
this is bare or minimum setup, nothing fancy
v 1.0 — https://lists.gnu.org/archive/html/info-gnus-english/2022-12/msg00013.html

;; prerequisites:

* emacs [3] an email client
* getmail6 [4] to rerieve emails
* msmtp [5] to send emails
* defaultencrypt [6] to encrypted emails
* gnupg/gpg [7] to create gnupg/gpg key for 
encryption or decryption


;; you must

* provide password of your disroot email id 
and disroot email id and password when you 
retrieve emails and send emails

* update to and from email address when 
composing email

* replace 46BB3F32 with your gnupg/gpg encryption 
key id in .emacs file

* create backup of important emails

* create directories for storing downloaded emails 
and getmailrc (see: directories)

;; you cannot

* send encrypted email if there is no gnupg/gpg key 
available for recipient

* view or read encrypted emails if you forgot your 
gnupg/gpg key password

* if you permentately delete emails in gnus, you 
cannot recover emails from email provider

;; how to install prerequisites on debian [8] and 
its derivatives [9]
;; security is first priority, i included 
;; sudo apt update && sudo apt full-upgrade
* $ sudo apt update && sudo apt full-upgrade && sudo apt install emacs-lucid
 or 
  $ sudo apt update && sudo apt full-upgrade && sudo apt install emacs-gtk
* $ sudo apt update && sudo apt full-upgrade && sudo apt install getmail6
* $ sudo apt update && sudo apt full-upgrade && sudo apt install msmtp
* $ sudo apt update && sudo apt full-upgrade && sudo apt install gnupg

;; directories (create)

* getmailrc
$ mkdir -m 0700 ~/.getmail [10]
; note —after creating above directory, move 
getmailrc into this directory

* .Maildir, INBOX, new, cur, tmp to store 
downloaded emails
$ mkdir ~/.Maildir
$ mkdir ~/.Maildir/INBOX/
$ mkdir ~/.Maildir/INBOX/{new,cur,tmp}

* replace email id with your disroot email id 
in .getmailrc

;; how to auto create .msmtprc [11]
$ msmtp --configure yourmail@example.com
* note —replace yourmail@example.com with 
your disroot email id.....

;; replace in .msmtprc
* name with your name and email id with your 
disroot email id

;; how to retrieve or download emails using getmail6
$ getmail
* note —provide your email password


;; .emacs

(setq make-backup-files nil)
(setq create-lockfiles nil)
(setq auto-save-default nil)
(setq frame-title-format "%b")
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(debug-on-error t)
 '(display-battery-mode nil)
 '(initial-buffer-choice "~/")
 '(send-mail-function 'mailclient-send-it)
 '(smtpmail-smtp-server "disroot.org")
 '(smtpmail-smtp-service 25))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "fixed" :foundry "misc" :slant normal :weight normal 
:height 231 :width normal)))))
(add-to-list 'load-path "~/.emacs.d/jl-encrypt")
(require 'jl-encrypt)
(require 'epa-file)
(setq epa-file-encrypt-to "46BB3F32")

*** .getmailrc

[options]
delete = True
read_all = true

[retriever]
type = SimplePOP3SSLRetriever
server = disroot.org
username = email id

[destination]
type = Maildir
path = ~/.Maildir/INBOX/

** .msmtprc

account email id
host disroot.org
port 587
tls on
tls_starttls on
auth on
user name
from email id

** defaultencrypt installation:

;; download jl-encrypt.el from defaultencrypt 
repo [12]

;; create jl-encrypt directory in .emacs.d
$ mkdir ~/.emacs.d/jl-encrypt

;; copy downloaded jl-encrypt.el into jl-encrypt 
directory

;; specify directory location of jl-encrypt in .emacs
(add-to-list 'load-path "~/.emacs.d/jl-encrypt")

;; add jl-encrypt in .emacs
(require 'jl-encrypt)

** .gnus

(setq gnus-select-method '(nnnil ""))

(add-to-list 'gnus-secondary-select-methods
             '(nnmaildir ""
              (directory "~/.Maildir/")
              (get-new-mail t)
              (directory-files nnheader-directory-files-safe)))

(setq read-mail-command 'gnus)

(setq mail-sources
                  '((pop :server "disroot.org"
                         :user "email id")))

(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "disroot.org")
(setq smtpmail-stream-type 'ssl)
(setq smtpmail-servers-requiring-authorization ".*")
(setq smtpmail-smtp-service 465)
(setq smtpmail-starttls-credentials '(("disroot.org" 465 nil nil)))

** external links:
[1] https://en.wikipedia.org/wiki/Debian_version_history#Debian_11_(Bullseye)
[2] https://github.com/CypherpunkArmory/UserLAnd
[3] https://en.wikipedia.org/wiki/Emacs
[4] https://en.wikipedia.org/wiki/Getmail
[5] https://en.wikipedia.org/wiki/Msmtp
[6] https://gitlab.com/lechten/defaultencrypt
[7] https://en.wikipedia.org/wiki/GNU_Privacy_Guard
[8] https://en.wikipedia.org/wiki/Debian
[9] https://en.wikipedia.org/wiki/List_of_Linux_distributions#Debian-based
[10] https://getmail6.org/configuration.html#configuring
[11] https://marlam.de/msmtp/msmtprc.txt
[12] 
https://gitlab.com/lechten/defaultencrypt/-/raw/master/jl-encrypt.el?inline=false

regards,
jindam, vani

Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
toots: @jindam_vani@c.im
others: https://w.wiki/67VT


                 reply	other threads:[~2022-12-16  2:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ygfr0x0gk0s.fsf@localhost.i-did-not-set--mail-host-address--so-tickle-me \
    --to=jindam.vani@disroot.org \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).