Re: gmx imap failure

2016-02-15 Thread Adam Sjøgren
Zaam writes:

>>   $ gnutls-cli --insecure -p 993 imap.gmx.com
>>   Processed 0 CA certificate(s).
>>   Resolving 'imap.gmx.com'...
>>   Connecting to '212.227.17.188:993'...
>>   - Certificate type: X.509
>>   - Got a certificate list of 3 certificates.

> That's really weird. I can access to gmx email by browser.

Your browser does not use IMAP.

> But cannot by gnutls-cli. What's the possible reason?

It looks like the IMAPS port is firewalled for you. Are you on a
corporate network with strict policies? Can you connect IMAPS on other
servers?


  Best regards,

Adam

-- 
 "It's my chainsawAdam Sjøgren
  Division is mine"  a...@koldfront.dk


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


Re: Trigger spell checking before sending

2016-02-15 Thread Peter Münster
On Fri, Feb 12 2016, Pietro wrote:

> Now that I got this working my following question is : would it be possible
> to auto-detect the language the spell checker should check ? 

Hi,

Here some code snippets of my configuration, that could help perhaps:

--8<---cut here---start->8---
(defvar pm/language "fr"
  "Language of current buffer.")
(make-variable-buffer-local 'pm/language)

(require 'auto-dictionary)

(defun pm/update-lang ()
  "Check current buffer and update pm/language accordingly."
  (setq pm/language (adict--evaluate-buffer-find-lang nil)))

(defun pm/spell ( lang)
  "hunspell"
  (unless lang
(pm/update-lang)
(setq lang (cdr (assoc-string pm/language '(("fr" . "fr_FR")
("de" . "de_DE")
("en" . "en_GB"))
  (ispell-change-dictionary lang)
  (if (and (eq major-mode 'message-mode) (not (use-region-p)))
  (let ((ispell-skip-region-alist
 (append '(("^<#.*>$")
   ("^On .+ [0-9]\\{2\\} [0-9]\\{4\\}, .+ wrote:$"))
 ispell-skip-region-alist)))
(ispell-message))
(ispell)))

(defun adict-evaluate-buffer ( idle-only)
  "Evaluate all words in the current buffer to find out the text's language.
If IDLE-ONLY is set, abort when an input event occurs."
  (save-excursion
(let* ((counts (make-vector (length adict-language-list) 0))
   (mm (eq major-mode 'message-mode))
   (b-min (point-min))
   (b-max (point-max))
   (min (or (and mm (goto-char b-min)
 (re-search-forward
  (concat "^" (regexp-quote mail-header-separator) "$")
  nil t)) b-min))
   (max (or (and mm (goto-char b-max)
 (re-search-backward
  message-signature-separator nil t)) b-max)))
  (adict-foreach-word
   min max 8
   (lambda (word)
 ;; increase language count of WORD by one
 (callf incf (elt counts (adict-evaluate-word word
   idle-only)
  counts)))

(setenv "LC_ALL" "en_GB.utf8") ; needed by hunspell
(setq-default ispell-program-name "hunspell")

(global-set-key [?\C-c ?s] (lambda () (interactive) (pm/spell)))
(global-set-key [?\C-c ?f] (lambda () (interactive) (pm/spell "fr_FR")))
(global-set-key [?\C-c ?d] (lambda () (interactive) (pm/spell "de_DE")))
(global-set-key [?\C-c ?e] (lambda () (interactive) (pm/spell "en_GB")))

(defun pm/message-send ()
  (unless (message-field-value gnus-delay-header)
(unless (string-equal pm/role "list")
  (if (jl-epg-check-unique-keys (jl-mail-recipients))
  (mml-secure-message-sign-encrypt)
(mml-secure-message-sign)))
(pm/spell)))

(defun pm/make-signature ()
  "Check role, lang and level."
  (cl-case pm/sig-level
(0 nil)
(1 "   Peter")
(2 "   Peter Münster")
(3 (concat "   Peter Münster\n   " (pm/phone)))
(4 (concat "   Peter Münster\n"
   (pm/address "   ")
   "   " (pm/phone)))
(t
 (setq pm/sig-level 0)
 (pm/make-signature

(defun pm/message-setup ()
  (cond (gnus-article-reply
 (pm/update-role)
 (pm/update-lang)
 (incf pm/sig-level)
 (save-excursion
   (message-insert-signature)))
((save-excursion (message-goto-signature))
 (pm/update-role)
 (pm/update-lang))
(t
 (pm/ask-role)
 (let ((message-signature-insert-empty-line t))
   (incf pm/sig-level)
   (save-excursion
 (message-insert-signature))

(add-hook 'gnus-message-setup-hook  'pm/message-setup)
(add-hook 'message-send-hook'pm/message-send)
--8<---cut here---end--->8---

HTH,
-- 
   Peter


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


Re: smtp outlook.com

2016-02-15 Thread Zaam Wu
Lars Ingebrigtsen  writes:

> Zaam Wu  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-m...@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


Re: gmx imap failure

2016-02-15 Thread Zaam Wu
a...@koldfront.dk (Adam Sjøgren) writes:

> ZWu writes:
>
>> $ gnutls-cli --insecure -p 993 imap.gmx.com
>> Processed 0 CA certificate(s).
>> Resolving 'imap.gmx.com'...
>> Connecting to '212.227.17.172:993'...
>> Cannot connect to 212.227.17.172:993: Connection timed out
>> Connecting to '212.227.17.188:993'...
>> ```
>>
>> As you see, running on command line gives `Connection timed out'
>> as well.
>
> Then that is your problem. When I try, I get a connection:
>
>   $ gnutls-cli --insecure -p 993 imap.gmx.com
>   Processed 0 CA certificate(s).
>   Resolving 'imap.gmx.com'...
>   Connecting to '212.227.17.188:993'...
>   - Certificate type: X.509
>   - Got a certificate list of 3 certificates.
>   - Certificate[0] info:
>- subject `C=US,ST=Pennsylvania,L=Chesterbrook,O=1&1 Mail & Media
>  Inc.,CN=imap.gmx.com', [...etc.etc...]
>OK [CAPABILITY IMAP4rev1 CHILDREN ENABLE ID IDLE LIST-EXTENDED
>   LIST-STATUS LITERAL+ MOVE NAMESPACE SASL-IR SORT SPECIAL-USE
>   THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN AUTH=LOGIN AUTH=PLAIN]
>   IMAP server ready [...]

That's really weird. I can access to gmx email by browser.

But cannot by gnutls-cli. What's the possible reason?

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


Re: smtp outlook.com

2016-02-15 Thread Zaam Wu
Lars Ingebrigtsen  writes:

> Zaam Wu  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: #, -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!
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


smtp outlook.com

2016-02-15 Thread Zaam Wu

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 em...@outlook.com
password mypass port 993
machine smtp-mail.outlook.com login em...@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: #, -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!
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: gmx imap failure

2016-02-15 Thread ZWu
a...@koldfront.dk (Adam Sjøgren) writes:

> Zhu writes:
>
>> (add-to-list 'gnus-secondary-select-methods
>>   '(nnimap "gmx"
>>(nnimap-address "imap.gmx.com")
>>(nnimap-server-port 993)
>>(nnimap-stream ssl)
>>(nnir-search-engine imap)))
>
> [...]
>
>> Opening TLS connection to `imap.gmx.com'... Opening TLS connection
>> with `gnutls-cli --insecure -p 993 imap.gmx.com'...failed
>
> What happens if you run this command by hand?
>
> I.e.:
>
>   $ gnutls-cli --insecure -p 993 imap.gmx.com

The output is like this:

```
$ gnutls-cli --insecure -p 993 imap.gmx.com
Processed 0 CA certificate(s).
Resolving 'imap.gmx.com'...
Connecting to '212.227.17.172:993'...
Cannot connect to 212.227.17.172:993: Connection timed out
Connecting to '212.227.17.188:993'...
```

As you see, running on command line gives `Connection timed out'
as well.
-- 
Hello, world!
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: smtp outlook.com

2016-02-15 Thread Lars Ingebrigtsen
Zaam Wu  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
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: smtp outlook.com

2016-02-15 Thread Lars Ingebrigtsen
Zaam Wu  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: #, -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
___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english