* [22] problem configuring smtpmail for gmail.com
@ 2009-07-18 4:46 Tom Roche
2009-07-18 5:23 ` Thierry Volpiatto
0 siblings, 1 reply; 3+ messages in thread
From: Tom Roche @ 2009-07-18 4:46 UTC (permalink / raw)
To: help-gnu-emacs
I'd appreciate help {fix, debug}ing a problem mailing to
smtp.gmail.com (and other TLS-using mail hosts) using smtpmail.
Apologies if this should go to bug-gnu-emacs (but it's probably a
configuration problem) or if it's a FAQ (but my searches haven't found
that). (Note that, while searching, I've read
http://www.gnu.org/software/emacs/manual/html_node/smtpmail/index.html
http://www.gnu.org/software/emacs/windows/Network-access.html
http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html
http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp/
http://josefsson.org/emacs-smtp-starttls.html
and several list and newsgroup posts.) Please let me know if this
forum is in/appropriate, and feel free to reply directly to me as well
as to the list.
I'm running GNU Emacs 22.2.1, as installed by ubuntu package=
emacs22-gtk, on xubuntu 9.04, which is patched up-to-date. I'd like to
enable mail sending directly from emacs, since that's where I actually
compose mail. I don't currently want to use emacs to read/store mail,
since gmail seems to work pretty well for that. Hence I'd like to keep
the MUA simple, and smtpmail.el seems to be the simplest emacs MUA.
(Am I missing something?) My emacs seems to be pretty well setup for
that, since
* M-x load-library starttls.el finds it in
/usr/share/emacs/22.2/lisp/gnus/starttls.el.gz
* M-x load-library smtpmail.el finds it in
/usr/share/emacs/22.2/lisp/mail/smtpmail.el.gz
I have also installed package=gnutls-bin, and can
tlroche@tlrZ61t:~$ gnutls-cli -s -p 587 smtp.gmail.com
> Resolving 'smtp.gmail.com'...
> Connecting to '72.14.247.109:587'...
>
> - Simple Client Mode:
>
> 220 mx.google.com ESMTP 30sm668279agc.59
> ^C
I have also made
tlroche@tlrZ61t:~$ cat ~/.authinfo
> machine smtp.pobox.com login <id omitted/> password <pw omitted/>
> machine smtp.gmail.com login <id omitted/> password <pw omitted/>
In my init.el I have
> ;; debugging==t
> (setq smtpmail-debug-info t)
> (setq smtpmail-debug-verb t)
> ;; "must be set before the SMTP library is loaded"?
> (setq smtpmail-default-smtp-server "smtp.gmail.com")
> (setq user-full-name "Tom Roche")
> ;; use the default MUA
> (setq send-mail-function 'smtpmail-send-it)
> (setq message-send-mail-function 'smtpmail-send-it)
> (setq smtpmail-auth-credentials (expand-file-name "~/.authinfo"))
> (setq user-mail-address "tlroche@gmail.com")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587)
> ;; Use STARTTLS without authentication against the server.
> (setq smtpmail-starttls-credentials
> '((smtpmail-smtp-server smtpmail-smtp-service nil nil))
> )
> (setq starttls-use-gnutls t)
> (setq starttls-program "gnutls-cli") ; from ubuntu package=gnutls-bin
> (require 'smtpmail)
> (require 'starttls)
and I've verified that those vars get loaded. But when I try to send
a simple message via
C-x m
twiddle buffer
C-c C-c
I get
*trace of SMTP session to smtp.gmail.com*
> Process SMTP deleted
> 220 mx.google.com ESMTP 7sm1834314agb.41
> EHLO tlrZ61t.ubuntu-domain
> 250-mx.google.com at your service, [69.134.240.67]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-STARTTLS
> 250-ENHANCEDSTATUSCODES
> 250 PIPELINING
> MAIL FROM:<tlroche@gmail.com> SIZE=289
> 530 5.7.0 Must issue a STARTTLS command first. 7sm1834314agb.41
> QUIT
> 221 2.0.0 closing connection 7sm1834314agb.41
So apparently I need to configure myself to utter a STARTTLS command
when sending mail. If so, how to do that? If not, what am I missing?
Your suggestions regarding
* how to debug this problem
* how to fix this problem
* how to avoid this problem (i.e. better ways to approach this task,
given that I'd like to keep it simple)
* better places to seek help
are appreciated. TIA, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [22] problem configuring smtpmail for gmail.com
2009-07-18 4:46 Tom Roche
@ 2009-07-18 5:23 ` Thierry Volpiatto
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2009-07-18 5:23 UTC (permalink / raw)
To: help-gnu-emacs
Tom Roche <Tom_Roche@pobox.com> writes:
> I'd appreciate help {fix, debug}ing a problem mailing to
> smtp.gmail.com (and other TLS-using mail hosts) using smtpmail.
>
> Apologies if this should go to bug-gnu-emacs (but it's probably a
> configuration problem) or if it's a FAQ (but my searches haven't found
> that). (Note that, while searching, I've read
>
> http://www.gnu.org/software/emacs/manual/html_node/smtpmail/index.html
> http://www.gnu.org/software/emacs/windows/Network-access.html
> http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html
> http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp/
> http://josefsson.org/emacs-smtp-starttls.html
>
> and several list and newsgroup posts.) Please let me know if this
> forum is in/appropriate, and feel free to reply directly to me as well
> as to the list.
>
> I'm running GNU Emacs 22.2.1, as installed by ubuntu package=
> emacs22-gtk, on xubuntu 9.04, which is patched up-to-date. I'd like to
> enable mail sending directly from emacs, since that's where I actually
> compose mail. I don't currently want to use emacs to read/store mail,
> since gmail seems to work pretty well for that. Hence I'd like to keep
> the MUA simple, and smtpmail.el seems to be the simplest emacs MUA.
> (Am I missing something?) My emacs seems to be pretty well setup for
> that, since
>
> * M-x load-library starttls.el finds it in
> /usr/share/emacs/22.2/lisp/gnus/starttls.el.gz
>
> * M-x load-library smtpmail.el finds it in
> /usr/share/emacs/22.2/lisp/mail/smtpmail.el.gz
>
> I have also installed package=gnutls-bin, and can
>
> tlroche@tlrZ61t:~$ gnutls-cli -s -p 587 smtp.gmail.com
>> Resolving 'smtp.gmail.com'...
>> Connecting to '72.14.247.109:587'...
>>
>> - Simple Client Mode:
>>
>> 220 mx.google.com ESMTP 30sm668279agc.59
>> ^C
>
> I have also made
>
> tlroche@tlrZ61t:~$ cat ~/.authinfo
>> machine smtp.pobox.com login <id omitted/> password <pw omitted/>
>> machine smtp.gmail.com login <id omitted/> password <pw omitted/>
You have to give the port to gnus:
,----[ .authinfo ]
| machine smtp.gmail.com port 587 login <pw omitted/> password <pwomitted/>
`----
,----[ My settings ]
| ;; «config-pour-gmail» (to ".config-pour-gmail")
| (setq user-mail-address "you@gmail.com"
| user-full-name "you")
|
| ;; «config-gmail-avec-starttls» (to ".config-gmail-avec-starttls")
| ; Sending mail
| (setq message-send-mail-function 'smtpmail-send-it)
| (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))
|
| ;; «Now-my-password-are-in-.authinfo» (to ".Now-my-password-are-in-.authinfo")
|
| ;; Whithout authinfo:
| ;; (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587
| ;; "my_email_as_login" "My_password")))
|
| (setq smtpmail-default-smtp-server "smtp.gmail.com")
| (setq smtpmail-smtp-server "smtp.gmail.com")
| (setq smtpmail-smtp-service 587)
`----
Hope that help.
> In my init.el I have
>
>> ;; debugging==t
>> (setq smtpmail-debug-info t)
>> (setq smtpmail-debug-verb t)
>
>> ;; "must be set before the SMTP library is loaded"?
>> (setq smtpmail-default-smtp-server "smtp.gmail.com")
>> (setq user-full-name "Tom Roche")
>
>> ;; use the default MUA
>> (setq send-mail-function 'smtpmail-send-it)
>> (setq message-send-mail-function 'smtpmail-send-it)
>> (setq smtpmail-auth-credentials (expand-file-name "~/.authinfo"))
>
>> (setq user-mail-address "tlroche@gmail.com")
>> (setq smtpmail-smtp-server "smtp.gmail.com")
>> (setq smtpmail-smtp-service 587)
>
>> ;; Use STARTTLS without authentication against the server.
>> (setq smtpmail-starttls-credentials
>> '((smtpmail-smtp-server smtpmail-smtp-service nil nil))
>> )
>> (setq starttls-use-gnutls t)
>> (setq starttls-program "gnutls-cli") ; from ubuntu package=gnutls-bin
>
>> (require 'smtpmail)
>> (require 'starttls)
>
> and I've verified that those vars get loaded. But when I try to send
> a simple message via
>
> C-x m
> twiddle buffer
> C-c C-c
>
> I get
>
> *trace of SMTP session to smtp.gmail.com*
>> Process SMTP deleted
>> 220 mx.google.com ESMTP 7sm1834314agb.41
>> EHLO tlrZ61t.ubuntu-domain
>> 250-mx.google.com at your service, [69.134.240.67]
>> 250-SIZE 35651584
>> 250-8BITMIME
>> 250-STARTTLS
>> 250-ENHANCEDSTATUSCODES
>> 250 PIPELINING
>> MAIL FROM:<tlroche@gmail.com> SIZE=289
>> 530 5.7.0 Must issue a STARTTLS command first. 7sm1834314agb.41
>> QUIT
>> 221 2.0.0 closing connection 7sm1834314agb.41
>
> So apparently I need to configure myself to utter a STARTTLS command
> when sending mail. If so, how to do that? If not, what am I missing?
>
> Your suggestions regarding
>
> * how to debug this problem
>
> * how to fix this problem
>
> * how to avoid this problem (i.e. better ways to approach this task,
> given that I'd like to keep it simple)
>
> * better places to seek help
>
> are appreciated. TIA, Tom Roche <Tom_Roche@pobox.com>
>
>
>
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [22] problem configuring smtpmail for gmail.com
@ 2009-07-18 17:41 Tom Roche
0 siblings, 0 replies; 3+ messages in thread
From: Tom Roche @ 2009-07-18 17:41 UTC (permalink / raw)
To: help-gnu-emacs
Tom Roche Sat, 18 Jul 2009 00:46:22 -0400 (EDT)
>> I'd appreciate help {fix, debug}ing a problem mailing to
>> smtp.gmail.com (and other TLS-using mail hosts) using smtpmail.
(details @
http://lists.gnu.org/archive/html/help-gnu-emacs/2009-07/msg00488.html
)
Thierry Volpiatto Sat, 18 Jul 2009 07:23:31 +0200
> You have to give the port to gnus:
> ,----[ .authinfo ]
> | machine smtp.gmail.com port 587 login <pw omitted/> password <pwomitted/>
> `----
arrggghhhh! fixed that first:
tlroche@tlrZ61t:~$ cat ~/.authinfo
> machine smtp.gmail.com port 587 login <omitted/> password <omitted/>
> machine smtp.pobox.com port 25 login <omitted/> password <omitted/>
Thierry Volpiatto Sat, 18 Jul 2009 07:23:31 +0200
> ,----[ My settings ]
> | ;; «config-pour-gmail» (to ".config-pour-gmail")
> | (setq user-mail-address "you@gmail.com"
> | user-full-name "you")
> |
> | ;; «config-gmail-avec-starttls» (to ".config-gmail-avec-starttls")
> | ; Sending mail
> | (setq message-send-mail-function 'smtpmail-send-it)
> | (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))
> |
> | ;; «Now-my-password-are-in-.authinfo» (to ".Now-my-password-are-in-.authinfo")
> |
> | ;; Whithout authinfo:
> | ;; (setq smtpmail-auth-credentials '(("smtp.gmail.com" 587
> | ;; "my_email_as_login" "My_password")))
> |
> | (setq smtpmail-default-smtp-server "smtp.gmail.com")
> | (setq smtpmail-smtp-server "smtp.gmail.com")
> | (setq smtpmail-smtp-service 587)
> `----
So I commented out all my mail config, and put the following
tlrMail.el
> ;; debugging==t
> (setq smtpmail-debug-info t)
> (setq smtpmail-debug-verb t)
> (setq user-mail-address <omitted>
> user-full-name "Tom Roche")
> (setq message-send-mail-function 'smtpmail-send-it)
> (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))
> (setq smtpmail-default-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587)
into a file which I'm loading from init.el, and which I
byte-compile-file'd. I then cycled emacs and sent the following
*mail*
> To: Tom Roche <Tom_Roche@pobox.com>
> Subject: testing post from xubuntu emacs
> --text follows this line--
> testing post from xubuntu emacs,
> after fixing ~/.authinfo and tlrMail.el
@ 12:04:26 (about 80 min ago). The good news: no errors! No
*Backtrace* or *trace of SMTP session to smtp.pobox.com*, and
nothing relevant in *Messages* except
*Messages*
> Loading sendmail...done
> Mark set [4 times]
> Sending...done
The bad news: nothing like the post above is in my gmail (Inbox or
Spam) as of 12:45:00 PM, and nothing like that was caught in my
pobox.com spambox (though there is spam received after 12:04:26).
By contrast, when I sent the same *mail* from another host (using an
emacs I shelled into) @ 12:49:39, the post showed in gmail @ 12:50:16.
Hence it looks like my emacs is giving a false positive. I'm
wondering, how to fix or debug this?
TIA, Tom Roche <Tom_Roche@pobox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-18 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-18 17:41 [22] problem configuring smtpmail for gmail.com Tom Roche
-- strict thread matches above, loose matches on Subject: below --
2009-07-18 4:46 Tom Roche
2009-07-18 5:23 ` Thierry Volpiatto
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.