[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus and offline Email
Re: Gnus and offline Email
Tue, 15 Nov 2016 09:44:19 -0800
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
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:
# List of accounts to be synced, separated by a comma.
accounts = Gmail
maxsyncaccounts = 2
# 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
remoterepository = Gmail-remote
# Status cache. Default is plain, which eventually becomes huge and slow.
status_backend = sqlite
type = Maildir
localfolders = ~/Maildir/Gmail
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
gnus reads mail from ~/Maildir/Gmail
In emacs, the variable /gnus-home-directory/ is set to
"~/Documents/gnus". Contents of "~/Documents/gnus/.gnus":
'(nntp "localhost")) ; I also read news in gnus; it is copied to my
local machine via *leafnode*
'((nnmaildir "GMail" (directory "~/Maildir/Gmail")) ; grab mail from
(nnfolder-directory "~/Documents/gnus/Mail/archive") ; where I
archive sent email
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
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.