1
0
Fork 0

Use tunnel for GNU SMTP server configuration

org
Mike Gerwitz 2015-08-27 23:20:00 -04:00
parent 56c842d4d8
commit 20abb644f9
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 26 additions and 3 deletions

View File

@ -58,13 +58,36 @@ of the GNU Project, I'm both proud and want to do my best to bring
attention to it. Communications using this address do _not_
necessarily mean that I'm speaking on behalf of the GNU Project.
GNU hosts a POP server on =fencepost=. I have a =fetchmail= cronjob running
on my server that periodically fetches mail from fencepost onto my own
mailserver, to which I connect via IMAP; all my mail is then conveniently
mixed into one account, and all GNU mail is also run through my Sieve rules
and any other scripts.
For sending mail, privacy is an important consideration: I really do not
want my home IP Address and hostname appearing in the header of every e-mail
that I send. I have the option if running Emacs using =torify=, but that is
far too slow for receiving the amount of e-mail that I sift through.[fn:Of
course I could set up a local IMAP server that downloads my mail
periodically to avoid this---and I have done that in the past---but for
reasons I do not want to get into right now, I have stopped using it.] The
other option is a SOCKS proxy for SMTP only, but it's not obvious to me how
to do that, so I'll defer further research for another time. This leaves a
SOCKS proxy in general, or tunneling.
I have opted for an SSH tunnel. This has a couple benefits: my normal
network rules will apply for reading mail---for which privacy is not a
concern---and, since I'm connecting to =localhost=, I cannot forget to
invoke Emacs in a special way: the connection will fail if I do not have a
tunnel set up.[fn:For example, running =torify emacs= or =proxychains emacs=
can yield a good result, but if I forget to do so, that's a problem.]
#+BEGIN_SRC emacs-lisp
(defun mtg/mail-prof/gnu ()
"Mail profile for GNU Project"
(setq user-mail-address "mtg@gnu.org"
smtpmail-local-domain "gnu.org"
smtpmail-smtp-server "fencepost.gnu.org"
smtpmail-smtp-service 587
smtpmail-smtp-server "localhost" ; tunnel
smtpmail-smtp-service 5587
gnus-select-method '(nnimap "mail.mikegerwitz.com"
(nnimap-inbox "INBOX")