| | |
| | | CHANGELOG RoundCube Webmail |
| | | --------------------------- |
| | | |
| | | 2006/02/04 |
| | | 2006/02/19 |
| | | ---------- |
| | | - Updated localizations |
| | | - Applied patch of Anders Karlsson |
| | | - Applied patch of Jacob Brunson |
| | | - Applied patch for virtuser_query by Robin Elfrink |
| | | - Added support for References header (patch by Auke) |
| | | - Added support for mbstring module by Tadashi Jokagi |
| | | - Added function for automatic remove of slashes on GET and POST vars |
| | | if magic_quotes is enabled |
| | | |
| | | |
| | | |
| | | 2006/02/05 |
| | | ---------- |
| | | - Added Slovak, Hungarian, Bosnian and Croation translation |
| | | - Fixed bug when inserting signatures with !?& |
| | | - Chopping message headers before inserting into the message cache table (to avoid bugs in Postgres) |
| | | - Chopping message headers before inserting into the message cache table |
| | | (to avoid bugs in Postgres) |
| | | - Allow one-char domains in e-mail addresses |
| | | - Make product name in page title configurable |
| | | - Make username available as skin object |
| | | - Added session_write_close() in rcube_db class destructor to avoid problems in PHP 5.0.5 |
| | | - Use move_uploaded_file() instead of copy() for a more secure handling of uploaded attachments |
| | | - Added session_write_close() in rcube_db class destructor to avoid problems |
| | | in PHP 5.0.5 |
| | | - Use move_uploaded_file() instead of copy() for a more secure handling of |
| | | uploaded attachments |
| | | - Additional config parameter to show/hide deleted messages |
| | | - Added periodic request for checking new mails (Request #1307821) |
| | | - Added EXPUNGE command |
| | |
| | | - Skip sender-address as recipient when Reply-to-all |
| | | - Fixes in utf8-class |
| | | - Added patch for Quota display by Aury Fink Filho <nuny@aury.com.br> |
| | | - Added garbage collector for message cache |
| | | - Added patches for BCC headers |
| | | |
| | | |
| | | 2005/12/16 |
| | | ---------- |
| | | - Added Turkish and Simplified Chinese translation |
| | | - Use virtusertable to resolve e-mail addresses at login |
| | | - Configurable mail_domain used to compose correct e-mail addresses on first login |
| | | - Configurable mail_domain used to compose correct e-mail addresses |
| | | on first login |
| | | |
| | | |
| | | 2005/12/03 |
| | | ---------- |
| | | - Added Finnish, Romanian, Polish, Czech, British, Norwegian, Greek, Russian, Estonian and Chinese translation |
| | | - Added Finnish, Romanian, Polish, Czech, British, Norwegian, Greek, Russian, |
| | | Estonian and Chinese translation |
| | | - Get IMAP server capabilities in array |
| | | - Check for NAMESPACE capability before sending command |
| | | - Set default user language from config 'locale_string' |
| | |
| | | ---------- |
| | | - Write list header to client even if list is empty |
| | | - Add functions "select all", "select none" to message list |
| | | - Improved filter for HTML messages to remove potentially malicious tags (script, iframe, object) and event handlers. |
| | | - Improved filter for HTML messages to remove potentially malicious tags |
| | | (script, iframe, object) and event handlers. |
| | | - Buttons for next/previous message in view mode |
| | | - Add new created contact to list and show confirmation status |
| | | - Added folder management (subscribe/create/delete) |
| | |
| | | CREATE TABLE "cache" ( |
| | | cache_id integer DEFAULT nextval('cache_ids'::text) PRIMARY KEY, |
| | | user_id integer NOT NULL REFERENCES users (user_id), |
| | | session_id character varying(40) REFERENCES "session" (session_id), |
| | | session_id character varying(40) REFERENCES "session" (sess_id), |
| | | cache_key character varying(128) DEFAULT ''::character varying NOT NULL, |
| | | created timestamp with time zone DEFAULT now() NOT NULL, |
| | | data text NOT NULL |
| | |
| | | // Path to a virtuser table file to resolve user names and e-mail addresses |
| | | $rcmail_config['virtuser_file'] = ''; |
| | | |
| | | // Query to resolve user names and e-mail addresses from the database |
| | | // %u will be replaced with the current username for login. |
| | | // The query should select the user's e-mail address as first col |
| | | $rcmail_config['virtuser_query'] = ''; |
| | | |
| | | // use this host for sending mails. |
| | | // to use SSL connection, set ssl://smtp.host.com |
| | | // if left blank, the PHP mail() function is used |
| | |
| | | /* |
| | | +-----------------------------------------------------------------------+ |
| | | | RoundCube Webmail IMAP Client | |
| | | | Version 0.1-20060104 | |
| | | | Version 0.1b-20060219 | |
| | | | | |
| | | | Copyright (C) 2005, RoundCube Dev. - Switzerland | |
| | | | Licensed under the GNU GPL | |
| | |
| | | |
| | | */ |
| | | |
| | | define('RCMAIL_VERSION', '0.1-20060104'); |
| | | define('RCMAIL_VERSION', '0.1b-20060219'); |
| | | |
| | | |
| | | // define global vars |
| | |
| | | // PEAR::setErrorHandling(PEAR_ERROR_TRIGGER, E_USER_NOTICE); |
| | | |
| | | |
| | | // strip magic quotes from Superglobals... |
| | | if ((bool)get_magic_quotes_gpc()) // by "php Pest" |
| | | { |
| | | // Really EGPCSR - Environment $_ENV, GET $_GET , POST $_POST, Cookie $_COOKIE, Server $_SERVER |
| | | // and their HTTP_*_VARS cousins (separate arrays, not references) and $_REQUEST |
| | | $fnStripMagicQuotes = create_function( |
| | | '&$mData, $fnSelf', |
| | | 'if (is_array($mData)) { foreach ($mData as $mKey=>$mValue) $fnSelf($mData[$mKey], $fnSelf); return; } '. |
| | | '$mData = stripslashes($mData);' |
| | | ); |
| | | |
| | | // do each set of EGPCSR as you find necessary |
| | | $fnStripMagicQuotes($_POST, $fnStripMagicQuotes); |
| | | $fnStripMagicQuotes($_GET, $fnStripMagicQuotes); |
| | | } |
| | | |
| | | |
| | | // catch some url/post parameters |
| | | $_auth = !empty($_POST['_auth']) ? $_POST['_auth'] : $_GET['_auth']; |
| | | $_task = !empty($_POST['_task']) ? $_POST['_task'] : (!empty($_GET['_task']) ? $_GET['_task'] : 'mail'); |
| | |
| | | session_start(); |
| | | $sess_id = session_id(); |
| | | |
| | | $_SESSION['user_lang'] = rcube_language_prop($CONFIG['locale_string']); |
| | | // create session and set session vars |
| | | if (!$_SESSION['client_id']) |
| | | { |
| | |
| | | $lang = $rcube_language_aliases[$lang]; |
| | | |
| | | // try the first two chars |
| | | if (!isset($rcube_languages[$lang]) && strlen($lang>2)) |
| | | if (!isset($rcube_languages[$lang]) && strlen($lang)>2) |
| | | { |
| | | $lang = substr($lang, 0, 2); |
| | | $lang = rcube_language_prop($lang); |
| | |
| | | $charset = $rcube_charsets[$lang]; |
| | | else |
| | | $charset = 'UTF-8'; |
| | | |
| | | |
| | | if ($prop=='charset') |
| | | return $charset; |
| | |
| | | // set localization charset based on the given language |
| | | function rcmail_set_locale($lang) |
| | | { |
| | | global $OUTPUT; |
| | | global $OUTPUT, $MBSTRING, $MBSTRING_ENCODING; |
| | | static $s_mbstring_loaded = NULL; |
| | | |
| | | // settings for mbstring module (by Tadashi Jokagi) |
| | | if ($s_mbstring_loaded===NULL) |
| | | { |
| | | if ($s_mbstring_loaded = extension_loaded("mbstring")) |
| | | { |
| | | $MBSTRING = TRUE; |
| | | if (function_exists("mb_mbstring_encodings")) |
| | | $MBSTRING_ENCODING = mb_mbstring_encodings(); |
| | | else |
| | | $MBSTRING_ENCODING = array("ISO-8859-1", "UTF-7", "UTF7-IMAP", "UTF-8", |
| | | "ISO-2022-JP", "EUC-JP", "EUCJP-WIN", |
| | | "SJIS", "SJIS-WIN"); |
| | | |
| | | $MBSTRING_ENCODING = array_map("strtoupper", $MBSTRING_ENCODING); |
| | | if (in_array("SJIS", $MBSTRING_ENCODING)) |
| | | $MBSTRING_ENCODING[] = "SHIFT_JIS"; |
| | | } |
| | | else |
| | | { |
| | | $MBSTRING = FALSE; |
| | | $MBSTRING_ENCODING = array(); |
| | | } |
| | | } |
| | | |
| | | if ($MBSTRING && function_exists("mb_language")) |
| | | { |
| | | if (!mb_language(strtok($lang, "_"))) |
| | | $MBSTRING = FALSE; // unsupport language |
| | | } |
| | | |
| | | $OUTPUT->set_charset(rcube_language_prop($lang, 'charset')); |
| | | } |
| | | |
| | |
| | | |
| | | $user_name = $user!=$user_email ? $user : ''; |
| | | |
| | | // also create a new identity record |
| | | // try to resolve the e-mail address from the virtuser table |
| | | if (!empty($CONFIG['virtuser_query'])) |
| | | { |
| | | $sql_result = $DB->query(preg_replace('/%u/', $user, $CONFIG['virtuser_query'])); |
| | | if ($sql_arr = $DB->fetch_array($sql_result)) |
| | | $user_email = $sql_arr[0]; |
| | | } |
| | | |
| | | // also create new identity records |
| | | $DB->query("INSERT INTO ".get_table_name('identities')." |
| | | (user_id, del, standard, name, email) |
| | | VALUES (?, 0, 1, ?, ?)", |
| | | $user_id, |
| | | $user_name, |
| | | $user_email); |
| | | |
| | | |
| | | // get existing mailboxes |
| | | $a_mailboxes = $IMAP->list_mailboxes(); |
| | |
| | | closedir($dh); |
| | | } |
| | | } |
| | | |
| | | return $sa_languages; |
| | | } |
| | | |
| | |
| | | // this function is not complete and not tested well |
| | | function rcube_charset_convert($str, $from, $to=NULL) |
| | | { |
| | | global $MBSTRING, $MBSTRING_ENCODING; |
| | | |
| | | $from = strtoupper($from); |
| | | $to = $to==NULL ? strtoupper($GLOBALS['CHARSET']) : strtoupper($to); |
| | | |
| | | if ($from==$to) |
| | | return $str; |
| | | |
| | | // convert charset using iconv module |
| | | if (function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7') { |
| | | return iconv($from, $to, $str); |
| | | // convert charset using mbstring module |
| | | if ($MBSTRING) |
| | | { |
| | | $to = $to=="UTF-7" ? "UTF7-IMAP" : $to; |
| | | $from = $from=="UTF-7" ? "UTF7-IMAP": $from; |
| | | |
| | | if (in_array($to, $MBSTRING_ENCODING) && in_array($from, $MBSTRING_ENCODING)) |
| | | return mb_convert_encoding($str, $to, $from); |
| | | } |
| | | |
| | | // convert charset using iconv module |
| | | if (function_exists('iconv') && $from!='UTF-7' && $to!='UTF-7') |
| | | return iconv($from, $to, $str); |
| | | |
| | | $conv = new utf8(); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | function rcmail_charset_selector($attrib) |
| | | { |
| | | // pass the following attributes to the form class |
| | |
| | | |
| | | $charsets = array( |
| | | 'US-ASCII' => 'ASCII (English)', |
| | | 'X-EUC-JP' => 'EUC-JP (Japanese)', |
| | | 'EUC-JP' => 'EUC-JP (Japanese)', |
| | | 'EUC-KR' => 'EUC-KR (Korean)', |
| | | 'BIG5' => 'BIG5 (Chinese)', |
| | | 'GB2312' => 'GB2312 (Chinese)', |
| | | 'ISO-2022-JP' => 'ISO-2022-JP (Japanese)', |
| | | 'ISO-8859-1' => 'ISO-8859-1 (Latin-1)', |
| | | 'ISO-8859-2' => 'ISO-8895-2 (Central European)', |
| | | 'ISO-8859-7' => 'ISO-8859-7 (Greek)', |
| | |
| | | { |
| | | $mailbox = $this->_mod_mailbox($mbox); |
| | | |
| | | // make shure mailbox exists |
| | | // make sure mailbox exists |
| | | if (in_array($mailbox, $this->_list_mailboxes())) |
| | | $saved = iil_C_Append($this->conn, $mailbox, $message); |
| | | |
| | |
| | | $to_mbox = $this->_mod_mailbox($to_mbox); |
| | | $from_mbox = $from_mbox ? $this->_mod_mailbox($from_mbox) : $this->mailbox; |
| | | |
| | | // make shure mailbox exists |
| | | // make sure mailbox exists |
| | | if (!in_array($to_mbox, $this->_list_mailboxes())) |
| | | { |
| | | if (in_array(strtolower($to_mbox), $this->default_folders)) |
| | | $this->create_mailbox($to_mbox, TRUE); |
| | | else |
| | | return FALSE; |
| | | } |
| | | |
| | | // convert the list of uids to array |
| | | $a_uids = is_string($uids) ? explode(',', $uids) : (is_array($uids) ? $uids : NULL); |
| | |
| | | $key, |
| | | $index, |
| | | $headers->uid, |
| | | substr($this->decode_header((string)$headers->subject, TRUE), 0, 128), |
| | | substr($this->decode_header((string)$headers->from, TRUE), 0, 128), |
| | | substr($this->decode_header((string)$headers->to, TRUE), 0, 128), |
| | | substr($this->decode_header((string)$headers->cc, TRUE), 0, 128), |
| | | substr((string)$this->decode_header($headers->subject, TRUE), 0, 128), |
| | | substr((string)$this->decode_header($headers->from, TRUE), 0, 128), |
| | | substr((string)$this->decode_header($headers->to, TRUE), 0, 128), |
| | | substr((string)$this->decode_header($headers->cc, TRUE), 0, 128), |
| | | (int)$headers->size, |
| | | serialize($headers)); |
| | | } |
| | |
| | | |
| | | function set_charset($charset) |
| | | { |
| | | global $MBSTRING; |
| | | $this->charset = $charset; |
| | | if ($MBSTRING&&function_exists( "mb_internal_encoding")) |
| | | { |
| | | if(!@mb_internal_encoding( $charset)) |
| | | { |
| | | $MBSTRING = FALSE; |
| | | } |
| | | } |
| | | } |
| | | |
| | | function get_charset() |
| | |
| | | - Parse charset from content-type in iil_C_FetchHeaders() |
| | | - Enhanced heaer sorting |
| | | - Pass message as reference in iil_C_Append (to save memory) |
| | | - Added BCC to the list of headers to fetch in iil_C_FetchHeaders() |
| | | - Added BCC and REFERENCE to the list of headers to fetch in iil_C_FetchHeaders() |
| | | - Leave messageID unchanged in iil_C_FetchHeaders() |
| | | - Avoid stripslahes in iil_Connect() |
| | | - Removed some debuggers (echo ...) |
| | | |
| | | ********************************************************/ |
| | |
| | | $iil_errornum = 0; |
| | | |
| | | //strip slashes |
| | | $user = stripslashes($user); |
| | | $password = stripslashes($password); |
| | | // $user = stripslashes($user); |
| | | // $password = stripslashes($password); |
| | | |
| | | //set auth method |
| | | $auth_method = "plain"; |
| | |
| | | |
| | | /* FETCH date,from,subject headers */ |
| | | $key="fh".($c++); |
| | | $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID)])\r\n"; |
| | | $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE MESSAGE-ID REFERENCE)])\r\n"; |
| | | |
| | | if (!fputs($fp, $request)) return false; |
| | | do{ |
| | |
| | | $result[$id]->encoding = str_replace("\n", " ", $headers["content-transfer-encoding"]); |
| | | $result[$id]->ctype = str_replace("\n", " ", $headers["content-type"]); |
| | | $result[$id]->in_reply_to = ereg_replace("[\n<>]",'', $headers['in-reply-to']); |
| | | $result[$id]->reference = $headers["reference"]; |
| | | |
| | | list($result[$id]->ctype, $ctype_add) = explode(";", $headers["content-type"]); |
| | | |
| | |
| | | $result[$id]->charset = $regs[1]; |
| | | |
| | | $messageID = $headers["message-id"]; |
| | | if ($messageID) $messageID = substr(substr($messageID, 1), 0, strlen($messageID)-2); |
| | | else $messageID = "mid:".$id; |
| | | if (!$messageID) "mid:".$id; |
| | | $result[$id]->messageID = $messageID; |
| | | } |
| | | else { |
| | |
| | | $REPLY_MESSAGE = &$MESSAGE; |
| | | $_SESSION['compose']['reply_uid'] = $_GET['_reply_uid']; |
| | | $_SESSION['compose']['reply_msgid'] = $REPLY_MESSAGE['headers']->messageID; |
| | | $_SESSION['compose']['reference'] = $REPLY_MESSAGE['headers']->reference; |
| | | $_SESSION['compose']['references'] .= !empty($REPLY_MESSAGE['headers']->reference) ? ' ' : ''; |
| | | $_SESSION['compose']['references'] .= $REPLY_MESSAGE['headers']->messageID; |
| | | |
| | | if ($_GET['_all']) |
| | | $REPLY_MESSAGE['reply_all'] = 1; |
| | |
| | | if (strlen($identity_arr['reply-to'])) |
| | | $headers['Reply-To'] = $identity_arr['reply-to']; |
| | | |
| | | if ($_SESSION['compose']['reply_msgid']) |
| | | if (!empty($_SESSION['compose']['reply_msgid'])) |
| | | $headers['In-Reply-To'] = $_SESSION['compose']['reply_msgid']; |
| | | |
| | | if (!empty($_SESSION['compose']['references'])) |
| | | $headers['References'] = $_SESSION['compose']['references']; |
| | | |
| | | if ($_POST['_priority']) |
| | | { |
| | |
| | | $MAIL_MIME->addAttachment($filepath, $files['type'][$i], $files['name'][$i], TRUE); |
| | | |
| | | |
| | | // chose transfer encoding |
| | | $charset_7bit = array('ASCII', 'ISO-2022-JP', 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-15'); |
| | | $transfer_encoding = in_array(strtoupper($message_charset), $charset_7bit) ? '7bit' : '8bit'; |
| | | |
| | | // encoding settings for mail composing |
| | | $message_param = array('text_encoding' => '8bit', |
| | | $message_param = array('text_encoding' => $transfer_encoding, |
| | | 'html_encoding' => 'quoted-printable', |
| | | 'head_encoding' => 'quoted-printable', |
| | | 'head_charset' => $message_charset, |
| | |
| | | |
| | | // compose message body and get headers |
| | | $msg_body = $MAIL_MIME->get($message_param); |
| | | $msg_subject = $headers['Subject']; |
| | | |
| | | $msg_subject = $headers['Subject']; |
| | | global $MBSTRING; |
| | | if ($MBSTRING&&function_exists( "mb_encode_mimeheader")) |
| | | $headers['Subject'] = mb_encode_mimeheader( $headers['Subject'],$message_charset); |
| | | |
| | | // send thru SMTP server using cusotm SMTP library |
| | | if ($CONFIG['smtp_server']) |