Gnus development mailing list
 help / color / mirror / Atom feed
From: Samir Saidani <saidani@info.unicaen.fr>
Cc: Simon Josefsson <jas@extundo.com>
Subject: Re: gnus and smtp auth
Date: Fri, 29 Apr 2005 22:59:20 +0200	[thread overview]
Message-ID: <871x8tpadz.fsf@info.unicaen.fr> (raw)
In-Reply-To: <ilu4qdqm0yy.fsf@latte.josefsson.org>

Hi,

Thanks for your quick answer !

Here are the logs of :

*Messages*


 Using smtp-auth
 From is `Samir Saidani <saidani@info.unicaen.fr>', 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: 
 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" nil)))
		 (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 
		  (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(#<process SMTP>)
  (while (not (search-forward "\r\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-point) (while ... ... ... ...) (setq match-end ...) (setq response-strings ...) (goto-char smtpmail-read-point) (if ... ... ...)) (setq smtpmail-read-point 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-value)
  smtpmail-read-response(#<process SMTP>)
  (setq greeting (smtpmail-read-response process))
  (car (setq greeting (smtpmail-read-response process)))
  (null (car (setq greeting ...)))
  (or (null (car ...)) (not (integerp ...)) (>= (car greeting) 400))
  (if (or (null ...) (not ...) (>= ... 400)) (throw (quote done) nil))
  (save-current-buffer (set-buffer process-buffer) (set-buffer-process-coding-system (quote raw-text-unix) (quote raw-text-unix)) (make-local-variable (quote smtpmail-read-point)) (setq smtpmail-read-point (point-min)) (if (or ... ... ...) (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 (... ...) (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)
  (with-current-buffer process-buffer (set-buffer-process-coding-system (quote raw-text-unix) (quote raw-text-unix)) (make-local-variable (quote smtpmail-read-point)) (setq smtpmail-read-point (point-min)) (if (or ... ... ...) (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 (... ...) (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-current-buffer process-buffer (erase-buffer)) (setq process (smtpmail-open-stream process-buffer host port)) (and (null process) (throw ... nil)) (set-process-filter process (quote smtpmail-process-filter)) (with-current-buffer process-buffer (set-buffer-process-coding-system ... ...) (make-local-variable ...) (setq smtpmail-read-point ...) (if ... ...) (let ... ...) (smtpmail-try-auth-methods process supported-extensions host port) (if ... ...) (if ... ...) (if ... ...) (let ... ... ...) (let ... ...) (smtpmail-send-command 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-current-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-from ...) response-code greeting process-buffer (supported-extensions ...)) (unwind-protect (catch ... ... ... ... ... ... ...) (if process ...)))
  smtpmail-via-smtp(("echo@cnam.fr") #<buffer  smtpmail temp>)
  (not (smtpmail-via-smtp smtpmail-recipient-address-list tembuf))
  (if (not (smtpmail-via-smtp smtpmail-recipient-address-list tembuf)) (error "Sending failed; SMTP protocol error"))
  (if (not (null smtpmail-recipient-address-list)) (if (not ...) (error "Sending 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 ... ... ... ... ... ... ... ... ... ...) (kill-buffer buffer-scratch) (kill-buffer buffer-data) (kill-buffer buffer-elisp)))
  (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substring mailbuf) (goto-char (point-max)) (or (= ... 10) (insert 10)) (mail-sendmail-undelimit-header) (setq delimline (point-marker)) (if mail-aliases (expand-mail-aliases ... delimline)) (goto-char (point-min)) (while (and ... ...) (replace-match "\n")) (let (...) (goto-char ...) (if ... ... ...) (goto-char ...) (if ... ...) (goto-char ...) (unless ... ...) (goto-char ...) (unless ... ...) (goto-char ...) (if ... ...) (goto-char ...) (if ... ...) (if mail-interactive ...)) (setq smtpmail-address-buffer (generate-new-buffer "*smtp-mail*")) (setq smtpmail-recipient-address-list (smtpmail-deduce-address-list tembuf ... delimline)) (kill-buffer smtpmail-address-buffer) (smtpmail-do-bcc delimline) (if (not smtpmail-queue-mail) (if ... ... ...) (let* ... ... ... ... ... ...)))
  (unwind-protect (save-excursion (set-buffer tembuf) (erase-buffer) (insert-buffer-substring mailbuf) (goto-char ...) (or ... ...) (mail-sendmail-undelimit-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-protect (save-excursion ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (kill-buffer tembuf) (if ... ...)))
  smtpmail-send-it()
  #[nil "\b ┤" [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 <jas@extundo.com> writes:

> Samir Saidani <saidani@info.unicaen.fr> 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?

-- 
Samir SAIDANI				
PhD Student in CS / Doctorant en informatique 	web : http://www.info.unicaen.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



  reply	other threads:[~2005-04-29 20:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-24 17:31 Samir Saidani
2005-04-29  8:38 ` Simon Josefsson
2005-04-29 20:59   ` Samir Saidani [this message]
2005-04-30 20:23 ` Steinar Bang
2005-05-31  2:28 ` Hiroshi Fujishima
2005-05-31  9:12   ` Simon Josefsson
2005-05-31  9:46     ` Hiroshi Fujishima
2005-04-26 21:58 Samir Saidani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871x8tpadz.fsf@info.unicaen.fr \
    --to=saidani@info.unicaen.fr \
    --cc=jas@extundo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).