# FILE: src-board-subs-9 #------------------------------------------------------------------------------- # This script is copyright (c) 1998 by DiscusWare, LLC, all rights reserved. # Its use is subject to the license agreement that can be found at the following # URL: http://www.chem.hope.edu/discus/license #------------------------------------------------------------------------------- #---SEPARATOR---# #REQ:get_date_time sub post_message { local ($topic_number, $me_number, $message_hold, $newmessage, $postby, $username, $group, $datestring_in, $timepostin, $ra, $rh) = @_; local ($datetime, @message, $line, $postindex); open (LOG, "$admin_dir/log.txt"); @LOG = ; close (LOG); $i = scalar(@LOG); $le = $LOG[$i-1]; $le =~ m|^(\d+);|; $lp = $1; &lock("$admin_dir/postindex.txt"); open (FILE, "$admin_dir/postindex.txt"); $postindex = ; close (FILE); if ($postindex >= $lp) { ++$postindex; } else { $postindex = $lp + 1; } open (FILE, ">$admin_dir/postindex.txt"); print FILE $postindex; close (FILE); &unlock("$admin_dir/postindex.txt"); $datetime = &get_date_time("long", $timepostin); $datetime = $datestring_in if $datestring_in ne ""; $timepostin = time if $timepostin == 0; &lock("$message_dir/$topic_number/$me_number.$ext"); local ($head, $color, $lm, $ann, $ann_src, $sublist, $about, $about_src, $message, $message_src) = &get_page($topic_number, $me_number); @rm = split(/,/, $GLOBAL_OPTIONS{'reverse_msgs'}); if (grep(/^$topic_number$/, @rm)) { $message2 = $message; $message = ""; } $message .= "\n"; $message .= "\n"; $message .= "
\n"; $pb = $L{POSTBY}; $pb =~ s/\%name/$postby/g; $pb =~ s/\%date/$datetime/g; $message .= "$pb

\n"; $message .= "$newmessage\n"; $message .= "\n"; if (grep(/^$topic_number$/, @rm)) { $message .= $message2; } $ctr = 0; $message_hold = " $message_hold"; while ($message_hold =~ /([^\\])\\image\{([^\}]*)\}/) { $ch = $1; $tag = $2; ++$ctr; $tag =~ s/\\//g; $tag =~ s/\{//g; $tag =~ s/\}//g; $message_hold = $` . "$ch\\image_notuploaded{$ctr,$tag}" . $'; } if ($L{IMAGE_TAG_NAME} ne "image" && $L{IMAGE_TAG_NAME} ne "") { $trep = $L{IMAGE_TAG_NAME}; while ($message_hold =~ /([^\\])\\$trep\{([^\}]*)\}/) { $ch = $1; $tag = $2; $tag =~ s/\\//g; $tag =~ s/\{//g; $tag =~ s/\}//g; ++$ctr; $message_hold = $` . "$ch\\image_notuploaded{$ctr,$tag}" . $'; } } if ($pro) { while ($message_hold =~ /([^\\])\\attach\{([^\}]*)\}/) { $ch = $1; $tag = $2; ++$ctr; $tag =~ s/\\//g; $tag =~ s/\{//g; $tag =~ s/\}//g; $message_hold = $` . "$ch\\attachment_notuploaded{$ctr,$tag}" . $'; } if ($L{ATTACH_TAG_NAME} ne "attach" && $L{ATTACH_TAG_NAME} ne "") { $trep = $L{ATTACH_TAG_NAME}; while ($message_hold =~ /([^\\])\\$trep\{([^\}]*)\}/) { $ch = $1; $tag = $2; $tag =~ s/\\//g; $tag =~ s/\{//g; $tag =~ s/\}//g; ++$ctr; $message_hold = $` . "$ch\\attachment_notuploaded{$ctr,$tag}" . $'; } } } local ($chars, $poststr, $message_hold_2); $message_hold =~ s/^\s+//; $message_hold =~ s/\s+$//; $message_hold_2 = $message_hold; $message_hold_2 .= " "; $poststr = &remove_html($postby, 1); $poststr = &escape($poststr); $nmtemp = $newmessage; $nmtemp = &remove_html($newmessage, 1); $nmtemp .= " "; $nmtemp =~ m|^([\s\S]{0,40})\s|; $chars = $1; $chars =~ s/^\s+//; $chars =~ s/\s+$//; $chars = &escape($chars); $message_hold = &escape($message_hold); $message_src .= "\n$message_hold\n\n"; &set_page($topic_number, $me_number, $head, $color, $lm, $ann, $ann_src, $sublist, $about, $about_src, $message, $message_src); &unlock("$message_dir/$topic_number/$me_number.$ext"); &lock("$admin_dir/log.txt"); $ra = $ENV{'REMOTE_ADDR'} if !$ra; $rh = $ENV{'REMOTE_HOST'} if !$rh; open (LOG, ">>$admin_dir/log.txt"); print LOG "$postindex;$username:$group;$timepostin;$topic_number/$me_number;$ra;$rh;$chars;$poststr\n"; close (LOG); &unlock("$admin_dir/log.txt"); &ex('auto_prune', $topic_number, $me_number, $message) if $pro; return ($postindex, &unescape($message_hold)); } #---SEPARATOR---# sub get_date_time { local ($format, $timer, $block_tz) = @_; local ($months, $weekdays, $ampm, $time_string); $timer = time if $timer == 0; $timer += ($GLOBAL_OPTIONS{'timezone'}*3600) if $block_tz != 591; local ($sec, $min, $hour, $day, $nmonth, $year, $wday, $yday, $isdst) = localtime($timer); if ($L{HRCLOCK} == 12) { if ($hour > 12) { $hour -= 12; $ampm = $L{PM}; } elsif ($hour == 12) { $ampm = $L{PM}; } else { $ampm = $L{AM}; } $hour = 12 if $hour == 0; } $year += 1900; $week = $DAY[$wday]; $month = $MONTH[$nmonth]; $nmonth += 1; $min = "0$min" if $min < 10; $hour = "0$hour" if $hour < 10; $ls = $L{LONGDATE} if $format eq "long"; $ls = $L{SHORTDATE} if $format eq "short"; $ls = $L{REALSHORTDATE} if $format eq "realshort"; $ls = $L{DATEONLY} if $format eq "dateonly"; $ls =~ s/\%weekday/$week/g; $ls =~ s/\%hour/$hour/g; $ls =~ s/\%minute/$min/g; $ls =~ s/\%month/$month/g; $ls =~ s/\%nmonth/$nmonth/g; $ls =~ s/\%year/$year/g; $ls =~ s/\%ampm/$ampm/g; $ls =~ s/\%day/$day/g; $ls =~ s/\s+$//; return ($ls); } #---SEPARATOR---# sub get_number { local ($num); &lock("$admin_dir/data.txt"); open(NUMBER,"$admin_dir/data.txt") || &error_message("File Error", "Cannot open data index file ($admin_dir/data.txt)"); $num = ; close(NUMBER); if ($num >= 99999999) { $num = "1"; } else { $num++; } open(NUMBER,">" . "$admin_dir/data.txt") || &error_message("File Error", "Cannot write data index file ($admin_dir/data.txt)"); print NUMBER $num; close(NUMBER); &unlock("$admin_dir/data.txt"); return $num; } #---SEPARATOR---# sub check_owner { local ($user,$owner) = @_; local ($ownit,$line,$curown,$group,@group_data,$username,$group_name); $ownit = 0; &lock("$admin_dir/groups.txt"); open (GROUPFILE, "$admin_dir/groups.txt") || &error_message("Error", "Cannot open group file."); @group_data = ; close (GROUPFILE); &unlock("$admin_dir/groups.txt"); foreach $group (@group_data) { ($username, $group_name) = split(/;/, $group); if ($username eq $user && $owner eq $group_name) { return; } } &error_message("Permissions error", "You are not a member of the group that owns the requested topic!"); } #---SEPARATOR---# sub extract_colorsonly { local ($line, $filename, @file); local (%v,$basefont,$basesize); $filename = "$message_dir/board-topics.html"; open (FILEEXTR, "$filename") || &error_message("Extract Error", "Couldn't open top file (board-topics.html)", 1); @file = ; close (FILEEXTR); if (($bl) = grep(/|) { $v{'8'} = $1; $v{'7'} = $2; } else { $v{'7'} = "Verdana,Arial,Helvetica"; $v{'8'} = 2; } } else { $v{'7'} = "Verdana,Arial,Helvetica"; $v{'8'} = 2; } return ($v{'1'},$v{'2'},$v{'3'},$v{'4'},$v{'5'}, $v{'7'}, $v{'8'}, $v{'6'}); } #---SEPARATOR---# sub verify_user_password { local ($username, $guess, $nocookies, $cookieset) = @_; $username =~ tr/A-Z/a-z/; $guess =~ tr/A-Z/a-z/; undef @result_out; open(PASSWD,"$admin_dir/passwd.txt"); @passwd_line = ; close(PASSWD); foreach $line (@passwd_line) { $ok = ""; chop $line if $line =~ m|\n$|; ($user, $pass, $full, $email, $editing) = split(/:/, $line); if ($user eq $username) { $test_pass = crypt($guess, $pass); $ok = ""; $ok = "Yes" if $test_pass eq $pass; $ok = "No" if $guess eq ""; $ok = "No" if $pass eq ""; $ok = "Yes" if ($COOKIE{'pass' . $COOKIE_ID} eq crypt($pass, "cookie") && !$nocookies); $ok = "Yes" if ($COOKIE{'pass' . $COOKIE_ID} eq crypt($pass, "cookie") && $guess eq "adminlogin"); $ok = "Yes" if ($COOKIE{'cpwd' . $COOKIE_ID} eq crypt($pass, "cookie") && !$nocookies); if ($ok eq "Yes") { push (@result_out, "PASSWD:$line"); if ($editing > 2) { $editing -= 2; &ex('save_profile_information', "", "", "", $editing, "", "", "", "PASSWD:$line"); } } &ex('read_profile', "$user-MODERATOR", 1) if ($pro == 1 && $ok eq "Yes"); if ($COOKIE{'user' . $COOKIE_ID} ne $user && $ok eq "Yes" && !$cookieset) { &print_cookie_string($user); } if ($COOKIE{'cpwd' . $COOKIE_ID} ne crypt($pass, "cookie") && $ok eq "Yes" && !$cookieset) { &print_cookie_string("", length($guess), $pass) if $guess ne ""; &print_cookie_string("", length($COOKIE{'rpwd' . $COOKIE_ID}), $pass) if $guess eq ""; } } } open (PASSWD, "$admin_dir/users.txt"); @users = ; close (PASSWD); foreach $line (@users) { chop ($line) if $line =~ /\n/; $ok = ""; ($user, $pass, $em, $fu, $editing, $en, $lc, $group) = split(/:/, $line); if ($user eq $username) { $test_pass = crypt($guess, $pass); $ok = "Yes" if $test_pass eq $pass; $ok = "No" if $guess eq ""; $ok = "No" if $pass eq ""; $ok = "Yes" if ($COOKIE{'cpwd' . $COOKIE_ID} eq crypt($pass, "cookie") && !$nocookies); if ($ok eq "Yes") { push (@result_out, "USERS:$line"); if ($editing > 2) { $editing -= 2; &ex('save_profile_information', "", "", "", $editing, "", "", "", "USERS:$line"); } } &ex('read_profile', "$user-$group", 1) if ($pro && $ok eq "Yes"); if ($COOKIE{'user' . $COOKIE_ID} ne $user && $ok eq "Yes" && !$cookieset) { &print_cookie_string($user); } if ($COOKIE{'cpwd' . $COOKIE_ID} ne crypt($pass, "cookie") && $ok eq "Yes" && !$cookieset) { &print_cookie_string("", length($guess), $pass) if $guess ne ""; &print_cookie_string("", length($COOKIE{'rpwd' . $COOKIE_ID}), $pass) if $guess eq ""; } } } $result = join("\n", @result_out); return $result; } #---SEPARATOR---# sub update_time { local ($topic_number, $childnum, $thisnum, $datestring, $printeddate, $recursing) = @_; local ($line, @file, $olddate, $parentnum, $filename); $secure = 1 if (!-e "$message_dir/$topic_number/$thisnum.$ext" && $thisnum ne "-TOP-"); $filename = "$message_dir/$topic_number/$thisnum.$ext"; if (!-e "$message_dir/$topic_number") { $filename = "$secdir/$topic_number/$thisnum.$ext"; $secure = 1; } else { $secure = 0; } $filename = "$message_dir/board-topics.html" if $thisnum eq "-TOP-"; &lock($filename); if ($thisnum ne "-TOP-") { local ($head, $color, $lm, $ann, $ann_src, $sublist, $about, $about_src, $message, $message_src) = &get_page($topic_number, $thisnum); @sublist = split(/\n/, $sublist); foreach $line (@sublist) { if ($line =~ m|(.*)([^<]+)<|i) { $line = join ("", $`, "$1$printeddate<", $'); } } } $sublist = join("\n", @sublist); &set_page($topic_number, $thisnum, $head, $color, $datestring, $ann, $ann_src, $sublist, $about, $about_src, $message, $message_src); if ($head =~ m||) { $parentnum = $1; if ($parentnum ne $thisnum) { &update_time ($topic_number, $thisnum, $parentnum, $datestring, $printeddate, 1); } } } else { open (FILE, "$filename"); @file = ; close (FILE); foreach $line (@file) { if ($line =~ m|/; $topic_number = $1; $line = join ("", $before, "(.*)([^<]+)|i) { $line = join ("", $`, "$1$printeddate", $'); } } } open (FILE, ">$filename.NEW"); print FILE @file; close (FILE); if (-e "$filename.NEW") { if ($platform eq "NT" || $NT || $platform =~ m|NT|i) { $code = 0; } else { $code = rename("$filename.NEW", "$filename"); } if ($code != 1 || !-e $filename) { open (FILE, "$filename.NEW"); @file = ; close (FILE); open (FILE, ">$filename"); print FILE @file; close (FILE); unlink ("$filename.NEW"); } chmod (0666, "$filename"); } } &unlock($filename); &update_time($topic_number, $topic_number, "-TOP-", $ts, $dt, 1) if $recursing == 0; } #---SEPARATOR---# #REQ:verify_user_password #REQ:verify_owner sub verify_postread_privileges { local ($topic, $username, $password, $special_password, $filename, $setcookie) = @_; local (@security, $topic_number, $ip, $usrgrp, $modgrp, @ip, $a, @ipf, $ipc, $ipf, $c, $RA, $RH); local ($poster_type, $auth, $line_return); $poster_type = 0; $auth = 0; open (SECURITY, "$admin_dir/$filename.txt"); @security = ; close (SECURITY); ($security) = grep(/^$topic:/, @security); $security =~ s/\s+$//; if ($security eq "$topic::::" || $security eq "") { return 3; } $valid_usr = 0; $valid_mod = 0; $valid_spec = 0; $valid_public = 0; $setc = (1 - $setcookie); ($topic_number, $ip, $usrgrp, $modgrp, $password_spec) = split(/:/, $security); $authorized = 0; $banned = 0; if ($ip ne "") { @ip = split(/,/, $ip); $order = ""; foreach $ip (@ip) { $a = 0; if ($ip =~ m|^!|) { $ip = $'; $ban = 1; } else { $ban = 0; } $RA = $ENV{'REMOTE_ADDR'}; $RH = $ENV{'REMOTE_HOST'}; if ($ip =~ m|~|) { @ipf = split(/~/, $ip); if ($ip =~ m|~$|) { push (@ipf, ""); } $ipc = scalar(@ipf); $a = 1; $c = 0; foreach $ipf (@ipf) { $c += 1; if ($c == 1) { if ($RA !~ m|^$ipf|i && $RH !~ m|^$ipf|i) { $a = 0; } } elsif ($c == $ipc) { if ($RA !~ m|$ipf$|i && $RH !~ m|$ipf$|i) { $a = 0; } } else { if ($RA !~ m|$ipf|i && $RH !~ m|$ipf|i) { $a = 0; } } $RA = $' if $RA =~ m|$ipf|; $RH = $' if $RH =~ m|$ipf|; } $authorized = 1 if ($a == 1 && $ban == 0); $banned = 1 if ($a == 1 && $ban != 0); } else { if ($RA eq $ip || $RH eq $ip) { $authorized = 1 if $ban == 0; $banned = 1 if $ban != 0; } } } if ($authorized == 1 && $banned == 0) { $usrgrp = "~"; $modgrp = "~"; } } if ($usrgrp ne "" || $modgrp ne "") { @u = split(/,/, $usrgrp); @p = split(/,/, $modgrp); $result = &verify_user_password($username, $password, 0, $setc); @result = split(/\n/, $result); foreach $line (@result) { chop $line if $line =~ m|\n$|; ($filen, $user, $pass, $email, $full, $foo1, $foo2, $foo3, $group) = split(/:/, $line); foreach $u (@u) { if ($filen eq "USERS" && $group eq $u) { $auth = 1; $line_return = $line if $line_return eq ""; $valid_usr = 1; } elsif ($filen eq "USERS" && $u eq "~") { $auth = 1; $line_return = $line if $line_return eq ""; $valid_usr = 1; } elsif ($authorized == 1) { $auth = 1; $line_return = $line if $line_return eq ""; $valid_usr = 1; } } foreach $u (@p) { if ($filen eq "PASSWD") { $v = &verify_owner($u, $user); if ($v || $u eq "~" || $authorized == 1) { $auth = 1; $line_return = $line if $line_return eq ""; $valid_mod = 1; } } } } } if ($password_spec ne "") { $special_password =~ tr/A-Z/a-z/; if ($special_password ne "") { $c = crypt($special_password, $password_spec); if ($c eq $password_spec) { $result = &verify_user_password($username, $password); @result = split(/\n/, $result); $auth = 1; $valid_spec = 1; } } } $poster_type = 0; $poster_type += 1 if $valid_usr; $poster_type += 2 if $valid_mod; $poster_type += 4 if $valid_spec; if ($banned == 1) { return 2 if ($authorized == 0 && $auth == 0); return 2 if ($order eq "D" && $auth == 0); return 2 if ($order eq "" && $auth == 0); } $auth = 1 if $authorized; $poster_type += 8 if $authorized; return ($auth, $line_return, $poster_type); } #---SEPARATOR---# sub options_save { $icons_on = 0; if ($GLOBAL_OPTIONS{'message_icons'}) { $icons_on = 1; $mi{'message_icon_top'} = $GLOBAL_OPTIONS{'message_icon_top'}; $mi{'message_icon_up'} = $GLOBAL_OPTIONS{'message_icon_up'}; $mi{'message_icon_down'} = $GLOBAL_OPTIONS{'message_icon_down'}; $mi{'message_icon_bottom'} = $GLOBAL_OPTIONS{'message_icon_bottom'}; $mi{'message_icon_link'} = $GLOBAL_OPTIONS{'message_icon_link'}; } foreach $key (keys(%FORM)) { next if ($key eq "action" || $key eq "username"); next if $key =~ /\W/; $val = $FORM{$key}; $val =~ s/[^\d\-\,]//g if ($key !~ m|^ip_banned| && $key !~ m|^access_log| && $key !~ m|message_icon_|); $val = 0 if $val eq ""; $GLOBAL_OPTIONS{$key} = $val; } foreach $key (keys(%GLOBAL_OPTIONS)) { if (!grep(/^$key$/, keys(%FORM))) { $GLOBAL_OPTIONS{$key} = 0 if $key !~ m|^ip_banned|; } } if ($FORM{'ip_banned_list'} eq "") { $GLOBAL_OPTIONS{'ip_banned_list'} = ""; foreach $key (keys(%GLOBAL_OPTIONS)) { $GLOBAL_OPTIONS{$key} = "" if $key =~ m|^ip_banned_|; } } if ($GLOBAL_OPTIONS{'ip_banned_list'}) { @validip = split(/,/, $GLOBAL_OPTIONS{'ip_banned_list'}); foreach $key (keys(%GLOBAL_OPTIONS)) { if ($key =~ m|^ip_banned_(\d+)|) { $m = $1; $GLOBAL_OPTIONS{$key} = "" if !grep(/^$m$/, @validip); } } } if ($FORM{'ip_banned_new'} && $FORM{'ip_banned_NEW'}) { $GLOBAL_OPTIONS{'ip_banned_list'} .= "," if $GLOBAL_OPTIONS{'ip_banned_list'} ne ""; ($num) = &ex('get_number', 1); $GLOBAL_OPTIONS{'ip_banned_list'} .= $num; $GLOBAL_OPTIONS{"ip_banned_$num"} = $FORM{'ip_banned_NEW'}; } $GLOBAL_OPTIONS{'ip_banned_new'} = ""; $GLOBAL_OPTIONS{'ip_banned_NEW'} = ""; &lock("$admin_dir/options.txt"); open (OPTIONS, ">$admin_dir/options.txt") || &error_message("Save Options Error", "Could not write to file $admin_dir/options.txt"); foreach $key (sort(keys(%GLOBAL_OPTIONS))) { print OPTIONS "$key=$GLOBAL_OPTIONS{$key}\n" if $GLOBAL_OPTIONS{$key} ne ""; } close (OPTIONS); &unlock("$admin_dir/options.txt"); if (($GLOBAL_OPTIONS{'message_icons'} && !$icons_on) || (!$GLOBAL_OPTIONS{'message_icons'} && $icons_on)) { ($bgcolor, $text, $link, $vlink, $alink, $font, $size, $bg) = &ex('extract_colorsonly', 1); &ex('change_board_colors', $bgcolor, $text, $link, $vlink, $alink, $font, $size, $bg); } elsif ($GLOBAL_OPTIONS{'message_icons'} && $icons_on) { foreach $key (keys(%mi)) { if ($GLOBAL_OPTIONS{$key} ne $mi{$key}) { ($bgcolor, $text, $link, $vlink, $alink, $font, $size, $bg) = &ex('extract_colorsonly', 1); &ex('change_board_colors', $bgcolor, $text, $link, $vlink, $alink, $font, $size, $bg); last; } } } } #---SEPARATOR---# sub email_configurator { &ex('auto_configure_email', 1); if (-e "$admin_dir/source/email.txt") { $override_flag = 1; open (EMAIL, "$admin_dir/source/email.txt"); @email = ; close (EMAIL); foreach $line (@email) { if ($line =~ m|^(\w+)=(.*)|) { $EMAIL_OPTION{$1} = $2; } } } else { &lock("$admin_dir/email.txt"); open (EMAIL, "$admin_dir/email.txt"); @email = ; close (EMAIL); foreach $line (@email) { if ($line =~ m|^(\w+)=(.*)|) { $EMAIL_OPTION{$1} = $2; } } &unlock("$admin_dir/email.txt"); $override_flag = 0; } &header; print "E-mail Configurator\n"; print '$fs\n"; print "

E-mail Configurator
\n"; print "
\n"; print "Options Manager: E-mail Configurator
\n"; if ($override_flag) { print "
$fs\n"; print "Warning! The e-mail settings are being\n"; print "obtained from the file $admin_dir/source/email.txt, which is\n"; print "read-only. If you wish to use this interface to configure e-mail\n"; print "notification, move the $admin_dir/source/email.txt file\n"; print "into your $admin_dir directory (and remove it from the\n"; print "$admin_dir/source directory).

\n"; } if ($EMAIL_OPTION{'mail_program'} eq "") { print "Warning! You have not yet configured\n"; print "e-mail notification. Where possible, suggestions based on common\n"; print "implementations of mail programs have been specified below. However,\n"; print "you must save the settings for them to take effect.

\n"; } print "This screen allows you to configure e-mail notification for your\n"; print "entire board. These parameters will be used to control all e-mail\n"; print "messages originating from this board.

\n"; print "

\n"; print "\n"; print "\n"; print "
$fs"; print "Mail Program Location\n"; print "
This is the full path to the mail program on your server\n"; print "(we recommend using sendmail if it is available).

\n"; @sp = ("/usr/bin", "/bin", "/usr/sbin", "/sbin", "/usr/local/bin", "/usr/local/sbin", "/usr/contrib/bin", "/usr/contrib/sbin", "/usr/lib", "/lib", "/etc", "/"); $mail_prog = ""; foreach $p (@sp) { if (-x "$p/sendmail") { print "It appears that sendmail on your system is located at $p/sendmail. Unless you have a strong reason to do choose otherwise, you should choose this as the default mail program.

"; $mail_prog = "$p/sendmail"; last; } } if (!$mail_prog) { foreach $p (@sp) { if (-x "$p/mail") { print "It appears that mail on your system is located at $p/mail. Unless you have a strong reason to do choose otherwise (for example, you know where sendmail is), you should choose this as the default mail program.

"; $mail_prog = "$p/mail"; last; } } } print "Default Mail Program: $fs

\n"; print "Mail Program Settings\n"; print "
Most mail programs work properly by accepting input on the input\n"; print "stream. However, some mail programs (notably many mail programs available for\n"; print "Windows servers) require creation of a temporary file.\n"; print "

\n"; print " Send input directly into the mail program (no temporary file)
\n"; print " Send input into a temporary file\n"; print "

\n"; print "Mailing Method\n"; print "
If you have relatively few users on your board, a separate e-mail\n"; print "message can be generated for each user. However, if you have a large number\n"; print "of users, it can bog down the server significantly, so you can just send one\n"; print "message with all of the users in the BCC field.\n"; print "

\n"; print " Send a separate message to each recipient
\n"; print " Send one message with recipients listed in the BCC field
\n"; print "

If you send one message with recipients in the BCC field, you\n"; print "must provide a \"To:\" address for the message. This must be a valid\n"; print "address that you control -- this address will receive a copy of every\n"; print "notification from your board.

\n"; print "To Address:

$fs\n"; print "From Name and Address
If you are using sendmail\n"; print "as your mail program, you can make the "From:" name and address to be your\n"; print "forum name. Note that forging someone else's name is unethical and possibly\n"; print "illegal.

\n"; print "From Name:

$fs\n"; print "You can also specify this e-mail address, which will be used as both the From address\n"; print "and the Reply To address.

\n"; print "From Address:

$fs

\n"; print "Subject Line

You can choose to have the subject line be\n"; print "the navigation bar of the topic where the message was posted, or you can\n"; print "use static text.

\n"; print " Use the navigation bar as the subject line
\n"; print " Use the page title as the subject line
\n"; print " Use the following static text as the subject line:

\n"; print "

Static Text:
$fs\n"; print "Notification Content
You can choose whether or not the notifications that\n"; print "are sent contain the text of the message posted.

\n"; print " Include full text of message posted
\n"; print " DO NOT include full text of message posted
\n"; print "

\n"; print "Technical Configuration of Mail Program\n"; print "

Most sendmail programs behave similarly, and most mail\n"; print "programs behave similarly. However, if your mail program behaves differently, you\n"; print "can specify that here. Because sendmail is more universal in commands,\n"; print "we recommend using sendmail if it is available.

\n"; print "Necessary Command Line Options: If your mail program requires that anything\n"; print "be put in the command line, other than possibly the address, from address, BCC address,\n"; print "or subject line, enter those arguments here.\n"; print "

Options:
$fs

\n"; foreach $wu ('to', 'from', 'user', 'bcc', 'subject', 'reply-to') { $wdisp = $wu; $w = $wu; $w =~ s/\s//g; $w =~ s/-//g; print "\U$wdisp\E

\n"; if ($wu eq "user") { print "This option controls the \"from\" e-mail address on those systems where this must be passed separately (such as BLAT). This is not generally used for mail or sendmail.

\n"; } elsif ($wu eq "to") { print "This option controls the \"to\" e-mail address and is used on all platforms.

\n"; } elsif ($wu eq "from") { print "This option controls the \"from\" name (and e-mail address if placed in the input stream) and is used on most platforms.

\n"; } elsif ($wu eq "bcc") { print "This option controls the \"blind carbon copy\" e-mail address, used for the \"one message\" option above, and is used on most platforms.

\n"; } elsif ($wu eq "reply-to") { print "This option controls the \"reply to\" e-mail address and is used on most platforms.

\n"; } elsif ($wu eq "subject") { print "This option controls the \"subject line\" and is used on all platforms.

\n"; } print " \n"; print "$fs", " in the input stream
\n"; print " $fs on the command line
\n"; print " Do not use this parameter"; print "

\n"; } print "

\n"; print "Test Parameters
You can test the parameters you specified above\n"; print "by sending a sample message to yourself. Enter your e-mail address in the blank\n"; print "below and then click the "Test" button. If you get an error message of any kind, then\n"; print "this is not correctly configured.

\n"; print "Your Address: $fs

\n"; print "Save Parameters

When you know that your parameters above work properly,\n"; print "you can save them to begin using them immediately.

\n"; print "

"; print "

\n"; exit(0); }