From: Jeffrey DeLeo <JeffreyDeLeo@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Gnus and offline Email
Date: Tue, 15 Nov 2016 09:44:19 -0800 [thread overview]
Message-ID: <87y40k63kc.fsf@gmail.com> (raw)
In-Reply-To: 58273138.4070808@openmailbox.org
After trying many ways, I now use *offlineimap* to sync messages between
my machine and the google server. *Gnus* then reads messages from the
local machine. *Postfix* is used to send messages to the gmail smtp
server. Virtues of this setup: reading/sending email does not involve
waiting for servers while in gnus (fast), can read/send email while
offline (passed to server when online again). If you preferred to use
RMail, you could instead of gnus.
This is what I do on ubuntu.
offlineimap, run periodically puts mail into ~/Maildr/Gmail
contents of ~/.offlineimaprc:
#+BEGIN_SRC
[general]
# List of accounts to be synced, separated by a comma.
accounts = Gmail
maxsyncaccounts = 2
[Account Gmail]
# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
localrepository = Gmail-local
# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
remoterepository = Gmail-remote
# Status cache. Default is plain, which eventually becomes huge and slow.
status_backend = sqlite
[Repository Gmail-local]
type = Maildir
localfolders = ~/Maildir/Gmail
[Repository Gmail-remote]
type = Gmail
remoteuser = YourName@gmail.com
remotepass = YourPass
folderfilter = lambda foldername: foldername in ['INBOX', 'Dev']
# Necessary as of OfflineIMAP 6.5.4
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
#+END_SRC
gnus reads mail from ~/Maildir/Gmail
In emacs, the variable /gnus-home-directory/ is set to
"~/Documents/gnus". Contents of "~/Documents/gnus/.gnus":
#+BEGIN_SRC emacs-lisp
(setq gnus-select-method
'(nntp "localhost")) ; I also read news in gnus; it is copied to my local machine via *leafnode*
(setq gnus-secondary-select-methods
'((nnmaildir "GMail" (directory "~/Maildir/Gmail")) ; grab mail from here
(nnfolder "archive"
(nnfolder-directory "~/Documents/gnus/Mail/archive") ; where I archive sent email
(nnfolder-active-file "~/Documents/gnus/Mail/archive/active")
(nnfolder-get-new-mail nil)
(nnfolder-inhibit-expiry t))))
#+END_SRC
Sending mail: emacs configuration variables: /mail-user-agent/ is set to
'gnus-user-agent /send-mail-function/ is set to 'sendmail-send-it
/user-mail-address/ is set to "YourName@gmail.com"
Trickiest thing is setting up Postfix, that is clearly described
[[https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/][here]]
The program *offlineimap* is controlled by the file
/~/.offlineimaprc/. When offineimap runs, it will keep information in
the directory ~/.offlineimap. You can read the docs for explanation of
how that all works.
Re: sending mail: In fact, I used to send mail directly from emacs. This
involved fiddling with a number of things. It turned out to be much
easier to just let postfix handle it. For example, I use several
different email accounts to send mail from in Gnus; I now let gnus know
about this via posting-styles, and let postfix worry about which address
should go to which server, and how.
next prev parent reply other threads:[~2016-11-15 17:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-12 15:11 Gnus and offline Email Tim Zander
2016-11-12 19:37 ` Eric Abrahamsen
2016-11-14 20:42 ` Tim Zander
2016-11-14 21:29 ` Eric Abrahamsen
2016-11-14 12:28 ` Filipp Gunbin
2016-11-14 19:07 ` Eric Abrahamsen
2016-11-15 10:34 ` Filipp Gunbin
2016-11-15 17:20 ` Eric Abrahamsen
2016-11-15 17:44 ` Jeffrey DeLeo [this message]
2016-11-17 13:47 ` Filipp Gunbin
2016-11-17 16:57 ` Jeffrey DeLeo
2016-11-21 10:34 ` Eric S Fraga
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y40k63kc.fsf@gmail.com \
--to=jeffreydeleo@gmail.com \
--cc=help-gnu-emacs@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 read-only IMAP folder(s) and NNTP newsgroup(s).