diff -ruN nocc-0.9.5/conf.php nocc-0.9.5-kos/conf.php --- nocc-0.9.5/conf.php Wed Dec 31 19:00:00 1969 +++ nocc-0.9.5-kos/conf.php Tue Nov 27 23:36:26 2001 @@ -0,0 +1,209 @@ + + * Copyright 2001 Olivier Cahagne + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + +// ################### This is the main configuration for NOCC ########## // + +// ==> Required parameters + +// Default smtp server and smtp_port (default is 25) +// If a domain has no smtp server, this one will be used +// If no smtp server is provided, Nocc will default to the mail() function, +// and try to use Sendmail or any other MTA (Postfix) +//$default_smtp_server = 'localhost'; +//$default_smtp_port = 25; + +// List of domains people can log in +// You can have as many domains as you need + +// $domains[0]->domain = 'sourceforge.net'; +// domain name e.g 'sourceforge.net'. This field is used when sending message +// +// $domains[0]->in = 'mail.sourceforge.net:110/pop3'; +// imap or pop3 server name + port + protocol (only if not imap) +// [server_name]:[port number]/[protocol] +// ex for an imap server : mail.sourceforge.net:143 +// ex for an ssl imap server : mail.sourceforge.net:993/ssl +// ex for an ssl imap server with a self-signed certificate : mail.sourceforge.net:993/ssl/novalidate-cert +// ex for a pop3 server : mail.sourceforge.net:110/pop3 +// ex for an ssl pop3 server : mail.sourceforge.net:995/pop3/ssl +// ex for an ssl pop3 server with a self-signed certificate : mail.sourceforge.net:995/pop3/ssl/novalidate-cert +// protocol can only be pop3 +// +// $domains[0]->smtp = 'smtp.isp.com'; +// Optional: smtp server name or IP address +// Leave empty to send mail via sendmail +// +// $domains[0]->smtp_port = 25; +// Port number to connect to smtp server (usually 25) + +$domains[0]->domain = 'dom1.net'; +$domains[0]->in = 'mail.dom1.net:110/pop3'; +$domains[0]->smtp = 'mail.dom1.net'; +$domains[0]->smtp_port = 25; + +$domains[1]->domain = 'dom2.com'; +$domains[1]->in = 'mail.dom2.com:110/pop3'; +$domains[1]->smtp = 'mail.dom2.com'; +$domains[1]->smtp_port = 25; + +$domains[2]->domain = 'dom3.com'; +$domains[2]->in = 'mail.dom3.com:110/pop3'; +$domains[2]->smtp = 'mail.dom3.com'; +$domains[2]->smtp_port = 25; + +// Default tmp directory (where to store temporary uploaded files) +// This should be something like '/tmp' on Unix System +// And 'c:\\temp' on Win32 (note that we must escape "\") +$tmpdir = '/tmp'; + +// Preferences data directory +// IMPORTANT: This directory must exist and be writable by the user +// the webserver is running as (e.g. 'apache', or 'nobody'). For +// Apache, see the User directive in the httpd.conf file. +// See README for more about this. +// This should be something like 'profiles/' on Unix System +// or 'prefs\\' on Win32 (note that we must escape "\") +// If left empty, preferences will be disabled. +$prefs_dir = ''; + +// Default folder to go first +$default_folder = 'INBOX'; + +// ===> End of required parameters +// The following parameters can be changed but it's not necessary to +// get a working version of nocc + +// if browser has no preferred language, we use the default language +// This is only needed for browsers that don't send any preferred +// language such as W3 Amaya +$default_lang = 'en'; + +// How many messages to display in the inbox (devel only) +$max_msg_num = 1; + +// let user see the header of a message +$use_verbose = true; + +// the user can logout or not (if nocc is used within your website +// enter 'false' here else leave 'true') +$enable_logout = true; + +// Whether or not to display attachment part number +$display_part_no = true; + +// Whether or not to display the Message/RFC822 into the attachments +// (the attachments of that part are still available even if false is set +$display_rfc822 = true; + +// If you don't want to display images (GIF, JPEG and PNG) sent as attachements +// set it to 'false' +$display_img_attach = true; + +// If you don't want to display text/plain attachments set it to 'false' +$display_text_attach = true; + +// By default the messages are sorted by date +$default_sort = '1'; + +// By default the most recent is in top ('1' --> sorting top to bottom, +// '0' --> bottom to top) +$default_sortdir = '1'; + +// For old UCB POP server, change this setting to 1 to enable +// new mail detection. Recommended: leave it to 0 for any other POP or +// IMAP server. +// See FAQ for more details. +$have_ucb_pop_server = false; + +// If you wanna make your own theme and force people to use that one, +// set $use_theme to false and fill in the $default_theme to the theme name +// you want to use +// Theme handling: allows users to choose a theme on the login page +$use_theme = true; + +// Default theme +$default_theme = 'standard'; + +// Error reporting +// Display error but no notice +$debug_level = E_ALL & ~E_NOTICE; + +// Display delete button as icon (true) or as an HTML button (false) +$delete_button_icon = true; + +// Base URL where NOCC is hosted (only needed for Xitami servers, see #463390) +$base_uri = ''; + +// ################### Messages Signature ################### // + +// This message is added to every message, the user cannot delete it +// Be careful if you modify this, do not forget to write '\r\n' to switch +// to the next line ! +$ad = "___________________________________\r\nNOCC, http://nocc.sourceforge.net"; + + +/* +################### End of Configuration #################### +********************************************************************* +################### Do not modify below this line ################### +*/ + +$nocc_version = '0.9.5-worky'; +$nocc_name = 'NOCC'; + + +if (isset($domainnum)) +{ + $domain = $domains[$domainnum]->domain; + $servr = $domains[$domainnum]->in; + $smtp_server = $domains[$domainnum]->smtp; + $smtp_port = $domains[$domainnum]->smtp_port; +} + +session_register('domainnum', 'domain', 'user', 'passwd', 'servr', 'servtype', 'port', 'theme', 'smtp_server', 'smtp_port'); + +if (empty($smtp_server)) + $smtp_server = $default_smtp_server; +if (empty($smtp_port)) + $smtp_port = $default_smtp_port; +if (empty($servr) && !empty($server) && !empty($servtype) && !empty($port)) +{ + $servtype = strtolower($servtype); + if ($servtype != 'imap') + $servr = $server.'/'.$servtype.':'.$port; + else + $servr = $server.':'.$port; + $domain = $server; +} + +if (!isset($folder)) + $folder = $default_folder; +if (!isset($sort)) + $sort = $default_sort; +if (!isset($sortdir)) + $sortdir = $default_sortdir; +if ($use_theme == true) +{ + if (!isset($theme)) + $theme = $default_theme; +} +else + $theme = $default_theme; +$php_session = ini_get('session.name'); +$action = isset($action) ? $action : ''; +error_reporting($debug_level); + +// Prevent mangling of uploaded attachments +set_magic_quotes_runtime(0); + +require_once ('./conf_lang.php'); +require ('./themes/'.$theme.'/colors.php'); +?> diff -ruN nocc-0.9.5/delete.php nocc-0.9.5-kos/delete.php --- nocc-0.9.5/delete.php Fri Nov 16 13:50:28 2001 +++ nocc-0.9.5-kos/delete.php Tue Nov 27 23:35:56 2001 @@ -11,11 +11,10 @@ * this file just delete the selected message(s) */ -session_register ('user', 'passwd'); require_once ('./conf.php'); require_once ('./functions.php'); -$pop = @imap_open('{' . $servr . '}INBOX', $HTTP_SESSION_VARS['user'], safestrip($HTTP_SESSION_VARS['passwd'])); +$pop = @imap_open('{' . $servr . '}INBOX', $user."@".$domain, safestrip($passwd)); $num_messages = imap_num_msg($pop); if (isset($only_one) && ($only_one == 1)) @@ -32,4 +31,4 @@ imap_close($pop, CL_EXPUNGE); header('Location: ' . $base_url . "action.php?sort=$sort&sortdir=$sortdir&lang=$lang&$php_session=" . $$php_session); -?> \ No newline at end of file +?> diff -ruN nocc-0.9.5/download.php nocc-0.9.5-kos/download.php --- nocc-0.9.5/download.php Fri Nov 16 07:08:50 2001 +++ nocc-0.9.5-kos/download.php Tue Nov 27 23:26:34 2001 @@ -17,6 +17,7 @@ require_once ('./conf.php'); require_once ('./functions.php'); $passwd = safestrip($passwd); +GLOBAL $servr; header('Content-Type: application/x-unknown-' . $mime); // IE 5.5 is weird, the line is not correct but it works @@ -25,7 +26,7 @@ else header('Content-Disposition: attachment; filename=' . urldecode($filename)); -$pop = imap_open('{'.$servr.'}'.$folder, $user, $passwd); +$pop = imap_open('{'.$servr.'}'.$folder, $user."@".$domain, $passwd); $file = imap_fetchbody($pop, $mail, $part); imap_close($pop); if ($transfer == 'BASE64') @@ -35,4 +36,4 @@ header('Content-Length: ' . strlen($file)); echo ($file); -?> \ No newline at end of file +?> diff -ruN nocc-0.9.5/functions.php nocc-0.9.5-kos/functions.php --- nocc-0.9.5/functions.php Fri Nov 16 12:09:15 2001 +++ nocc-0.9.5-kos/functions.php Tue Nov 27 23:05:57 2001 @@ -17,8 +17,9 @@ { $mailhost = $servr; require ('./conf.php'); + GLOBAL $domain; - $pop = @imap_open('{' . $mailhost . '}' . $folder, $user, $passwd); + $pop = @imap_open('{' . $mailhost . '}' . $folder, $user."@".$domain, $passwd); if ($pop == false) return (-1); else @@ -120,16 +121,19 @@ function aff_mail($servr, $user, $passwd, $folder, $mail, $verbose, $lang, $sort, $sortdir) { - $mailhost = $servr; require ('./conf.php'); require ('./check_lang.php'); GLOBAL $attach_tab; GLOBAL $PHP_SELF; $glob_body = $subject = $from = $to = $cc = $reply_to = ''; + GLOBAL $domain; + GLOBAL $servr; + $mailhost = $servr; if (setlocale (LC_TIME, $lang_locale) != $lang_locale) $default_date_format = $no_locale_date_format; - $pop = @imap_open('{' . $mailhost . '}' . $folder, $user, $passwd); + + $pop = @imap_open('{' . $mailhost . '}' . $folder, $user."@".$domain, $passwd); // Finding the next and previous message number $sorted = imap_sort($pop, $sort, $sortdir); $prev_msg = $next_msg = 0; @@ -609,8 +613,10 @@ GLOBAL $attach_tab; $i = 0; $attach_array = array(); + require ('./conf.php'); + GLOBAL $domain; - $pop = @imap_open('{'.$servr.'}'.$folder, $user, $passwd); + $pop = @imap_open('{'.$servr.'}'.$folder, $user."@".$domain, $passwd); while ($tmp = array_shift($attach_tab)) { $i++; @@ -636,7 +642,10 @@ function view_part($servr, $user, $passwd, $folder, $mail, $part_no, $transfer, $msg_charset, $charset) { - $pop = @imap_open('{' . $servr . '}' . $folder, $user, $passwd); + require ('./conf.php'); + GLOBAL $domain; + + $pop = @imap_open('{' . $servr . '}' . $folder, $user."@".$domain, $passwd); $text = imap_fetchbody($pop, $mail, $part_no); if ($transfer == 'BASE64') $str = nl2br(imap_base64($text)); diff -ruN nocc-0.9.5/get_img.php nocc-0.9.5-kos/get_img.php --- nocc-0.9.5/get_img.php Fri Nov 16 08:21:42 2001 +++ nocc-0.9.5-kos/get_img.php Tue Nov 27 23:32:17 2001 @@ -9,12 +9,12 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -session_register ('user', 'passwd'); +session_register ('user', 'passwd', 'domain'); require_once ('./conf.php'); require_once ('./functions.php'); $passwd = safestrip($passwd); -$pop = @imap_open('{'.$servr.'}INBOX', $user, $passwd); +$pop = @imap_open('{'.$servr.'}INBOX', $user."@".$domain, $passwd); $img = imap_fetchbody($pop, $mail, $num); imap_close($pop); if ($transfer == 'BASE64') @@ -24,4 +24,4 @@ header('Content-type: image/'.$mime); echo $img; -?> \ No newline at end of file +?> diff -ruN nocc-0.9.5/send.php nocc-0.9.5-kos/send.php --- nocc-0.9.5/send.php Mon Nov 19 14:14:13 2001 +++ nocc-0.9.5-kos/send.php Tue Nov 27 23:22:35 2001 @@ -179,4 +179,4 @@ } require_once ('./html/footer.php'); } -?> \ No newline at end of file +?>