[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending mail with SMTP problem

From: Torben Knudsen
Subject: Re: Sending mail with SMTP problem
Date: Wed, 01 Apr 2009 10:59:28 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Ted Zlatanov <> writes:

> On Tue, 31 Mar 2009 14:09:32 +0200 Torben Knudsen <> wrote: 
> TK> Re.: Problem sending mail with SMTP 
> TK> When I send mail with SMTP I get the below error message.  I am told
> TK> that a newer gnus will probably fix it.  I use Gnus v5.11.  If I need
> TK> a new version I would prefer to fix it via ubuntu.  Any good
> TK> suggestions? 
> TK> Process SMTP deleted
> TK> 220 ESMTP Exim 4.63 Tue, 31 Mar 2009 12:27:33 +0200
> TK> EHLO tk-laptop
> TK> Hello []
> TK> 250-SIZE 52428800
> TK> 250 HELP
> TK> 250 OK
> TK> RCPT TO:<>
> TK> 550 relay not permitted
> TK> 221 closing connection
> You need to authenticate yourself to that SMTP server using TLS, because
> it doesn't allow you to relay mail to outside users otherwise (this is a
> good thing).  Look at these instructions:
> On Windows, you may have a hard time setting things up.  I know this
> works on GNU/Linux, MacOS X, and other Unix systems.

I tryed to follow the instruction but it didn't solve my problem.  The
strange thing is that the problem is only with a new smtp server.
With the old smtp server it works but this server will be closed.  I
have include my .gnus below if anyone can se any mistakes.

;% Time-stamp: <2009-04-01 09:59:03 tk>

;*** Misc

; To avoid canlock-password entries in .emacs
(setq message-insert-canlock nil)

(gnus-define-keys gnus-summary-mode-map [delete]  gnus-summary-delete-article)

(setq make-backup-files nil)
(setq user-mail-address "")
(setq gnus-local-domain "")

;; Send mail using SMTP on the mail submission port 587.
(require 'starttls)
(require 'smtpmail)
(setq message-send-mail-function 'smtpmail-send-it
      smtpmail-starttls-credentials '(("" 587 nil nil))
      smtpmail-auth-credentials '(("" 587
                                   "" nil))
      smtpmail-default-smtp-server ""
      smtpmail-smtp-server ""
      smtpmail-smtp-service 587)

; added from begin
(setq smtpmail-local-domain "")
(setq smtpmail-sendto-domain "")
; added from end

;; TK Alternative to smtpmail-smtp-credentials
;;      smtpmail-auth-credentials "~/.authinfo")

(setq gnus-local-organization "Aalborg University, Institute of Electronic 

; For debuging and test
(setq smtpmail-debug-info t
      smtpmail-debug-verb t)

(setq mail-source-delete-incoming t)

(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)

(setq gnus-large-newsgroup 300)
(setq nnmail-large-newsgroup 300)
(add-hook 'gnus-after-getting-new-news-hook 'gnus-group-save-newsrc)
(setq gnus-suppress-duplicates t)
(setq nnmail-treat-duplicates 'delete)
(setq gnus-interactive-exit nil)
(setq gnus-thread-ignore-subject t)

(setq gnus-nntp-server "")
(setq gnus-message-archive-group "nnimap+AUC:INBOX.mbox-out")

;*** Default headers
(setq message-default-headers "Mime-Version: 1.0\nContent-Type: text/plain; 
charset=ISO-8859-1\nContent-Transfer-Encoding: 8bit\n")

;*** TK part
;(setq gnus-use-adaptive-scoring t)
;(setq gnus-default-article-saver 'gnus-summary-save-in-file)

; Use external browser e.g. firefox
;(setq mm-text-html-renderer nil)
;(setq browse-url-browser-function 'browse-url-firefox)

;; Use emacs-w3m to render html mails and display images
(setq mm-text-html-renderer 'w3m
      mm-inline-text-html-with-images t
      mm-inline-large-images t)

;; Show plain text part by default, but provide buttons for the
;; html part
(setq mm-discouraged-alternatives '("text/html" "text/richtext" "text/enriched")
      gnus-buttonized-mime-types  '("multipart/signed" "multipart/alternative"))

;*** nnimap stuff
; for test
;(setq imap-log "imaplog")

;; For IMAP use.
(setq nnimap-split-inbox '("INBOX")
      imap-username "tk"
      imap-store-password t

(setq nnimap-expunge-on-close 'always)
(defvar nnimap-split-crosspost nil)

;(setq gnus-select-method '(nnnil "")
(setq gnus-select-method '(nntp "")
      '((nnimap "AUC"
                (nnimap-address "")
                (nnimap-stream ssl))))

; (nnimap-authinfo-file "~/.authinfo")

;*** Setup group buffer format
(add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
(setq gnus-group-line-format "%M%S<%4R:%3y>: %(%-40,40g%) %2,2~(cut 
6)d-%2,2~(cut 4)d\n")
(setq gnus-summary-line-format "%U%R%z%I%(%[%d %4c: %-20,20n%]%) %s\n")
(define-key gnus-summary-mode-map [delete] 'gnus-summary-delete-article)

;; *** automatic mail scan without manual effort.
;; level-specified group scanner.
(defun gnus-demon-scan-mail-or-news-and-update (level)
"Scan for new mail, updating the *Group* buffer."
  (let ((win (current-window-configuration)))
            (when (gnus-alive-p)
                (set-buffer gnus-group-buffer)
                (gnus-group-get-new-news level)))))
      (set-window-configuration win))))
;; level 2: only mail groups are scanned.
(defun gnus-demon-scan-mail-and-update ()
"Scan for new mail, updating the *Group* buffer."
  (gnus-demon-scan-mail-or-news-and-update 2))
(gnus-demon-add-handler `gnus-demon-scan-mail-and-update 5 nil)
;; level 3: mail and local news groups are scanned.
(defun gnus-demon-scan-news-and-update ()
"Scan for new mail, updating the *Group* buffer."
  (gnus-demon-scan-mail-or-news-and-update 3))
(gnus-demon-add-handler `gnus-demon-scan-news-and-update 20 20)

(setq gnus-auto-expirable-newsgroups "nnimap[+]AUC:")
(setq gnus-inhibit-user-auto-expire nil)
(setq nnmail-expiry-wait 31)

;*** Mail splitting
(setq nnimap-split-rule
  ("INBOX.Spam-mail"    "^X-Spam-Flag:.*YES")
  ("INBOX.Spam-mail"    "^Subject:.*\*\*\*SPAM\*\*\*.*")
  ("INBOX.staff"        "^\\(To\\|Cc\\):.*staff")
  ("INBOX.staff"        "^\\(To\\|Cc\\):.*all-control")
  ("INBOX.P3C"          "^\\(Subject\\|To\\|Cc\\):.*P3C.*")
  ("INBOX.Aeolus"       "^\\(Subject\\|From\\|To\\|Cc\\):.*Aeolus.*")
  ("INBOX.Badminton"    "^\\(To\\|Cc\\|From\\|Subject\\):.*badminton.*")
  (""           "^\\(To\\|Cc\\|From\\):.*tk@.*")
  ("INBOX.misc"         "")

Associate Prof. Ph.D Torben Knudsen     Mobile  : (+45) 2787 9826
Section of Automation and Control,      Direct  : 6 8694
Department of Electronic Systems,       Email   :   
Aalborg University 
Fredrik Bajersvej 7 
DK-9220 Aalborg Ø

reply via email to

[Prev in Thread] Current Thread [Next in Thread]