Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* smtp outlook.com
@ 2016-02-15  5:49 Zaam Wu
  2016-02-15  8:10 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Zaam Wu @ 2016-02-15  5:49 UTC (permalink / raw)
  To: info-gnus-english


I can fetch imap email from outlook.com. However, cannot send
email through outlook.com.

My `gnus.el' excerpt:

```
;; Outlook imap
(add-to-list 'gnus-secondary-select-methods
	     '(nnimap "outlook"
		      (nnimap-address "imap-mail.outlook.com")
		      (nnimap-server-port 993)
		      (nnimap-stream ssl)))

;; Outlook smtp
(setq send-mail-function 'smtpmail-send-it
      message-send-mail-function 'smtpmail-send-it
      smtpmail-default-smtp-server "smtp-mail.outlook.com"
      smtpmail-smtp-server "smtp-mail.outlook.com"
      smtpmail-stream-type 'starttls ;; or `ssl'
      smtpmail-smtp-service 587)

;; smtp debug
(setq smtpmail-debug-info t
      smtpmail-debug-verb t)

;; starttls
(setq starttls-use-gnutls t
      starttls-gnutls-program "gnutls-cli"
      starttls-extra-arguments nil)

;; authinfo
(setq nntp-authinfo-file
      (nnheader-concat gnus-home-directory "authinfo.gpg")
      nnimap-authinfo-file
      (nnheader-concat gnus-home-directory "authinfo.gpg")
      smtpmail-auth-credentials
      (nnheader-concat gnus-home-directory "authinfo.gpg")
      smtpmail-starttls-credentials
      (nnheader-concat gnus-home-directory "authinfo.gpg"))
```

My `autinfo.gpg':

```
machine imap-mail.outlook.com login email@outlook.com
password mypass port 993
machine smtp-mail.outlook.com login email@outlook.com
password mypass port 587
```

Error message:

If smtpmail-stream-type to `starttls', it looks:

---------- smtpmail-stream-type starttls --------
Sending via mail...
gnutls.c: [0] (Emacs) fatal error: The TLS connection was
non-properly terminated.  550 5.7.3 Requested action aborted; user
not authenticated smtpmail-send-command: Process smtpmail not
running Quit
--------------------------------------------------

If smtpmail-stream-type to `ssl', it looks:

------ smtpmail-stream-type ssl ----------------
Sending via mail...
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
smtp-mail.outlook.com :loglevel 0 :min-prime-bits 256 :trustfiles
(/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil
:verify-flags nil :verify-error nil :callbacks nil)
gnutls-negotiate: GnuTLS error: #<process smtpmail>, -15 Quit
-------------------------------------------------

From the outlook.com help menu, I can find:

```
Server name: smtp-mail.outlook.com
Port: 587
Encryption method: TLS
```


So could any guy help?
-- 

Hello, world!

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

* Re: smtp outlook.com
  2016-02-15  5:49 smtp outlook.com Zaam Wu
@ 2016-02-15  8:10 ` Lars Ingebrigtsen
  2016-02-15  9:00   ` Zaam Wu
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-15  8:10 UTC (permalink / raw)
  To: info-gnus-english

Zaam Wu <zaamwu@outlook.com> writes:

>       smtpmail-stream-type 'starttls ;; or `ssl'

It's not a STARTTLS server, so it should be 'tls.

> If smtpmail-stream-type to `ssl', it looks:
>
> ------ smtpmail-stream-type ssl ----------------
> Sending via mail...
> 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
> smtp-mail.outlook.com :loglevel 0 :min-prime-bits 256 :trustfiles
> (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil
> :verify-flags nil :verify-error nil :callbacks nil)
> gnutls-negotiate: GnuTLS error: #<process smtpmail>, -15 Quit

I think this just means that the server closed the connection.
Probably.  Connecting to the server works fine for me:

LU436-SMTP207.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version: 8.0.9200.16384 ready at  Mon, 15 Feb 2016 00:09:39 -0800 

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

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

* Re: smtp outlook.com
  2016-02-15  8:10 ` Lars Ingebrigtsen
@ 2016-02-15  9:00   ` Zaam Wu
  2016-02-15  9:07     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Zaam Wu @ 2016-02-15  9:00 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Zaam Wu <zaamwu@outlook.com> writes:
>
>>       smtpmail-stream-type 'starttls ;; or `ssl'
>
> It's not a STARTTLS server, so it should be 'tls.
From the help doc, it should be 'ssh.

```Help doc:
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), or `ssl' (to use TLS/SSL).
```
>
>> If smtpmail-stream-type to `ssl', it looks:
>>
>> ------ smtpmail-stream-type ssl ----------------
>> Sending via mail...
>> 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
>> smtp-mail.outlook.com :loglevel 0 :min-prime-bits 256 :trustfiles
>> (/etc/ssl/certs/ca-certificates.crt) :crlfiles nil :keylist nil
>> :verify-flags nil :verify-error nil :callbacks nil)
>> gnutls-negotiate: GnuTLS error: #<process smtpmail>, -15 Quit
>
> I think this just means that the server closed the connection.
> Probably.  Connecting to the server works fine for me:
>
> LU436-SMTP207.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version: 8.0.9200.16384 ready at  Mon, 15 Feb 2016 00:09:39 -0800 

Mine is:

LU437-SMTP105.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version: 8.0.9200.16384 ready at  Mon, 15 Feb 2016 00:54:39 -0800 

Process smtpmail connection broken by remote peer

-- 
Hello, world!

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

* Re: smtp outlook.com
  2016-02-15  9:00   ` Zaam Wu
@ 2016-02-15  9:07     ` Lars Ingebrigtsen
  2016-02-15  9:30       ` Zaam Wu
  2016-02-15  9:46       ` Zaam Wu
  0 siblings, 2 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-15  9:07 UTC (permalink / raw)
  To: info-gnus-english

Zaam Wu <zaamwu@outlook.com> writes:

> LU437-SMTP105.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version:
> 8.0.9200.16384 ready at Mon, 15 Feb 2016 00:54:39 -0800
>
> Process smtpmail connection broken by remote peer

So it connects fine, but then hangs up.  So it probably doesn't want to
talk to you?  Do you have the proper login credentials?

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

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

* Re: smtp outlook.com
  2016-02-15  9:07     ` Lars Ingebrigtsen
@ 2016-02-15  9:30       ` Zaam Wu
  2016-02-15  9:46       ` Zaam Wu
  1 sibling, 0 replies; 9+ messages in thread
From: Zaam Wu @ 2016-02-15  9:30 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Zaam Wu <zaamwu@outlook.com> writes:
>
>> LU437-SMTP105.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version:
>> 8.0.9200.16384 ready at Mon, 15 Feb 2016 00:54:39 -0800
>>
>> Process smtpmail connection broken by remote peer
>
> So it connects fine, but then hangs up.  So it probably doesn't want to
> talk to you?  Do you have the proper login credentials?

I am sure my login credentials are right. This is my authinfo.gpg:

```
machine imap-mail.outlook.com login my-mail@outlook.com password my-pass port 993
machine smtp-mail.outlook.com login my-mailoutlook.com password my-pass port 587
```

After reading this post: http://stackoverflow.com/a/22898098. I
add a function to gnus.el:

```
(defun gnutls-available-p ()
  "Function redefined in order not to use built-in GnuTLS support"
  nil)
```

Now the sending log from *Message* buffer:

```
Sending via mail...
Opening TLS connection to `smtp-mail.outlook.com'...
Opening TLS connection with `gnutls-cli --insecure -p 587 smtp-mail.outlook.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 587 smtp-mail.outlook.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect smtp-mail.outlook.com:587 -no_ssl2 -ign_eof'...done
Opening TLS connection to `smtp-mail.outlook.com'...done
network-stream-command: Process smtpmail not running
Decrypting /home/zachary/.emacs.d/gnus/authinfo.gpg...done
```

And the trace buffer:

```
Process smtpmail exited abnormally with code 1
```

-- 
你好!
Hello, world!
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: smtp outlook.com
  2016-02-15  9:07     ` Lars Ingebrigtsen
  2016-02-15  9:30       ` Zaam Wu
@ 2016-02-15  9:46       ` Zaam Wu
  2016-06-30  7:37         ` xiewensheng
  1 sibling, 1 reply; 9+ messages in thread
From: Zaam Wu @ 2016-02-15  9:46 UTC (permalink / raw)
  To: info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Zaam Wu <zaamwu@outlook.com> writes:
>
>> LU437-SMTP105.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version:
>> 8.0.9200.16384 ready at Mon, 15 Feb 2016 00:54:39 -0800
>>
>> Process smtpmail connection broken by remote peer
>
> So it connects fine, but then hangs up.  So it probably doesn't want to
> talk to you?  Do you have the proper login credentials?

Manually run gnutls-cli on terminal:

```bash
$ gnutls-cli --insecure -p 587 smtp-mail.outlook.com
Processed 0 CA certificate(s).
Resolving 'smtp-mail.outlook.com'...
Connecting to '65.55.163.152:587'...
|<1>| Received record packet of unknown type 50
*** Fatal error: An unexpected TLS packet was received.
*** Handshake has failed
GnuTLS error: An unexpected TLS packet was received.
```
-- 
你好!
Hello, world!
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: smtp outlook.com
  2016-02-15  9:46       ` Zaam Wu
@ 2016-06-30  7:37         ` xiewensheng
  2016-06-30 20:28           ` Dmitry Alexandrov
       [not found]           ` <mailman.344.1467318506.26859.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: xiewensheng @ 2016-06-30  7:37 UTC (permalink / raw)
  To: info-gnus-english

On Monday, February 15, 2016 at 5:50:01 PM UTC+8, Zaam Wu wrote:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > Zaam Wu <zaamwu@outlook.com> writes:
> >
> >> LU437-SMTP105.smtp.hotmail.com Microsoft ESMTP MAIL Service, Version:
> >> 8.0.9200.16384 ready at Mon, 15 Feb 2016 00:54:39 -0800
> >>
> >> Process smtpmail connection broken by remote peer
> >
> > So it connects fine, but then hangs up.  So it probably doesn't want to
> > talk to you?  Do you have the proper login credentials?
> 
> Manually run gnutls-cli on terminal:
> 
> ```bash
> $ gnutls-cli --insecure -p 587 smtp-mail.outlook.com
> Processed 0 CA certificate(s).
> Resolving 'smtp-mail.outlook.com'...
> Connecting to '65.55.163.152:587'...
> |<1>| Received record packet of unknown type 50
> *** Fatal error: An unexpected TLS packet was received.
> *** Handshake has failed
> GnuTLS error: An unexpected TLS packet was received.
> ```
> -- 
> 你好!
> Hello, world!

Hi, I have similar problem.
Fetching imap email is ok, but sending smtp email is not.

I am working under windows + Emacs/gnus + gnutls.

Have you solved the problem?

best regards,
wxie
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: smtp outlook.com
  2016-06-30  7:37         ` xiewensheng
@ 2016-06-30 20:28           ` Dmitry Alexandrov
       [not found]           ` <mailman.344.1467318506.26859.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Dmitry Alexandrov @ 2016-06-30 20:28 UTC (permalink / raw)
  To: xiewensheng; +Cc: info-gnus-english

xiewensheng@gmail.com writes:

> Hi, I have similar problem.
> Fetching imap email is ok, but sending smtp email is not.
>
> I am working under windows + Emacs/gnus + gnutls.
>
> Have you solved the problem?

Well, I’ve got a registration at outlook.com purposefully to test it
with Gnus — and it just works with no problem.  I’ve used the following
configuration:

--8<---------------cut here---------------start------------->8---
(setq send-mail-function 'smtpmail-send-it
      message-send-mail-function send-mail-function
      smtpmail-default-smtp-server "smtp-mail.outlook.com"
      smtpmail-smtp-service 587
      smtpmail-smtp-user "example@outlook.com")
--8<---------------cut here---------------end--------------->8---

and the following .authinfo:

--8<---------------cut here---------------start------------->8---
machine smtp-mail.outlook.com login example@outlook.com password eXamp1e port 587
--8<---------------cut here---------------end--------------->8---

Debian GNU/Linux Jessie, GnuTLS 3.3.8, GNU Emacs 25.1.50.


However, it was enough to send two letters through this SMTP server to
get enough experience to never deal with it again.  Look:

— It adds erroneous headers, for example ‘Content-Language: en-US’,
  while my test message was not in English.

— It does not allow you to write anything to ‘From’ header even outside
  of angle brackets, e. g. I am not allowed to write my name as ‘Дмитрий
  Александров <example@outlook.com>’ — it would be silently rewritten
  with ‘Dmitry Alexandrov <example@outlook.com>’.

— It rewrites ‘Message-ID’, which means that unambiguous link between you
  letter and replies to it would be lost for your MUA (if only you do
  not ‘Bcc’ all outcoming mail to yourself).

— It just throw out useful headers, in particular ‘Mail-Followup-To’
  and ‘Mail-Copies-To’.

As a bonus, it adds lots of weird headers and re-encodes the body of
message — both charset and transfer encoding: I’ve send a letter with
‘charset="utf-8"’ and received with ‘charset="iso-8859-1"’, I’ve send a
letter in ‘8bit’ encoding and received it in ‘base64’.

Any of listed ‘features’ on its own should be enough to not to use that
piece of Microsoft crap.  Thus, I would just advice you choose another
SMTP server that does not break you mail.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: smtp outlook.com
       [not found]           ` <mailman.344.1467318506.26859.info-gnus-english@gnu.org>
@ 2016-07-01  5:32             ` xiewensheng
  0 siblings, 0 replies; 9+ messages in thread
From: xiewensheng @ 2016-07-01  5:32 UTC (permalink / raw)
  To: info-gnus-english

On Friday, July 1, 2016 at 4:28:27 AM UTC+8, Dmitry Alexandrov wrote:
> xiewensheng@gmail.com writes:
> 
> > Hi, I have similar problem.
> > Fetching imap email is ok, but sending smtp email is not.
> >
> > I am working under windows + Emacs/gnus + gnutls.
> >
> > Have you solved the problem?
> 
> Well, I’ve got a registration at outlook.com purposefully to test it
> with Gnus — and it just works with no problem.  I’ve used the following
> configuration:
> 
> --8<---------------cut here---------------start------------->8---
> (setq send-mail-function 'smtpmail-send-it
>       message-send-mail-function send-mail-function
>       smtpmail-default-smtp-server "smtp-mail.outlook.com"
>       smtpmail-smtp-service 587
>       smtpmail-smtp-user "example@outlook.com")
> --8<---------------cut here---------------end--------------->8---
> 
> and the following .authinfo:
> 
> --8<---------------cut here---------------start------------->8---
> machine smtp-mail.outlook.com login example@outlook.com password eXamp1e port 587
> --8<---------------cut here---------------end--------------->8---
> 
> Debian GNU/Linux Jessie, GnuTLS 3.3.8, GNU Emacs 25.1.50.
> 
> 
> However, it was enough to send two letters through this SMTP server to
> get enough experience to never deal with it again.  Look:
> 
> — It adds erroneous headers, for example ‘Content-Language: en-US’,
>   while my test message was not in English.
> 
> — It does not allow you to write anything to ‘From’ header even outside
>   of angle brackets, e. g. I am not allowed to write my name as ‘Дмитрий
>   Александров <example@outlook.com>’ — it would be silently rewritten
>   with ‘Dmitry Alexandrov <example@outlook.com>’.
> 
> — It rewrites ‘Message-ID’, which means that unambiguous link between you
>   letter and replies to it would be lost for your MUA (if only you do
>   not ‘Bcc’ all outcoming mail to yourself).
> 
> — It just throw out useful headers, in particular ‘Mail-Followup-To’
>   and ‘Mail-Copies-To’.
> 
> As a bonus, it adds lots of weird headers and re-encodes the body of
> message — both charset and transfer encoding: I’ve send a letter with
> ‘charset="utf-8"’ and received with ‘charset="iso-8859-1"’, I’ve send a
> letter in ‘8bit’ encoding and received it in ‘base64’.
> 
> Any of listed ‘features’ on its own should be enough to not to use that
> piece of Microsoft crap.  Thus, I would just advice you choose another
> SMTP server that does not break you mail.

Thank you.
I know it works under GNU/Linux just fine.
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

end of thread, other threads:[~2016-07-01  5:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15  5:49 smtp outlook.com Zaam Wu
2016-02-15  8:10 ` Lars Ingebrigtsen
2016-02-15  9:00   ` Zaam Wu
2016-02-15  9:07     ` Lars Ingebrigtsen
2016-02-15  9:30       ` Zaam Wu
2016-02-15  9:46       ` Zaam Wu
2016-06-30  7:37         ` xiewensheng
2016-06-30 20:28           ` Dmitry Alexandrov
     [not found]           ` <mailman.344.1467318506.26859.info-gnus-english@gnu.org>
2016-07-01  5:32             ` xiewensheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).