But after switching completely to Emacs 24 and starting using el-get with nognus I've decided to figure out what is the problem. Quick debugging of emacs smtpmail.el and network-stream.el showed me that problem comes from gnutls-cli which stopped connecting to port 587 of smtp.gmail.com with message "Connection refused". I've also recognized that in emacs 24 developers have introduced new parameter smtpmail-stream-type.
It has the following documentation:
Connection type SMTP connections.
This may be either nil (possibly upgraded to STARTTLS if possible), or `starttls' (refuse to send if STARTTLS isn't available), or `plain' (never use STARTTLS)..
Changing value to nil, starttls didn't help. After checking usage of the variable in open-network-stream function in network-stream.el I've recognized that it could have much more values:
:type specifies the connection type, one of the following:Also I found that we can use port 465 instead of 587 with smtp.gmail.com. After changing my configuration in .gnus to the following I can send emails from gnus again (hooray!!!):
nil or `network'
-- Begin with an ordinary network connection, and if
the parameters :success and :capability-command
are also supplied, try to upgrade to an encrypted
connection via STARTTLS. Even if that
fails (e.g. if HOST does not support TLS), retain
an unencrypted connection.
`plain' -- An ordinary, unencrypted network connection.
`starttls' -- Begin with an ordinary connection, and try
upgrading via STARTTLS. If that fails for any
reason, drop the connection; in that case the
returned object is a killed process.
`tls' -- A TLS connection.
`ssl' -- Equivalent to `tls'.
`shell' -- A shell connection.
(setq message-send-mail-function 'smtpmail-send-it
smtpmail-starttls-credentials '(("smtp.gmail.com" 465 nil nil))
smtpmail-auth-credentials '(("smtp.gmail.com" 465 "name@gmail.com" nil))
smtpmail-default-smtp-server "smtp.gmail.com"
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 465
; smtpmail-debug-verb t
; smtpmail-debug-info tsmtpmail-local-domain nil
smtpmail-stream-type 'ssl)
No comments:
Post a Comment