all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* > 24.3 can't send mail
@ 2015-02-07 13:35 Tory S. Anderson
  2015-02-07 14:29 ` Tory S. Anderson
  0 siblings, 1 reply; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-07 13:35 UTC (permalink / raw)
  To: Emacs Help List

I am unable to send mail in emacs 24.4 or 25.0.5; attempting to send gives me the error:

530 5.7.0 Must issue a STARTTLS command first. a41sm3439205yhb.43 - gsmtp

According to what I can see by googling around, similar errors have been cropping up for years. I'm just not sure what would have changed between my working
    GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-09-30 on buildvm-10.phx2.fedoraproject.org

and those later versions?



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 13:35 > 24.3 can't send mail Tory S. Anderson
@ 2015-02-07 14:29 ` Tory S. Anderson
  2015-02-07 14:49   ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-07 14:29 UTC (permalink / raw)
  To: Emacs Help List

I should add that the setup I'm using for mail, which has worked for years prior to 24.4+, is mostly borrowed from the emacs page http://www.emacswiki.org/emacs/SendingMail. To be precise, my source is this: 

--8<---------------cut here---------------start------------->8---
(defvar smtp-accounts
  '(
    (ssl "torys.anderson@gmail.com" "smtp.gmail.com"
	 587 "torys.anderson@gmail.com" secret) ;; Public
;; other accounts omitted
    ))


;; Now lets configure smtpmail.el with your name and functions to send
;; mail using your smtp accounts by changing the from field
(require 'smtpmail)
(setq send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it
      mail-from-style nil user-full-name "Tory S. Anderson"
      smtpmail-debug-info t smtpmail-debug-verb t)

(defun set-smtp (mech server port user password)
  "Set related SMTP variables for supplied parameters."
  (setq smtpmail-smtp-server server smtpmail-smtp-service port
	smtpmail-auth-credentials (list (list server port user
					      password)) smtpmail-auth-supported (list mech)
					      smtpmail-starttls-credentials nil)
  (message "Setting SMTP server to `%s:%s' for user `%s'."
	   server port user))

(defun set-smtp-ssl (server port user password &optional key
			    cert)
  "Set related SMTP and SSL variables for supplied parameters."
  (setq starttls-use-gnutls t
	starttls-gnutls-program "gnutls-cli"
	starttls-extra-arguments nil smtpmail-smtp-server server
	smtpmail-smtp-service port
	smtpmail-auth-credentials (list (list server port user
					      password)) smtpmail-starttls-credentials (list (list
											      server port key cert)))
  (message
   "Setting SMTP server to `%s:%s' for user `%s'. (SSL
enabled.)" server port user))

(defun change-smtp ()
  "Change the SMTP server according to the current from line."
  (save-excursion
    (loop with from = (save-restriction
			(message-narrow-to-headers)
			(message-fetch-field "from"))
	  for (auth-mech address . auth-spec) in smtp-accounts
	  when (string-match address from) do (cond
					       ((memq auth-mech '(cram-md5 plain login))
						(return (apply 'set-smtp (cons auth-mech auth-spec))))
					       ((eql auth-mech 'ssl)
						(return (apply 'set-smtp-ssl auth-spec)))
					       (t (error "Unrecognized SMTP auth. mechanism:
`%s'." auth-mech))) finally (error "Cannot infer SMTP information."))))

;; The previous function will complain if you fill the from field with
;; an account not present in smtp-accounts.

(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))

(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
  (with-current-buffer smtpmail-text-buffer
    (change-smtp))
  (funcall (symbol-value '%smtpmail-via-smtp) recipient
	   smtpmail-text-buffer))

;; Reply-to with same address it was sent to
    (setq gnus-posting-styles
      '(((header "to" "torys.anderson@gmail.com")
         (address "torys.anderson@gmail.com"))
         ;; more omitted 
))
--8<---------------cut here---------------end--------------->8---

torys.anderson@gmail.com (Tory S. Anderson) writes:

> I am unable to send mail in emacs 24.4 or 25.0.5; attempting to send gives me the error:
>
> 530 5.7.0 Must issue a STARTTLS command first. a41sm3439205yhb.43 - gsmtp
>
> According to what I can see by googling around, similar errors have been cropping up for years. I'm just not sure what would have changed between my working
>     GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-09-30 on buildvm-10.phx2.fedoraproject.org
>
> and those later versions?



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 14:29 ` Tory S. Anderson
@ 2015-02-07 14:49   ` Eli Zaretskii
  2015-02-07 15:31     ` Tory S. Anderson
  2015-02-07 16:26     ` Tory S. Anderson
  0 siblings, 2 replies; 15+ messages in thread
From: Eli Zaretskii @ 2015-02-07 14:49 UTC (permalink / raw)
  To: help-gnu-emacs

> From: torys.anderson@gmail.com (Tory S. Anderson)
> Date: Sat, 07 Feb 2015 09:29:03 -0500
> 
> I should add that the setup I'm using for mail, which has worked for years prior to 24.4+, is mostly borrowed from the emacs page http://www.emacswiki.org/emacs/SendingMail. To be precise, my source is this: 
> 
> --8<---------------cut here---------------start------------->8---
> (defvar smtp-accounts
>   '(
>     (ssl "torys.anderson@gmail.com" "smtp.gmail.com"
> 	 587 "torys.anderson@gmail.com" secret) ;; Public
> ;; other accounts omitted
>     ))
> 
> 
> ;; Now lets configure smtpmail.el with your name and functions to send
> ;; mail using your smtp accounts by changing the from field
> (require 'smtpmail)
> (setq send-mail-function 'smtpmail-send-it
>       message-send-mail-function 'smtpmail-send-it
>       mail-from-style nil user-full-name "Tory S. Anderson"
>       smtpmail-debug-info t smtpmail-debug-verb t)
> 
> (defun set-smtp (mech server port user password)
>   "Set related SMTP variables for supplied parameters."
>   (setq smtpmail-smtp-server server smtpmail-smtp-service port
> 	smtpmail-auth-credentials (list (list server port user
> 					      password)) smtpmail-auth-supported (list mech)
> 					      smtpmail-starttls-credentials nil)
>   (message "Setting SMTP server to `%s:%s' for user `%s'."
> 	   server port user))

I think the problem is with smtpmail-auth-credentials and
smtpmail-starttls-credentials: in Emacs 24 you need to set that in
your ~/.authinfo file.  See etc/NEWS for the details (search for
"SMTPmail").



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 14:49   ` Eli Zaretskii
@ 2015-02-07 15:31     ` Tory S. Anderson
  2015-02-07 15:37       ` Eli Zaretskii
  2015-02-07 16:26     ` Tory S. Anderson
  1 sibling, 1 reply; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-07 15:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

I think you're on to something, Eli. I see a daunting amount on smtp changes in the news files. Unfortunately, I'm not sure what to do next. I went so far as to comment-out everything you see below and then fired up the new emacs (my .authinfo file still exists unchanged); upon trying to send mail I seemed to make progress when it asked what outgoing server I wanted, but after specifying smtp.gmail.com, it seemed to freeze; one C-g later and it gave me the same old TLS error. 

Does anyone have an example of a working smtp setup in emacs >24.3? 

Eli Zaretskii <eliz@gnu.org> writes:

>> From: torys.anderson@gmail.com (Tory S. Anderson)
>> Date: Sat, 07 Feb 2015 09:29:03 -0500
>> 
>> I should add that the setup I'm using for mail, which has worked for years prior to 24.4+, is mostly borrowed from the emacs page http://www.emacswiki.org/emacs/SendingMail. To be precise, my source is this: 
>> 
>> --8<---------------cut here---------------start------------->8---
>> (defvar smtp-accounts
>>   '(
>>     (ssl "torys.anderson@gmail.com" "smtp.gmail.com"
>> 	 587 "torys.anderson@gmail.com" secret) ;; Public
>> ;; other accounts omitted
>>     ))
>> 
>> 
>> ;; Now lets configure smtpmail.el with your name and functions to send
>> ;; mail using your smtp accounts by changing the from field
>> (require 'smtpmail)
>> (setq send-mail-function 'smtpmail-send-it
>>       message-send-mail-function 'smtpmail-send-it
>>       mail-from-style nil user-full-name "Tory S. Anderson"
>>       smtpmail-debug-info t smtpmail-debug-verb t)
>> 
>> (defun set-smtp (mech server port user password)
>>   "Set related SMTP variables for supplied parameters."
>>   (setq smtpmail-smtp-server server smtpmail-smtp-service port
>> 	smtpmail-auth-credentials (list (list server port user
>> 					      password)) smtpmail-auth-supported (list mech)
>> 					      smtpmail-starttls-credentials nil)
>>   (message "Setting SMTP server to `%s:%s' for user `%s'."
>> 	   server port user))
>
> I think the problem is with smtpmail-auth-credentials and
> smtpmail-starttls-credentials: in Emacs 24 you need to set that in
> your ~/.authinfo file.  See etc/NEWS for the details (search for
> "SMTPmail").



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 15:31     ` Tory S. Anderson
@ 2015-02-07 15:37       ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2015-02-07 15:37 UTC (permalink / raw)
  To: help-gnu-emacs

> From: torys.anderson@gmail.com (Tory S. Anderson)
> Cc: help-gnu-emacs@gnu.org
> Date: Sat, 07 Feb 2015 10:31:16 -0500
> 
> I think you're on to something, Eli. I see a daunting amount on smtp changes in the news files. Unfortunately, I'm not sure what to do next.

Did you read NEWS and did you try to do what it suggests in order to
copy your customizations to ~/.authinfo?  If not, please do, what you
have there is good advice.

> I went so far as to comment-out everything you see below and then fired up the new emacs (my .authinfo file still exists unchanged); upon trying to send mail I seemed to make progress when it asked what outgoing server I wanted, but after specifying smtp.gmail.com, it seemed to freeze; one C-g later and it gave me the same old TLS error. 

Starting afresh is a good idea.  Eventually, if you cannot get it to
work starting from "emacs -Q", submit a bug report with all the
details using "M-x report-emacs-bug", and I'm sure you will get this
resolved one way or another.

> Does anyone have an example of a working smtp setup in emacs >24.3? 

I do.  It does exactly what NEWS says:

  *** The variable `smtpmail-auth-credentials' has been removed.
  By default, the information is now stored in the file ~/.authinfo.
  This was the default value of smtpmail-auth-credentials.  If you had
  customized smtpmail-auth-credentials to a list of user names and
  passwords, those settings are not used.  During your first connection
  to the smtp server, Emacs will prompt for the user name and password,
  and offer to save them to ~/.authinfo.  Or you can manually copy the
  credentials to ~/.authinfo.  For example, if you had

    (setq smtpmail-auth-credentials
	  '(("mail.example.org" 25 "jim" "s!cret")))

  then the equivalent line in ~/.authinfo would be

    machine mail.example.org port 25 login jim password s!cret

  See the auth-source manual for more information, e.g. on encrypting
  the credentials file.

  *** The variable `smtpmail-starttls-credentials' has been removed.
  If you had that set, you need to put

    machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"

  in your ~/.authinfo file instead.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 14:49   ` Eli Zaretskii
  2015-02-07 15:31     ` Tory S. Anderson
@ 2015-02-07 16:26     ` Tory S. Anderson
  2015-02-07 17:51       ` Sivaram Neelakantan
  2015-02-08  3:51       ` Dynamically switching send-mail settings (WAS: > 24.3 can't send mail) Tory S. Anderson
  1 sibling, 2 replies; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-07 16:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Thanks for your help and suggestions. I managed to get it to send an email with one of my hosted smtp servers; I never did get it to work with the gmail smtp servers, though; it just seems to wait indefinitely and C-g brings the TLS error. I submitted a bug report for those. And I'm a far-cry from getting it going with my other half-dozen email addresses. Looks like I'll be sitting with 24.3 for a while. 

Thanks again, 
- Tory

Eli Zaretskii <eliz@gnu.org> writes:

>> From: torys.anderson@gmail.com (Tory S. Anderson)
>> Date: Sat, 07 Feb 2015 09:29:03 -0500
>> 
>> I should add that the setup I'm using for mail, which has worked for years prior to 24.4+, is mostly borrowed from the emacs page http://www.emacswiki.org/emacs/SendingMail. To be precise, my source is this: 
>> 
>> --8<---------------cut here---------------start------------->8---
>> (defvar smtp-accounts
>>   '(
>>     (ssl "torys.anderson@gmail.com" "smtp.gmail.com"
>> 	 587 "torys.anderson@gmail.com" secret) ;; Public
>> ;; other accounts omitted
>>     ))
>> 
>> 
>> ;; Now lets configure smtpmail.el with your name and functions to send
>> ;; mail using your smtp accounts by changing the from field
>> (require 'smtpmail)
>> (setq send-mail-function 'smtpmail-send-it
>>       message-send-mail-function 'smtpmail-send-it
>>       mail-from-style nil user-full-name "Tory S. Anderson"
>>       smtpmail-debug-info t smtpmail-debug-verb t)
>> 
>> (defun set-smtp (mech server port user password)
>>   "Set related SMTP variables for supplied parameters."
>>   (setq smtpmail-smtp-server server smtpmail-smtp-service port
>> 	smtpmail-auth-credentials (list (list server port user
>> 					      password)) smtpmail-auth-supported (list mech)
>> 					      smtpmail-starttls-credentials nil)
>>   (message "Setting SMTP server to `%s:%s' for user `%s'."
>> 	   server port user))
>
> I think the problem is with smtpmail-auth-credentials and
> smtpmail-starttls-credentials: in Emacs 24 you need to set that in
> your ~/.authinfo file.  See etc/NEWS for the details (search for
> "SMTPmail").



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: > 24.3 can't send mail
  2015-02-07 16:26     ` Tory S. Anderson
@ 2015-02-07 17:51       ` Sivaram Neelakantan
  2015-02-08  3:51       ` Dynamically switching send-mail settings (WAS: > 24.3 can't send mail) Tory S. Anderson
  1 sibling, 0 replies; 15+ messages in thread
From: Sivaram Neelakantan @ 2015-02-07 17:51 UTC (permalink / raw)
  To: help-gnu-emacs

On Sat, Feb 07 2015,Tory S. Anderson wrote:

> Thanks for your help and suggestions. I managed to get it to send an
> email with one of my hosted smtp servers; I never did get it to work
> with the gmail smtp servers, though; it just seems to wait
> indefinitely and C-g brings the TLS error. I submitted a bug report
> for those. And I'm a far-cry from getting it going with my other
> half-dozen email addresses. Looks like I'll be sitting with 24.3 for a
> while.
>
> Thanks again, 
> - Tory
>

FWIW, with this setup on Windows Emacs 24.4, I'm able to send emails, read via
IMAP and download emails through POP3.   Please try a similar setting
making sure you have a proper .authinfo file that Emacs can find and
with a new .gnus file.  This all goes into .gnus

--8<---------------cut here---------------start------------->8---
(setq user-full-name "Sivaram Neelakantan")
(setq user-mail-address "nsivaramxxxxx@gmail.com")

(setq gnutls-log-level 1) ;; just in case it borks for some sites
(setq gnutls-trustfiles '("c:/cygwin/usr/ssl/certs/ca-bundle.trust.crt" "c:/cygwin/usr/ssl/certs/ca-bundle.crt"))

(setq mail-sources
      '((pop :server "pop.gmail.com"
             :port 995
             :user "xxxxx@gmail.com"
             :password "xxxxx"
             :stream ssl)))
;;if retrieving from spool, delete temp file after 1 days
(setq mail-source-delete-incoming 1)
(setq mail-source-delete-old-incoming-confirm nil)
(eval-after-load "mail-source" '(require 'pop3))
(setq smtpmail-stream-type 'ssl)
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-service 465)
(setq smtpmail-debug-info t) ; only to debug problems set to t if needed
(setq smtpmail-debug-verb t)
--8<---------------cut here---------------end--------------->8---


[snipped 39 lines]

the .authinfo entry for gmail looks like this

machine smtp.gmail.com login nsivaramxxxxx@gmail.com password XXXXX  port 587


 sivaram
 -- 




^ permalink raw reply	[flat|nested] 15+ messages in thread

* Dynamically switching send-mail settings (WAS: > 24.3 can't send mail)
  2015-02-07 16:26     ` Tory S. Anderson
  2015-02-07 17:51       ` Sivaram Neelakantan
@ 2015-02-08  3:51       ` Tory S. Anderson
  2015-02-08 21:49         ` Robert Thorpe
  1 sibling, 1 reply; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-08  3:51 UTC (permalink / raw)
  To: Emacs Help List

I'm very near to regaining my 24.3 Gnus send mail functionality of being able to dynamically send from any of my multiple addresses and having the server information change accordingly. Using the function below it does indeed change the server info at send-time, and there is a matching entry in .authinfo. But I receive the (mostly successful) output:

Sending via mail...
Failed to match ...
Failed to match ...
Failed to match ...
Failed to match ...
Setting SMTP server to `smtp.gmail2.com:587' for user <CORRECT-MATCH>
Opening TLS connection to `smtp.gmail2.com'...
Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect smtp.gmail2.com:587 -no_ssl2 -ign_eof'...done

And, at that, it freezes with the final line in my message buffer until I C-g to safety. Any ideas why it freezes at this point, having done the dynamic setting correctly? Note that I've successfully sent with this account today before I started working on the dynamic switching, so I know the settings are otherwise correct. Below are the functions I'm using: 

--8<---------------cut here---------------start------------->8---
(defvar smtp-accounts
'(
("me@mine.com" "mail.mine.com" 26);; Personal
("mail@me.com" "mail.mine3.com" 26);; Professional
("me2@mine.com" "mail.mine2.com" 26) ;; Web development
("mine@gmail.com" "smtp.gmail.com" 587) ;; Public
))

(defun set-smtp (server port user)
"Set related SMTP variables for supplied parameters. String `user'
will not be evaluated."
(setq smtpmail-smtp-server server smtpmail-smtp-service port)
(message "Setting SMTP server to `%s:%s' for user `%s'."
server port user))

(defun change-smtp ()
  "Change the SMTP server according to the current from line."
  (save-excursion
    (cl-loop with from = (save-restriction
			   (message-narrow-to-headers)
			   (message-fetch-field "from"))
	     for (address server port) in smtp-accounts
	     do (if (string-match address from)
			(return (funcall 'set-smtp server port address))
		  (message "Failed to match %s with %s" address from))
	     finally (error "Cannot infer SMTP information."))))

(add-hook 'message-send-mail-hook 'change-smtp)

--8<---------------cut here---------------end--------------->8---



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings (WAS: > 24.3 can't send mail)
  2015-02-08  3:51       ` Dynamically switching send-mail settings (WAS: > 24.3 can't send mail) Tory S. Anderson
@ 2015-02-08 21:49         ` Robert Thorpe
  2015-02-09  2:54           ` Dynamically switching send-mail settings Tory S. Anderson
       [not found]           ` <mailman.19558.1423450457.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 15+ messages in thread
From: Robert Thorpe @ 2015-02-08 21:49 UTC (permalink / raw)
  To: Tory S. Anderson; +Cc: help-gnu-emacs

torys.anderson@gmail.com (Tory S. Anderson) writes:

> And, at that, it freezes with the final line in my message buffer until I C-g to safety. Any ideas why it freezes at this point, having done the dynamic setting correctly? Note that I've successfully sent with this account today before I started working on the dynamic switching, so I know the settings are otherwise correct. Below are the functions I'm using: 

One of the peculiarities of gmail is that if you're using it over IMAP,
POP and SMTP.  It limits the number of transactions you can do with it
per day.  People who are having problems with their config often hit
this limit while experimenting.

However, AFAIK it only applies to receive operations (i.e. IMAP & POP),
not to SMTP.  Maybe I'm wrong about that though.  Regardless your setup
may magically start working tomorrow.

BR,
Robert Thorpe



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
  2015-02-08 21:49         ` Robert Thorpe
@ 2015-02-09  2:54           ` Tory S. Anderson
       [not found]           ` <mailman.19558.1423450457.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-09  2:54 UTC (permalink / raw)
  To: Robert Thorpe; +Cc: help-gnu-emacs

In this case it happens even if not a gmail account, and unfortunately a new day didn't fix it. Two questions: First, with this message:

    Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com'...failed
    Opening TLS connection with `gnutls-cli --insecure -p 587 smtp.gmail2.com --protocols ssl3'...failed
    Opening TLS connection with `openssl s_client -connect smtp.gmail2.com:587 -no_ssl2 -ign_eof'...done

Is it expected to cycle through different TLS methods? 
Second, could my change be occurring too late? Right now I have my function on a hook as follows:
--8<---------------cut here---------------start------------->8---
(add-hook 'message-send-hook 'change-smtp)
;(add-hook 'message-send-mail-hook 'change-smtp)
--8<---------------cut here---------------end--------------->8---

I've tried both hooks (one is supposed to be earlier in the send process) and the results don't change. The original version that worked <24.4 didn't use a hook it all; as far as I can tell it did some magic I don't understand with this:

--8<---------------cut here---------------start------------->8---
(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))

(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
  (with-current-buffer smtpmail-text-buffer
    (change-smtp))
  (funcall (symbol-value '%smtpmail-via-smtp) recipient
	   smtpmail-text-buffer))
--8<---------------cut here---------------end--------------->8---

Is changing the server/port settings in one of the send-hooks too late? And what is that original magic with the symbols and symbol-function?




Robert Thorpe <rt@robertthorpeconsulting.com> writes:

> torys.anderson@gmail.com (Tory S. Anderson) writes:
>
>> And, at that, it freezes with the final line in my message buffer until I C-g to safety. Any ideas why it freezes at this point, having done the dynamic setting correctly? Note that I've successfully sent with this account today before I started working on the dynamic switching, so I know the settings are otherwise correct. Below are the functions I'm using: 
>
> One of the peculiarities of gmail is that if you're using it over IMAP,
> POP and SMTP.  It limits the number of transactions you can do with it
> per day.  People who are having problems with their config often hit
> this limit while experimenting.
>
> However, AFAIK it only applies to receive operations (i.e. IMAP & POP),
> not to SMTP.  Maybe I'm wrong about that though.  Regardless your setup
> may magically start working tomorrow.
>
> BR,
> Robert Thorpe



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
       [not found]           ` <mailman.19558.1423450457.1147.help-gnu-emacs@gnu.org>
@ 2015-02-09  5:03             ` Lars Magne Ingebrigtsen
  2015-02-09 12:18               ` Tory S. Anderson
  0 siblings, 1 reply; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-02-09  5:03 UTC (permalink / raw)
  To: Tory S. Anderson; +Cc: help-gnu-emacs, Robert Thorpe

torys.anderson@gmail.com (Tory S. Anderson) writes:

> In this case it happens even if not a gmail account, and unfortunately
> a new day didn't fix it. Two questions: First, with this message:
>
>     Opening TLS connection with `gnutls-cli --insecure -p 587
> smtp.gmail2.com'...failed

If you get these messages, then that means that your Emacs hasn't been
built with libgnutls support.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
  2015-02-09  5:03             ` Lars Magne Ingebrigtsen
@ 2015-02-09 12:18               ` Tory S. Anderson
  2015-02-18  1:20                 ` Lars Ingebrigtsen
  2015-04-15 16:08                 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-09 12:18 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: help-gnu-emacs, Robert Thorpe

Thanks Lars, 

After years of emailing in Gnus I didn't think that was an issue; I guess I thought gnutls was built in to Fedora, or I wouldn't have been working. Anyway, I sudo yum installed it and rebuilt emacs. Now I get a different set of errors:

    gnutls.c: [1] (Emacs) allocating credentials
    gnutls.c: [1] (Emacs) setting the trustfile:  /etc/pki/tls/certs/ca-bundle.crt
    gnutls.c: [1] (Emacs) gnutls callbacks
    gnutls.c: [1] (Emacs) gnutls_init
    gnutls.c: [1] (Emacs) got non-default priority string: NORMAL
    gnutls.c: [1] (Emacs) setting the priority string
    gnutls.c: [audit] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data

    gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily unavailable, try again. [11798 times]
    gnutls.c: [audit] Received record packet of unknown type 50

    gnutls.c: [0] (Emacs) fatal error: An unexpected TLS packet was received.
    gnutls.el: (err=[-15] An unexpected TLS packet was received.) boot: (:priority NORMAL :hostname mail.toryanderson2.com :loglevel 1 :min-prime-bits 256 :trustfiles (/etc/pki/tls/certs/ca-bundle.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil)
    gnutls-negotiate: GnuTLS error: #<process smtpmail>, -15

I was happy to see the Diffie-Hellman alert; that's what I get on my working email setup. But what's with the gnutls errors now? Seems like I'm getting closer and closer...



Lars Magne Ingebrigtsen <lmi@gnus.org> writes:

> torys.anderson@gmail.com (Tory S. Anderson) writes:
>
>> In this case it happens even if not a gmail account, and unfortunately
>> a new day didn't fix it. Two questions: First, with this message:
>>
>>     Opening TLS connection with `gnutls-cli --insecure -p 587
>> smtp.gmail2.com'...failed
>
> If you get these messages, then that means that your Emacs hasn't been
> built with libgnutls support.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
  2015-02-09 12:18               ` Tory S. Anderson
@ 2015-02-18  1:20                 ` Lars Ingebrigtsen
  2015-02-18  2:10                   ` Tory S. Anderson
  2015-04-15 16:08                 ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2015-02-18  1:20 UTC (permalink / raw)
  To: Tory S. Anderson; +Cc: help-gnu-emacs, Robert Thorpe

torys.anderson@gmail.com (Tory S. Anderson) writes:

>     gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily
> unavailable, try again. [11798 times]
>     gnutls.c: [audit] Received record packet of unknown type 50
>
>     gnutls.c: [0] (Emacs) fatal error: An unexpected TLS packet was received.
>     gnutls.el: (err=[-15] An unexpected TLS packet was received.)
> boot: (:priority NORMAL :hostname mail.toryanderson2.com :loglevel 1
> :min-prime-bits 256 :trustfiles (/etc/pki/tls/certs/ca-bundle.crt)
> :crlfiles nil :keylist nil :verify-flags nil :verify-error nil
> :callbacks nil)

I think this probably means that the SMTP server is closing the
connection for some reason or other.  Try setting `smtpmail-debug-info'
and look in the trace buffer to see whether it has anything interesting
to say.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
  2015-02-18  1:20                 ` Lars Ingebrigtsen
@ 2015-02-18  2:10                   ` Tory S. Anderson
  0 siblings, 0 replies; 15+ messages in thread
From: Tory S. Anderson @ 2015-02-18  2:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: help-gnu-emacs, Robert Thorpe

Thanks. I was able to fix this as part of a veritable ordeal. I'm not sure which things fixed this particular problem (I was trouble shooting various things at once), but steps included:
- Building emacs with gnutls support (which I hadn't originally realized wasn't being done)
- Ensuring that there were no blank lines separating authinfo entries
- Validating that my email-switching functions were on the correct sendmail hooks
- Ensuring that I was using consistent smtp-server port numbers between the .gnus config and the .authinfo entries

Lars Ingebrigtsen <larsi@gnus.org> writes:

> torys.anderson@gmail.com (Tory S. Anderson) writes:
>
>>     gnutls.c: [1] (Emacs) non-fatal error: Resource temporarily
>> unavailable, try again. [11798 times]
>>     gnutls.c: [audit] Received record packet of unknown type 50
>>
>>     gnutls.c: [0] (Emacs) fatal error: An unexpected TLS packet was received.
>>     gnutls.el: (err=[-15] An unexpected TLS packet was received.)
>> boot: (:priority NORMAL :hostname mail.toryanderson2.com :loglevel 1
>> :min-prime-bits 256 :trustfiles (/etc/pki/tls/certs/ca-bundle.crt)
>> :crlfiles nil :keylist nil :verify-flags nil :verify-error nil
>> :callbacks nil)
>
> I think this probably means that the SMTP server is closing the
> connection for some reason or other.  Try setting `smtpmail-debug-info'
> and look in the trace buffer to see whether it has anything interesting
> to say.



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Dynamically switching send-mail settings
  2015-02-09 12:18               ` Tory S. Anderson
  2015-02-18  1:20                 ` Lars Ingebrigtsen
@ 2015-04-15 16:08                 ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 15+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-04-15 16:08 UTC (permalink / raw)
  To: Tory S. Anderson; +Cc: help-gnu-emacs, Robert Thorpe

torys.anderson@gmail.com (Tory S. Anderson) writes:

>     gnutls.c: [audit] Received record packet of unknown type 50
>
>     gnutls.c: [0] (Emacs) fatal error: An unexpected TLS packet was received.
>     gnutls.el: (err=[-15] An unexpected TLS packet was received.)
> boot: (:priority NORMAL :hostname mail.toryanderson2.com :loglevel 1
> :min-prime-bits 256 :trustfiles (/etc/pki/tls/certs/ca-bundle.crt)
> :crlfiles nil :keylist nil :verify-flags nil :verify-error nil
> :callbacks nil)

I don't know what a packet of type 50 is...  Anybody know what this
might be?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-04-15 16:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-07 13:35 > 24.3 can't send mail Tory S. Anderson
2015-02-07 14:29 ` Tory S. Anderson
2015-02-07 14:49   ` Eli Zaretskii
2015-02-07 15:31     ` Tory S. Anderson
2015-02-07 15:37       ` Eli Zaretskii
2015-02-07 16:26     ` Tory S. Anderson
2015-02-07 17:51       ` Sivaram Neelakantan
2015-02-08  3:51       ` Dynamically switching send-mail settings (WAS: > 24.3 can't send mail) Tory S. Anderson
2015-02-08 21:49         ` Robert Thorpe
2015-02-09  2:54           ` Dynamically switching send-mail settings Tory S. Anderson
     [not found]           ` <mailman.19558.1423450457.1147.help-gnu-emacs@gnu.org>
2015-02-09  5:03             ` Lars Magne Ingebrigtsen
2015-02-09 12:18               ` Tory S. Anderson
2015-02-18  1:20                 ` Lars Ingebrigtsen
2015-02-18  2:10                   ` Tory S. Anderson
2015-04-15 16:08                 ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.