:type 'symbol
:group 'sieve-manage)
+(defcustom sieve-manage-ignore-broken-tls nil
+ "Ignore STARTTLS even if STARTTLS capability is provided."
+ :type 'boolean
+ :group 'sieve-manage)
+
;; Internal variables:
(defconst sieve-manage-local-variables '(sieve-manage-server
:return-list t
:starttls-function
(lambda (capabilities)
- (when (string-match "\\bSTARTTLS\\b" capabilities)
- "STARTTLS\r\n")))
+ (when (and (not sieve-manage-ignore-broken-tls)
+ (string-match "\\bSTARTTLS\\b" capabilities))
+ "STARTTLS\r\n")))
(setq sieve-manage-process proc)
(setq sieve-manage-capability
(sieve-manage-parse-capability (plist-get props :capabilities)))
;; Ignore new capabilities issues after successful STARTTLS
- (when (and (memq stream '(nil network starttls))
- (eq (plist-get props :type) 'tls))
+ (when (or sieve-manage-ignore-broken-tls
+ (and (memq stream '(nil network starttls))
+ (eq (plist-get props :type) 'tls)))
(sieve-manage-drop-next-answer))
(current-buffer))))