From b8d96f6e609f3bb8a72fa724bc273175c8e7dbb1 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 16 Sep 2010 09:02:27 -0400
Subject: [PATCH] - Use random sleep interval up to 3 sec. in 'get' action when IMAP conn. fails
---
program/include/rcube_config.php | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php
index bd53517..488ffc4 100644
--- a/program/include/rcube_config.php
+++ b/program/include/rcube_config.php
@@ -247,8 +247,17 @@
public function header_delimiter()
{
// use the configured delimiter for headers
- if (!empty($this->prop['mail_header_delimiter']))
- return $this->prop['mail_header_delimiter'];
+ if (!empty($this->prop['mail_header_delimiter'])) {
+ $delim = $this->prop['mail_header_delimiter'];
+ if ($delim == "\n" || $delim == "\r\n")
+ return $delim;
+ else
+ raise_error(array(
+ 'code' => 500, 'type' => 'php',
+ 'file' => __FILE__, 'line' => __LINE__,
+ 'message' => "Invalid mail_header_delimiter setting"
+ ), true, false);
+ }
$php_os = strtolower(substr(PHP_OS, 0, 3));
@@ -277,12 +286,12 @@
$domain = $this->prop['mail_domain'][$host];
}
else if (!empty($this->prop['mail_domain']))
- $domain = $this->prop['mail_domain'];
-
+ $domain = rcube_parse_host($this->prop['mail_domain']);
+
return $domain;
}
-
-
+
+
/**
* Getter for error state
*
--
Gitblit v1.9.1