From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60236 Path: news.gmane.org!not-for-mail From: Samir Saidani Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus and smtp auth Date: Fri, 29 Apr 2005 22:59:20 +0200 Message-ID: <871x8tpadz.fsf@info.unicaen.fr> References: <87mzrokrnl.fsf@info.unicaen.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1114812846 2732 80.91.229.2 (29 Apr 2005 22:14:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2005 22:14:06 +0000 (UTC) Cc: Simon Josefsson Original-X-From: ding-owner+M8764@lists.math.uh.edu Sat Apr 30 00:14:01 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DRdjp-00028j-CX for ding-account@gmane.org; Sat, 30 Apr 2005 00:13:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1DRdez-0007wu-00; Fri, 29 Apr 2005 17:08:33 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1DRcbc-0007qt-00 for ding@lists.math.uh.edu; Fri, 29 Apr 2005 16:01:00 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1DRcbW-0001Q8-5O for ding@lists.math.uh.edu; Fri, 29 Apr 2005 16:00:54 -0500 Original-Received: from sizun.unicaen.fr ([193.55.130.147]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1DRcbO-0003Q8-00 for ; Fri, 29 Apr 2005 23:00:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by sizun.unicaen.fr (Postfix) with ESMTP id DDA2E3840BF for ; Fri, 29 Apr 2005 23:00:43 +0200 (CEST) Original-Received: from averell (averell.info.unicaen.fr [193.55.128.16]) by sizun.unicaen.fr (Postfix) with ESMTP id C442838400B for ; Fri, 29 Apr 2005 23:00:43 +0200 (CEST) Original-Received: from cassiopee ([2001:660:7101:1:230:48ff:fe10:928b]) by averell with esmtp; Fri, 29 Apr 2005 23:00:43 +0200 id 00007DBF.4272A07B.000009EF Original-Received: by cassiopee (Postfix, from userid 1000) id CA3BB3D74; Fri, 29 Apr 2005 22:59:21 +0200 (CEST) Original-To: ding@gnus.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at unicaen.fr X-Spam-Score: -3.9 (---) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60236 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60236 Hi, Thanks for your quick answer ! Here are the logs of : *Messages* Using smtp-auth From is `Samir Saidani ', setting `smtpmail-smtp-= server' to `465' Sending... Sending via mail... Loading smtpmail (source)...done Loading mailalias...done Opening STARTTLS connection to `smtp.xxx.com'...done while:=20 Loading debug...done Entering debugger... [2 times] keyboard-quit: Quit Mark set [2 times] *.gnus.el* (setq gnus-posting-styles '((".*" (name "Samir Saidani") (address "saidani@info.unicaen.fr")) ("^nnml.*gmail" (address "saidani@info.unicaen.fr")))) (defun fs-change-smtp () "Change the SMTP server according to the current from line." (save-excursion (let ((from (save-restriction (message-narrow-to-headers) (message-fetch-field "from")))) (message "From is `%s', setting `smtpmail-smtp-server' to `%s'" from (cond ((string-match "saidani@info.unicaen.fr" from) ;; Use stmp-auth (message "Using smtp-auth") ;; Sending mail (setq message-send-mail-function 'smtpmail-send-it) (setq smtpmail-starttls-credentials '(("smtp.xxx.com" 465 nil nil))) (setq smtpmail-auth-credentials '(("smtp.xxx.com" 465 "samir.saidani" ni= l))) (setq smtpmail-default-smtp-server "smtp.xxx.com") (setq smtpmail-smtp-server "smtp.xxx.com") (setq smtpmail-debug-info t) ; only to debug problems (setq smtpmail-debug-verb t) (setq starttls-use-gnutls t) (setq smtpmail-smtp-service 465)) ((string-match "saidani@info.unicaen.fr" from) ;; Use local sendmail (message "Using local sendmail") (setq message-send-mail-function `message-send-mail-with-sendmail)) (t (error=20 (concat "Don't know which mail server to use for " from)))))))) (add-hook 'message-setup-hook 'fs-change-smtp) (setq smtpmail-debug-info t) (setq debug-on-quit t) *trace ... * ^QUIT *Backtrace* Debugger entered--Lisp error: (quit) accept-process-output(#) (while (not (search-forward "=0D\n" nil t)) (unless (memq ... ...) (throw= ... nil)) (accept-process-output process) (goto-char smtpmail-read-point)) (while response-continue (goto-char smtpmail-read-point) (while (not ...)= (unless ... ...) (accept-process-output process) (goto-char smtpmail-read-= point)) (setq match-end (point)) (setq response-strings (cons ... response-= strings)) (goto-char smtpmail-read-point) (if (looking-at "[0-9]+ ") (let .= .. ... ... ...) (if ... ... ...))) (catch (quote done) (while response-continue (goto-char smtpmail-read-poi= nt) (while ... ... ... ...) (setq match-end ...) (setq response-strings ...= ) (goto-char smtpmail-read-point) (if ... ... ...)) (setq smtpmail-read-poi= nt match-end)) (let ((case-fold-search nil) (response-strings nil) (response-continue t)= (return-value ...) match-end) (catch (quote done) (while response-continue= ... ... ... ... ... ...) (setq smtpmail-read-point match-end)) return-valu= e) smtpmail-read-response(#) (setq greeting (smtpmail-read-response process)) (car (setq greeting (smtpmail-read-response process))) (null (car (setq greeting ...))) (or (null (car ...)) (not (integerp ...)) (>=3D (car greeting) 400)) (if (or (null ...) (not ...) (>=3D ... 400)) (throw (quote done) nil)) (save-current-buffer (set-buffer process-buffer) (set-buffer-process-codi= ng-system (quote raw-text-unix) (quote raw-text-unix)) (make-local-variable= (quote smtpmail-read-point)) (setq smtpmail-read-point (point-min)) (if (o= r ... ... ...) (throw ... nil)) (let (... ...) (while do-ehlo ... ... ...))= (smtpmail-try-auth-methods process supported-extensions host port) (if (or= ... ...) (progn ... ...)) (if (and smtpmail-debug-verb ...) (progn ... ...= )) (if (member ... supported-extensions) (progn ... ...)) (let (... ...) (s= mtpmail-send-command process ...) (if ... ...)) (let (...) (while ... ... .= .. ... ...)) (smtpmail-send-command process "DATA") (if (or ... ... ...) (t= hrow ... nil)) (smtpmail-send-data process smtpmail-text-buffer) (smtpmail-= send-command process ".") (if (or ... ... ...) (throw ... nil)) t) (with-current-buffer process-buffer (set-buffer-process-coding-system (qu= ote raw-text-unix) (quote raw-text-unix)) (make-local-variable (quote smtpm= ail-read-point)) (setq smtpmail-read-point (point-min)) (if (or ... ... ...= ) (throw ... nil)) (let (... ...) (while do-ehlo ... ... ...)) (smtpmail-tr= y-auth-methods process supported-extensions host port) (if (or ... ...) (pr= ogn ... ...)) (if (and smtpmail-debug-verb ...) (progn ... ...)) (if (membe= r ... supported-extensions) (progn ... ...)) (let (... ...) (smtpmail-send-= command process ...) (if ... ...)) (let (...) (while ... ... ... ... ...)) = (smtpmail-send-command process "DATA") (if (or ... ... ...) (throw ... nil)= ) (smtpmail-send-data process smtpmail-text-buffer) (smtpmail-send-command = process ".") (if (or ... ... ...) (throw ... nil)) t) (catch (quote done) (setq process-buffer (get-buffer-create ...)) (with-c= urrent-buffer process-buffer (erase-buffer)) (setq process (smtpmail-open-s= tream process-buffer host port)) (and (null process) (throw ... nil)) (set-= process-filter process (quote smtpmail-process-filter)) (with-current-buffe= r process-buffer (set-buffer-process-coding-system ... ...) (make-local-var= iable ...) (setq smtpmail-read-point ...) (if ... ...) (let ... ...) (smtpm= ail-try-auth-methods process supported-extensions host port) (if ... ...) (= if ... ...) (if ... ...) (let ... ... ...) (let ... ...) (smtpmail-send-com= mand process "DATA") (if ... ...) (smtpmail-send-data process smtpmail-text= -buffer) (smtpmail-send-command process ".") (if ... ...) t)) (unwind-protect (catch (quote done) (setq process-buffer ...) (with-curre= nt-buffer process-buffer ...) (setq process ...) (and ... ...) (set-process= -filter process ...) (with-current-buffer process-buffer ... ... ... ... ..= . ... ... ... ... ... ... ... ... ... ... ... t)) (if process (with-current= -buffer ... ... ... ... ...))) (let ((process nil) (host ...) (port smtpmail-smtp-service) (envelope-fro= m ...) response-code greeting process-buffer (supported-extensions ...)) (u= nwind-protect (catch ... ... ... ... ... ... ...) (if process ...))) smtpmail-via-smtp(("echo@cnam.fr") #) (not (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (if (not (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (err= or "Sending failed; SMTP protocol error")) (if (not (null smtpmail-recipient-address-list)) (if (not ...) (error "Se= nding failed; SMTP protocol error")) (error "Sending failed; no recipients"= )) (if (not smtpmail-queue-mail) (if (not ...) (if ... ...) (error "Sending = failed; no recipients")) (let* (... ... ... ... ... ...) (unless ... ...) (= with-current-buffer buffer-data ... ... ... ... ... ... ... ... ... ...) (k= ill-buffer buffer-scratch) (kill-buffer buffer-data) (kill-buffer buffer-el= isp))) (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substri= ng mailbuf) (goto-char (point-max)) (or (=3D ... 10) (insert 10)) (mail-sen= dmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (e= xpand-mail-aliases ... delimline)) (goto-char (point-min)) (while (and ... = ...) (replace-match "\n")) (let (...) (goto-char ...) (if ... ... ...) (got= o-char ...) (if ... ...) (goto-char ...) (unless ... ...) (goto-char ...) (= unless ... ...) (goto-char ...) (if ... ...) (goto-char ...) (if ... ...) (= if mail-interactive ...)) (setq smtpmail-address-buffer (generate-new-buffe= r "*smtp-mail*")) (setq smtpmail-recipient-address-list (smtpmail-deduce-ad= dress-list tembuf ... delimline)) (kill-buffer smtpmail-address-buffer) (sm= tpmail-do-bcc delimline) (if (not smtpmail-queue-mail) (if ... ... ...) (le= t* ... ... ... ... ... ...))) (unwind-protect (save-excursion (set-buffer tembuf) (erase-buffer) (inser= t-buffer-substring mailbuf) (goto-char ...) (or ... ...) (mail-sendmail-und= elimit-header) (setq delimline ...) (if mail-aliases ...) (goto-char ...) (= while ... ...) (let ... ... ... ... ... ... ... ... ... ... ... ... ... ...= ) (setq smtpmail-address-buffer ...) (setq smtpmail-recipient-address-list = ...) (kill-buffer smtpmail-address-buffer) (smtpmail-do-bcc delimline) (if = ... ... ...)) (kill-buffer tembuf) (if (bufferp errbuf) (kill-buffer errbuf= ))) (let ((errbuf ...) (tembuf ...) (case-fold-search nil) delimline (mailbuf= ...) (smtpmail-mail-address ...) (smtpmail-code-conv-from ...)) (unwind-pr= otect (save-excursion ... ... ... ... ... ... ... ... ... ... ... ... ... .= .. ... ...) (kill-buffer tembuf) (if ... ...))) smtpmail-send-it() #[nil "=08 =87" [message-send-mail-function] 1]() gnus-agent-send-mail() message-send-mail(nil) message-send-via-mail(nil) message-send(nil) message-send-and-exit(nil) call-interactively(message-send-and-exit) Thanks at all ! Samir Simon Josefsson writes: > Samir Saidani writes: > >> When I replace the .gnus configuration (from terjeros) with the right >> settings, it hangs and there is nothing in smtp debug. > > What's in *Messages*? After (setq smtpmail-debug-info t), what do the > *trace...* buffer contain? With (setq debug-on-quit t), what > backtrace do you get if you C-g when it hangs? --=20 Samir SAIDANI=09=09=09=09 PhD Student in CS / Doctorant en informatique web : http://www.info.unicae= n.fr/~saidani Universite de Caen - Laboratoire GREYC tel : 02-31-56-74-30 Equipe MAD - Campus II - 14032 Caen Cedex fax : 02-31-56-76-30