gnus-notifications: add actions support
[gnus] / lisp / sieve-manage.el
index c9a0df2..74bcbcc 100644 (file)
@@ -1,6 +1,6 @@
-;;; sieve-manage.el --- Implementation of the managesive protocol in elisp
+;;; sieve-manage.el --- Implementation of the managesieve protocol in elisp
 
-;; Copyright (C) 2001-2011  Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012  Free Software Foundation, Inc.
 
 ;; Author: Simon Josefsson <simon@josefsson.org>
 
@@ -157,6 +157,7 @@ for doing the actual authentication."
 (defcustom sieve-manage-default-stream 'network
   "Default stream type to use for `sieve-manage'.
 Must be a name of a stream in `sieve-manage-stream-alist'."
+  :version "24.1"
   :type 'symbol
   :group 'sieve-manage)
 
@@ -275,9 +276,10 @@ Valid states are `closed', `initial', `nonauth', and `auth'.")
   (with-current-buffer buffer
     (let* ((auth-info (auth-source-search :host sieve-manage-server
                                           :port "sieve"
-                                          :max 1))
-           (user-name (plist-get (nth 0 auth-info) :user))
-           (user-password (plist-get (nth 0 auth-info) :secret))
+                                          :max 1
+                                          :create t))
+           (user-name (or (plist-get (nth 0 auth-info) :user) ""))
+           (user-password (or (plist-get (nth 0 auth-info) :secret) ""))
            (user-password (if (functionp user-password)
                               (funcall user-password)
                             user-password))