#!/usr/bin/perl #!c:/perl/bin/perl.exe # The above line may need to be changed to reflect the location of # the perl interpreter on your system. Use "which perl" on a Unix system # to make a noble attempt to locate your perl interpreter. If you are # installing this on an NT IIS server then you probably do not need to # modify this line because it will most likely be ignored. Apache under # NT generally DOES require the top line to be configured. We have provided # two common paths above as examples, only the top line will be used, the # second line is just there to provide an example. ############################################################################ # MailMan, Standard Edition, version 3.0.35 # # Copyright (c) 1996 - 2001, Endymion Corporation. All rights reserved. # Endymion Corporation: http://www.endymion.com/ # by Ryan Alyn Porter, 1996 - 2001 # contributions by Stephen M Noa, 2001 # # This product is not free and is not in the public domain. # For detailed information on the licensing structure of MailMan, see # http://www.endymion.com/products/mailman/ # # Initiated: 9/07/1997 Version 1.1 # Re-awakened: 4/24/1998 Version 2.0 beta # Released: 7/20/1998 Version 2.0 # Last Modified: 7/25/2001 Version 3.0.35 ############################################################################ # If you are having problems with MailMan not working at all, please # take a look at the MailMan FAQ, stored online at # http://www.endymion.com/products/mailman/faq.htm. A version of the FAQ # should also have been in the distribution that contained this file. package mailman; # Enable these while you are working on modifications. Make absolutely # certain that 'use strict' is NOT enabled in production installations. # CGI.pm and 'use strict' are not compatible, if you have 'use strict' # enabled then your users will not be able to upload files because CGI.pm # provides uploaded files using a bizarre on-the-fly file handle that will # cause an error if you have 'use strict' enabled. We think that this is # ugly too, but there is no way around it at the moment. #use strict; #$^W = 1; # Warnings. # If you are getting mysterious "Internal Server Error" messages when # you try to run MailMan, then you might want to un-comment this line # to get a decent log of the error in a location that you can find. #BEGIN #{ # open(STDERR, 'c:/tmp/mailman_log.txt'); #} # Version information that might find its way into output. $mailman::strMailManVersion = 'v3.0.35'; $mailman::strMailManEdition = 'Standard Edition'; # Variable initialization. Clean and neat and all, but very necessary # for mod_perl. InitializeVars(); ############################################################################ # This section contains a few variables that you might need to set in order # to get MailMan functioning properly. If your installation is working, # then you don't need to worry about any of these. ############################################################################ # Location Attachments # When a user selects an attachment from a message for downloading, # MailMan generates that attachment on-the-fly and sends it through the # HTTP server to the user's browser. MailMan includes the necessary # HTTP header information for the user's browser to determine the # file name, but many broswers, most notably Microsoft's Internet # Explorer, either ignore these headers or just don't handle them # very well. The result is that when a user downloads an attachment, # your browser may present the user with a "Save As" box with the # file name filled in as the name of this script, a string or random # characters, or any number of other un-graceful things. We think that # the best solution to this problem would be for browser makers to # pay attention to HTTP headers, but until then we provide a mechanism # for working around the problem. If you set up a directory that is # writable by MailMan and readable by your web server, then MailMan # will write out the attachment file to that directory temporarily, # and redirect the user's browser to that file. When the user logs # in or out MailMan will ensure that the user's files in this # temporary directory are removed. A user that exits MailMan without # logging out and never logs back in could potentially leave stale # attachment files on the server, so occasional monitoring of the # temporary directory for stale files would be appropriate. Also note # that this mechanism could be considered a privacy problem since a # user's attachments are deposited temporarily into a world-readable # directory rather than generated on-the-fly the way MailMan normally # would do. We have left the decision up to each individual # administrator as to whether or not to use this feature. Most people # seem to prefer allowing MailMan to generate attachments on-the-fly # for simplicity, ease of administration, and security/privacy, but # some people think that the attachment file name thing is a critical # issue. The decision is yours. # IMPORTANT SECURITY ADVISORY: # Make absolutely certain that the directory that you use for # attachments does *NOT* allow executable code. Do NOT use this # method of attachment handling if you are not absolutely certain # that executable code is not allowed in that directory. If your # temporary directory allows executable code then any attachments # that end in ".cgi", ".php", ".pl", etc, may be executed by your # server when they are accessed, rather than simply served. You do # *NOT* want this. # To use this feature, create a directory that is readable by your # web server and writable by the user that MailMan runs as. Set # $mailman::strLocalLocationAttachments to the local path name of # this directory, for instance # $mailman::strLocalLocationAttachments = '/public_html/attachtmp/'; # Then set $mailman::strURLLocationAttachments to the URL location # of this directory, for instance # $mailman::strURLLocationAttachments = '/attachtmp/'; # Note the terminal slashes at the end, those are necessary. Just # set and uncomment the following lines to use this feature: #$mailman::strLocalLocationAttachments = 'c:/www/public_html/mailman/tmp/'; #$mailman::strURLLocationAttachments = '/mailman/tmp/' # Local File Permissions # Use this if you want to modify the permissions that files and # directories created by MailMan use. This will only make much sense # to Unix and Unix-like operating systems. If this value is not set, # nothing will happen. This should be an octal integer as in the # example below, not a string. # This value will only matter if you set # $mailman::strLocalLocationAttachments and # $mailman::strURLLocationAttachments, of course. $mailman::iLocalFilePermissions = 0666; # Local Directory Permissions # Same as above, used for directories created by MailMan. # This value will only matter if you set # $mailman::strLocalLocationAttachments and # $mailman::strURLLocationAttachments, of course. $mailman::iLocalDirectoryPermissions = 0777; # Outgoing Banner Text # This is the banner that is appended to the end of any message that # this MailMan installation sends. One reason why this is one of the # first configuration options is because we want to make it very # obvious that you can remove or modify this banner. Endymion places # no restrictions at all on this banner, so don't worry about leaving # credit to us in here or anything like that. Please feel free to # change this to whatever you like, or completely remove it. If this # value is not defined then it will simply append no banner. $mailman::strOutgoingBannerText = "\n" . "---------------------------------------------\n" . "This message was sent using the Spirit Lake Nation Webmail.\n" . "http://www.spiritlakenation.com/\n"; # Incoming Mail Server: # The way that we originally intended to allow people to 'rig' the server # names for an installation was through simple template modifications, as # mentioned in the FAQ. A lot of people have asked about ways to rig the # server names in the script itself though, so we added this. We aim to # please... If you want to rig your incoming server name so that it makes # no difference at all what an incoming form specifies, just un-comment # this line and specify it. $mailman::strIncomingServer = 'mail.spiritlakenation.com'; # Outgoing Mail Server: # Same deal, different server. $mailman::strOutgoingServer = 'mail.spiritlakenation.com'; # Sendmail Path: # If you would like your MailMan installation to use a local Sendmail # invocation when sending outbound mail instead of connecting to an # SMTP server, then you can un-comment this line and configure this to # point to the path of your Sendmail command. Use this if you do not # have an SMTP server running at all. # This might also work with some minor modification with other # command-line agents that support something like Sendmail's "-bs" # option, which instructs Sendmail to use the SMTP protocol via standard # input and standard output. If you have access to an SMTP server then # you are really probably better off using the wire connection instead # of this. #$mailman::strLocalLocationSendmail = '/usr/sbin/sendmail'; # From Domain Name: # Set this variable to override the domain name that is assumed when a # user logs in. For instance, when the user "rap" logs into the POP3 # server "mail5.it.endymion.com", MailMan will assume that his address # is "rap@mail5.it.endymion.com". If you set this variable to # "endymion.com", then it will assume that his address is # "rap@endymion.com" instead. If the mapping between POP3 user names # and email addresses is more complicated then you will need to actually # build your own routines to do the mapping. For instance, if the user # "endy-rap" at the POP3 server "shell1.ba.best.com" actually receives # mail at the address "rap@endymion.com", then you will need to do make # your own custom mapping routine to deal with this. #$mailman::strFromDomainName = "endymion.com"; # From Domain Trim: # If the above option doesn't work for you, you can set this value to # instruct MailMan to trim the machine name when it derives the 'from' # email address. The number that you set this to represents the total # number of names to shear off of the left-hand side of the machine # name. For instance, if the user's POP3 server name is # "mail.rex.endymion.com", and you set this value to 0, the default, # then when the user composes a message MailMan will guess # "username@mail.rex.endymion.com" as the 'from' address. If you set # this value to 1 then it will guess "username@rex.endymion.com", if # you set it to 2 then it will guess "username@endymion.com", etc. This # can be helpful if you have a number of different virtual domains # and you want the email address to be inferred dynamically, rather # than by hard-coding it with the "From Domain Name" configuration value. $mailman::iFromDomainTrim = 1; # Outgoing Domain Name: # When a user specifies a recipient name without full domain qualification # ("rap" instead of "rap@endymion.com", for example) then the SMTP server # should provide configuration rules for determining how to deal with this # mail. It should not be the responsibility of the mail client to fill in # a complete address. We have had many requests for a feature to allow # an administrator to specify a default domain name, however, and we aim # to please. This configuration variable is the result. If you want # MailMan to assume a default domain name when it is given an incomplete # address, uncomment this line and set it to your domain name. We strongly # recommend against this, however, you should be looking into your SMTP # server's configuration options and not using this feature. #$mailman::strOutgoingDomainName = 'endymion.com'; # Messages Per Page: # This value controls the number of messages returned per page in a # message list. Adjust it if you like. $mailman::iMessagesPerPage = 10; # Redirect Location # MailMan can redirect users to an alternate web page instead of the login # page when logging out. To redirect to an alternate location besides the # default login page you need to uncomment the line below and set it to the # URL location of the page you want to use. $mailman::strURLRedirectLocation = 'http://www.spiritlakenation.com/'; # Local Template Location: # If you have a web server that sets the current directory to something # strange, you can set this to an absolute path to make it easier to # allow MailMan to find the templates. Just set this variable to an # absolute path like "C\:\\inetpub\\wwwroot\\mailman\\templates\\" # or '/usr/home/rap/mailman/' or whatever. Note the final slash, that's # important. If you leave it out then things won't work. If you need # to set this value, then un-comment the following line: #$mailman::strLocalTemplateLocation = "D:/inetpub/wwwroot/Endymion2/products/mailman/demo/"; # Local Script Location: # If your server is one of the ones that causes problems that require the # above value to be set, then you might also need to set this value. In # most cases your script location and your template location will be # identical, but if you move your templates to a different directory than # your script for whatever reason, then you will need to set this. If you # have no idea what I'm talking about, you should probably just leave this. $mailman::strLocalScriptLocation = $mailman::strLocalTemplateLocation; # URL Image Location: # Use this to rig the URLs that will be used to access the images that # the templates point to. This value will be prepended to any value in # the templates of the form ""i_*.gif"" (including the inner quotes). # If you have customized your templates and your own custom images are # not showing up in MailMan's output, it is probably because the custom # images that you are using are not named "i_*.gif". # To use this variable, set it to the exact value that you want prepended # to image names in order to make them into URLs that will point to your # image directory. For instance, if you bury your images in an "images" # directory under the directory where MailMan is installed, set this to # 'images/' (with the slash). If you put your images in a completely # different directory, something that is rooted, like '/mailman/images/' # might be what you are looking for. In the most extreme cases you can # do away with relative URLs entirely and provide a complete absolute URL # like the one below #$mailman::strURLImageLocation = 'http://www.endymion.com/images/'; # Use Perl 'alarm()' function: # Set this to true if your Perl interpreter supports "alarm". As of this # Writing, NT Perl does not. If this is not set, MailMan will not be able # to timeout when a server hangs. The OSSettings() routine will attempt # to set this variable, but you can override it here if you want. # The point of the "alarm" feature as used in MailMan is to allow MailMan # to detect when a mail server has not responded within a reasonable # amount of time. If your server's Perl interpreter does not support # "alarm", then MailMan will still work, but if a mail server ever does # not respond then the user will get no feedback to that effect. #$mailman::bUseAlarm = 1; # Timeout Duration: # The aforementioned timeout delay. Set this to something else to modify # how long MailMan will sit around waiting for a mail server to respond. # Only works if $mailman::bUseAlarm is set to something. $mailman::iTimeoutDurationInSeconds = 180; # Use Perl 'crypt()' function: # Some Perl impelentations apparently do not support the crypt() function. # We have never seen one, and there are plenty of implementations out there # that you should be able to find a good one, but we try to accomodate # anyway. Comment out this line if your Perl implementation is breaking # on the crypt() function. Be warned that if you do this your users' # usernames and passwords will be less obfuscated than they were before, # which admittedly wasn't much. This is a good place to repeat the # suggestion that MailMan is an excellent candidate for SSL and other # fancy HTTP security mechanisms. #$mailman::bUseCrypt = 1; # Use Hijack Test: # MailMan performs a test to determine if the current session has been # hijacked by a different user from a different address. On a few # systems this will not work because of the configuration. If your # MailMan installation sits behind a cluster of caching proxy servers # for load balancing, for instance. If you want to disable the hijack # checking functionality, just comment out this line. #$mailman::bUseHijackTest = 1; # Kiosk Mode: # If you are using MailMan in a kiosk environment, it will generally # be possible for a user to use a combination of "BACK" and "RELOAD" in # the kiosk web browser to intrude backwards into the mail sessions of # previous users. If you set this value then MailMan will operate in # kiosk mode, which means that when a user logs in, MailMan will create # a new browser window with that user's session. If the user logs out # then that window will close, and the user's history information will # go with the window so that intrusions with "BACK" and "RELOAD" aren't # possible. We recommend against using this feature for installations # that are not kiosk-based because it relies on Javascript and cookies, # which does not leave users with older browsers with a way in. If you # are in a kiosk environment then you have control over the browser an # that's not a problem. We strongly recommend against using the # Microsoft Internet Explorer for kiosk environments because it does not # properly respect the "Expires:" and "Cache-control:" HTTP headers, so # IE will cache user mail to the hard drive whether you want it to or # not. Microsoft appears to have no interest in fixing this problem. # IE 4 SP1 pretty consistently crashed during our tests of the # full-screen popup window kiosk mode, too, which is likely not exactly # the behavior that you are looking for in your kiosk browser. # The kiosk mode feature primarily activates and deactivates sections # of outbound templates, so if you have customized your templates before # you decided to use kiosk mode then it is entirely possible that you # broke this mode by removing vital Javascript. Consult the # out-of-the-box template set for examples of the Javascript snippets # necessary for this mode. #$mailman::bKioskMode = 1; ############################################################################ # You should not have to configure any values after this line. ############################################################################ use Socket; use FileHandle; my($mma) = new FileHandle(); use CGI; my($mmb) = new CGI; { my(@mmc) = $mmb->param; my($mmd) = 0; for($mmd=0;$mmd<$#mmc+1;$mmd++) { my($mme) = $mmc[$mmd];; if($mme =~ /^(.+)\.[xy]$/) { my($mmf) = $1; if($mme =~ /^([^\#]+)\#(.*)\.[xy]$/) { $mmf = $1; $mmb->param($mmf,mmmm($2)); } else { $mmb->param($mmf,'MAILMANSPECIALTRUE'); } $mmb->delete("${mmf}.x"); $mmb->delete("${mmf}.y"); } else { if($mme =~ /^([^\#]+)\#(.*)$/) { $mmb->param($1,mmmm($2)); } } } } if($mmb->param('INTERFACE')) { my(@mmg) = split(/\&/,$mmb->param('INTERFACE')); my($mmh) = ''; foreach $mmh (@mmg) { if($mmh =~ /^([^\=]+)\=(.*)$/) { $mmb->param($1,mmmm($2)); } } unless($mmb->param('INTERFACE') =~ /ALTERNATE_TEMPLATES/) { $mmb->param('ALTERNATE_TEMPLATES',''); } } { @mailman::mmi = split(/\;/,$ENV{'HTTP_COOKIE'}); my($mmj) = ''; foreach $mailman::mmj (@mailman::mmi) { $mailman::mmk = 1; if($mailman::mmj =~ /MailManAuth\=(\S+)/) { my(@mml) = split(/\&/,$1); my($mmm) = ''; foreach $mmm (@mml) { $mmm =~ /^(.+)\#(.+)$/; unless($mmb->param($1)) { $mmb->param($1,$2); } } } } } $mailman::mmn = mmmq($mmb->param('USERNAME')); $mailman::mmn =~ s/^\s*([^\s]+)\s*$/$1/; if($mailman::mmo) { $mailman::mmn =~ tr/[A-Z]/[a-z]/; } $mailman::mmp = mmmp($mailman::mmn); $mailman::mmq = mmmq($mmb->param('PASSWORD')); $mailman::mmq =~ s/^\s*([^\s]+)\s*$/$1/; $mailman::mmr = mmmp($mailman::mmq); unless($mailman::strIncomingServer) { $mailman::strIncomingServer = mmmq($mmb->param('SERVER')); $mailman::strIncomingServer =~ s/^\s*([^\s]+)\s*$/$1/; $mailman::strIncomingServer =~ tr/[A-Z]/[a-z]/; } $mailman::mms = mmmp($mailman::strIncomingServer); unless($mailman::strOutgoingServer) { $mailman::strOutgoingServer = $mmb->param('OUTGOING'); $mailman::strOutgoingServer =~ s/^\s*([^\s]+)\s*$/$1/; $mailman::strOutgoingServer =~ tr/[A-Z]/[a-z]/; } $mailman::mmt = ''; if(defined($mailman::strLocalLocationAttachments) && defined($mailman::strURLLocationAttachments)) { unless($mailman::strLocalLocationAttachments =~ /[\/\\]$/) { $mailman::strLocalLocationAttachments .= '/'; } unless($mailman::strURLLocationAttachments =~ /[\/\\]$/) { $mailman::strURLLocationAttachments .= '/'; } $mailman::mmu = $mailman::strLocalLocationAttachments . mmml($mailman::mmn . '@' . $mailman::strIncomingServer); $mailman::mmv = $mailman::strURLLocationAttachments . mmml( mmml($mailman::mmn . '@' . $mailman::strIncomingServer)); $mailman::mmw = 1; } $mailman::mmx = mmmk($ENV{SERVER_NAME},42); $mailman::mmx .= mmmk($ENV{REMOTE_HOST} . $ENV{REMOTE_ADDR},69); $mailman::mmy = mmmp($mailman::mmx); mmmj(); $mailman::mmz = $ENV{SCRIPT_NAME}; unless($mailman::mmz =~ /^\//) { $mailman::mmz = "/$mailman::mmz"; } $mailman::mmaa = $mailman::mmz; $mailman::mmaa =~ s/^(.*[\\\/])[^\\\/]+$/$1/; if($mailman::mmaa eq '/') { $mailman::mmab = ''; } else { $mailman::mmab = "path=$mailman::mmaa; "; } sub mmku { if($mmb->param('NOFRAMES')) { $mailman::mmac = 1; } if($mmb->param('NOCACHE')) { $mailman::mmad = 1; } if(defined($mmb->param('ALTERNATE_TEMPLATES'))) { $mailman::mmae = $mmb->param('ALTERNATE_TEMPLATES'); } } sub mmkv { my($mmaf) = shift; my(@mmc) = $mmb->param; my($mmd) = 0; for($mmd=0;$mmd<$#mmc+1;$mmd++) { my($mme) = $mmc[$mmd];; if($mme =~ /^$mmaf\:(.*)$/) { return $1; } } return; } mmku(); mmkw(); { my($mmj) = ''; @mailman::mmi = split(/\;/,$ENV{'HTTP_COOKIE'}); foreach $mailman::mmj (@mailman::mmi) { if($mailman::mmj =~ /MailManCmds\=(\S+)/) { my($mmag) = ''; @mailman::mmah = split(/\&/,$1); foreach $mmag (@mailman::mmah) { $mmag =~ /^(.+)\#(.+)$/; unless($mmb->param($1)) { $mmb->param($1,$2); } } } } } mmku(); mmkw(); mmkz(); sub mmkw { my($mmai) = ''; if($mmb->param('BLANK')) { mmmi('t_blank.htm'); } if($mmb->param('MENU')) { mmmi('t_f_menu.htm'); } if($mmb->param('LOGOUT')) { if($mailman::mmw) { mmmx(); } if($mailman::bKioskMode) { print "Set-cookie: MailManAuth=;$mailman::mmab" . "expires=Sun, 03-May-1998 16:00:00 GMT\n"; print "Set-cookie: MailManCmds=;$mailman::mmab" . "expires=Sun, 03-May-1998 16:00:00 GMT\n"; print "Set-cookie: MailManDir=;$mailman::mmab" . "expires=Sun, 03-May-1998 16:00:00 GMT\n"; $mailman::mmn = ''; mmmi('t_closewindow.htm'); } else { if($mailman::strURLRedirectLocation) { print "Location: $mailman::strURLRedirectLocation\n\n"; } else { mmkz(); } } } if($mmb->param('START')) { mmkz(); } if($mmb->param('LOGIN')) { my($mmaj) = ''; if($mmaj = mmlb()) { if(defined($mmaj)) { $mmaj =~ s/^\-ERR(.*)$/$1/; } $mailman::bKioskMode = 0; $mailman::mmak{'GREETING'} = "
\n| . qq|\n|; my($mmbc) = '';
my($mmex) = $mmei[0]; foreach $mmbc (@$mmex) { $mmdi .= mmlg($mmbc); } $mmdi .=
qq|\n| . qq| |
\n| . qq|\n| . qq|\n| . qq|
\n|; } else { if($mmeb =~ /\.(jpg)|(gif)|(png)\s*$/i) { $mmdi .= qq|\n| . qq|
| Attachment 1:\n| . qq|\n| . qq|$mmeb |
| \n| .
qq|\n| .
qq| |
Attachment 1:\n| . qq|\n| . qq|$mmeb
\n|; } } } return $mmdi; } my($mmew)=1; if($mmeo =~ /multipart\/mixed/i) { if($mmej[1] =~ /multipart\/alternative/i || $mmej[1] =~ /multipart\/mixed/i) { $mmdi .= mmll($mmei[1], $mmdz); } elsif($mmej[1] =~ /text\/plain/i) { $mmdi .= mmlt($mmei[1], $mmdz); } elsif($mmej[1] =~ /text\/html/i) { if($mmdz) { $mmdi .= mmlt($mmei[1], $mmdz); } else { $mmdi .= mmlu($mmei[1]); } } else { $mmew = 0; } } elsif($mmeo =~ /multipart\/alternative/i) { my($mmey) = 1; for(;$mmey<=$mmel;$mmey++) { if($mmej[$mmey] =~ /text\/html/i && !$mmdz) { $mmdi .= mmlu($mmei[$mmey]); return $mmdi; } } $mmey = 1; for(;$mmey<=$mmel;$mmey++) { if($mmej[$mmey] =~ /text\/plain/i) { $mmdi .= mmlt($mmei[$mmey], $mmdz); return $mmdi; } } } elsif($mmeo =~ /multipart\/related/i) { $mmdi .= mmll($mmei[1],$mmdz); } else { $mmdi .= mmlt($mmdy, $mmdz); return($mmdi); } if($mmdz) { return($mmdi); } if($mmeo eq 'multipart/mixed') { for(;$mmew<$mmel;$mmew++) { my($mmez) = $mmek[$mmew+1]; $mmez = mmml($mmez); if(!defined($mmei[$mmew+1])) { ; } elsif(($mmej[$mmew+1] =~ /message\/rfc822/i) || ($mmej[$mmew+1] =~ /message\/delivery\-status/i) || ($mmej[$mmew+1] eq '')) { $mmdi .= qq|\n| . qq|\n|; my($mmbc) = '';
my($mmex) = $mmei[$mmew+1]; foreach $mmbc (@$mmex) { $mmdi .= $mmbc; } $mmdi .=
qq|\n| . qq| |
\n| . qq|\n| . qq|\n| . qq|
\n|; } else { if($mmem[$mmew+1] =~ /\.(jpg)|(gif)|(png)\s*$/i) { $mmdi .= qq|\n| . qq|
| Attachment #$mmew:\n| . qq|\n| . qq|$mmem[$mmew+1] |
| \n| .
qq|\n| .
qq| |
Attachment #$mmew:\n| . qq|\n| . qq|$mmem[$mmew+1]
\n|; } } } } } else { $mmer=0; plaintextline: foreach $_ (@$mmdy) { if(/^begin \d\d\d (\S+)\s*$/i) { $mmer++; $mmed=0; $mmes[$mmer] = $1; $mmeq[$mmer] = $1 . 'P' . $mmer; next plaintextline; } elsif($mmer>0 && /^end\s*$/i) { $mmer++; $mmed=0; $mmep[$mmer] .= "Fake Header\n\n"; next plaintextline; } $mmep[$mmer][$mmed++] = $_; } if($mailman::mman ne '') { my($mmfa) = 0; for(;$mmfa<=$mmer;$mmfa++) { if($mmeq[$mmfa] eq $mailman::mman) { if($mmes[$mmfa] eq '') { $mmdi .= mmlt($mmep[$mmfa], $mmdz); return $mmdi; } else { mmls($mmep[$mmfa],$mmes[$mmfa]); } } } } else { my($mmfa) = 0; for(;$mmfa<=$mmer;$mmfa++) { if(!defined($mmes[$mmfa]) || $mmes[$mmfa] eq '') { $mmdi .= mmlt($mmep[$mmfa], $mmdz); } elsif(!$mmdz) { my($mmfb) = $mmeq[$mmfa]; $mmfb = mmml($mmfb); if($mailman::mmac) { $mmdi .= '\n| . qq|
| Attachment #$mmfa:\n| . qq|\n| . qq|$mmes[$mmfa] |
| \n| .
qq|\n| .
qq| |
Attachment #$mmfa:\n| . qq|\n| . qq|$mmes[$mmfa]
\n|; } } } } } if($mmej[0] =~ /text\/html/i) { $mmdi = mmlu($mmdy); } return($mmdi); } return($mmdi); } sub mmlo { my($mmfd) = @_; my($mmfe,$mmff) = (0, 0); my($mmee) = 0; my($mmbc) = ''; my($mmfg) = ''; my($mmck) = ''; my($mmfh) = ''; my($mmfi) = 'Untitled'; foreach $mmbc (@$mmfd) { if($mmbc =~ /^Content-transfer-encoding\: base64/i) { $mmfe = 1; } elsif($mmbc =~ /^Content-transfer-encoding\: quoted-printable/i) { $mmff = 1; } else { if($mmee && $mmfe) { $mmfg .= $mmbc; } elsif($mmee && $mmff) { $mmfg .= $mmbc; } elsif($mmee) { $mmfg .= $mmbc; } else { $mmck .= $mmbc; } } if($mmbc =~ /^[\r\n]+$/) { $mmee = 1; $mmck =~ s/[\r\n]+[ \t]+(\S)/ $1/gs; } if(!$mmee && $mmbc =~ /name\=\"?([^\"\;]+)\"?\;?\s/si) { $mmfi = $1; } } if($mmfe) { $mmfh = mmlr($mmfg); } elsif($mmff) { $mmfh = mmlq($mmfg); } else { $mmfh = $mmfg; } print "Expires: Sun, 03 May 1998 16:00:00 GMT\n"; my($mmfj,$mmfk,$mmfl) = mmmo(); if($mmfj !~ /MSIE/i) { print "Cache-control: no-cache\n"; } unless($mailman::mmw) { print $mmck; print $mmfh; exit(0); } else { unless(-d $mailman::mmu) { unless(mkdir($mailman::mmu,0755)) { mmkx("Could not create temporary directory for " . "storing the attachment file. Make sure that " . "the directory " . "\"$mailman::mmu\" exists " . "and is writable by the web user."); } if(defined($mailman::iLocalDirectoryPermissions)) { mmmr($mailman::mmu, $mailman::iLocalDirectoryPermissions); } } my $mmfm = $mmfi; if($mmfi =~ /^(.+)(\.[^\.]+)$/) { my $mmfn = $1; my $mmfo = $2; $mmfi = mmml(mmml($mmfn)) . $mmfo; } else { $mmfi = mmml(mmml($mmfi)); } my($mmfp) = new FileHandle(); my($mmfq) = $mailman::mmu . '/' . $mmfi; unless(open($mmfp,">$mmfq")) { mmkx("Could not create temporary attachment file in \"" . $mmfq ."\". Make sure that the " . "directory is writable by the web user."); } binmode($mmfp); print {$mmfp} $mmfh; close($mmfp); if ($mmfm =~ /^(.+)(\.[^\.]+)$/) { my($mmfr) = $mailman::mmv . '/' . mmml(mmml(mmml($1))) . $2; print $mmb->redirect($mmfr); } else { my($mmfr) = $mailman::mmv . '/' . $mmfi; print $mmb->redirect($mmfr); } exit(0); } } sub mmlp { my $mmfg = shift; $mmfg =~ tr/\_/\ /; return $mmfg; } sub mmlq { my($mmfg) = @_; my($mmfs); $mmfg =~ s/\s+(\r?\n)/$1/g; $mmfg =~ s/=\r?\n//g; $mmfs = $mmfg; $mmfs =~ s/=([\da-fA-F]{2})/pack("C", hex($1))/ge; return($mmfs); } sub mmlr { my($mmfg) = @_; my($mmfs); $mmfg =~ tr|A-Za-z0-9+=/||cd; if(length($mmfg)%4) { return($mmfg); } $mmfg =~ s/=+$//; $mmfg =~ tr|A-Za-z0-9+/| -_|; while($mmfg =~ /(.{1,60})/gs) { my($mmft) = chr(32+length($1)*3/4); $mmfs .= unpack("u",$mmft . $1 ); } return($mmfs); } sub mmls { my($mmfu,$mmfv) = @_; print "Expires: Sun, 03 May 1998 16:00:00 GMT\n"; my($mmfj,$mmfk,$mmfl) = mmmo(); if($mmfj !~ /MSIE/i) { print "Cache-control: no-cache\n"; } unless($mailman::mmw) { print qq|Content-Type: application\/octet-stream; name="$mmfv"\n\n|; my($mmdi) = ''; my($mmbc) = ''; foreach $mmbc (@$mmfu) { $mmdi .= unpack('u',$mmbc); } print $mmdi; exit(0); } else { unless(-d $mailman::mmu) { unless(mkdir($mailman::mmu,0755)) { mmkx("Could not create temporary directory for " . "storing the attachment file. Make sure that " . "the directory " . "\"$mailman::mmu\" exists " . "and is writable by the web user."); } if(defined($mailman::iLocalDirectoryPermissions)) { mmmr($mailman::mmu, $mailman::iLocalDirectoryPermissions); } } my($mmfp) = new FileHandle(); my($mmfq) = $mailman::mmu . '/' . $mmfv; unless(open($mmfp,">$mmfq")) { mmkx("Could not temporary attachment file in \"" . $mmfq ."\". Make sure that the " . "directory is writable by the web user."); } binmode($mmfp); my($mmbc) = ''; foreach $mmbc (@$mmfu) { print {$mmfp} unpack('u',$mmbc); } close($mmfp); my($mmfr) = $mailman::mmv . '/' . $mmfv; print $mmb->redirect($mmfr); exit(0); } } sub mmlt { my($mmdy,$mmdz) = @_; my($mmfe,$mmff); my($mmdi) = ''; my($mmby) = 0; my($mmfg) = ''; if(!$mmdz) { $mmdi = "\n"; } $mmby=0;
foreach $_ (@$mmdy) { if(!$mmby) { if(/^Content-transfer-encoding\: base64/i) {
$mmfe = 1; } elsif(/^Content-transfer-encoding\: quoted-printable/i) { $mmff = 1; } }
if($mmby) { my($mmfw) = ''; if($mmff || $mmfe) { $mmfg = $_; if($mmfe) {
$mmfw = mmlr($mmfg); } elsif($mmff) { $mmfw = mmlq($mmfg); }
} else { $mmfw = $_; } my($mmfx) = length($mmfw); my($mmfy) = ''; if($mmdz) {
$mmfy = $mmfw; } else { $mmfy = mmlg($mmfw); } my($mmfz) = 90 +
(length($mmfy) - $mmfx); $mmfy =~ s/([^\n]{1,$mmfz})\s/$1\n/g; $mmfy =~ s/\015//g;
if($mmdz) { $mmfy = '> ' . $mmfy; } $mmdi .= $mmfy ; } if(/^[\r\n]+$/){ $mmby = 1; } }
if($mmfe) { $mmdi .= mmlr($mmfg); } elsif($mmff) {
$mmdi .= mmlq($mmfg); } if(!$mmdz) { $mmdi .= "\n"; }
return $mmdi; } sub mmlu { my($mmdy) = @_; my($mmfe,$mmff);
my($mmfg) = ''; my($mmdi) = ''; my($mmby) = 0; foreach $_ (@$mmdy) { if(!$mmby) {
if(/^Content-transfer-encoding\: base64/i) { $mmfe = 1; }
elsif(/^Content-transfer-encoding\: quoted-printable/i) { $mmff = 1; } } if($mmby) {
if($mmff || $mmfe) { $mmfg .= $_; } else { my($mmfy) = $_; $mmfy =~ s/\r//g;
$mmdi .= $mmfy; } } if(/^[\r\n]+$/){ $mmby = 1; } } if($mmfe) {
$mmdi .= mmlr($mmfg); } elsif($mmff) {
$mmdi .= mmlq($mmfg); }
$mmdi =~ s/\<\/?(html|head|body|title)[^\>]*\>//sig; $mmdi =~
s/(src\s*\=\s*\")cid\:([^\"]+)(\")/$1 .
"${mailman::mmz}?SHOW:${mailman::mmbm}cid:" .
mmml($2) . '=TRUE' . $3/egi; return $mmdi; } sub mmlv {
my($mmam,$mmdu) = @_; mmlj($mmam,$mmdu); my($mmat) = ''; if($mailman::mmac)
{ $mmat = 't_nf_message.htm'; } else { $mmat = 't_f_message.htm'; }
$mailman::mmak{'USERNAME'} = $mailman::mmn;
$mailman::mmak{'USERNAMEHIDDEN'} = $mailman::mmp;
$mailman::mmak{'SERVER'} = $mailman::strIncomingServer;
$mailman::mmak{'SERVERHIDDEN'} = $mailman::mms;
$mailman::mmak{'PASSWORDHIDDEN'} = $mailman::mmr;
$mailman::mmak{'CHECKSUM'} = $mailman::mmy;
$mailman::mmak{'NUM'} = $mailman::mmcn; $mailman::mmak{'ID'} = $mailman::mmbm;
$mailman::mmak{'TO'} = $mailman::mmcf; $mailman::mmak{'FROM'} = $mailman::mmcg;
$mailman::mmak{'DATE'} = $mailman::mmbs;
$mailman::mmak{'SUBJECT'} = $mailman::mmci;
$mailman::mmak{'MESSAGENUM'} = $mailman::mmbo;
$mailman::mmak{'MESSAGE'} = mmll(\@mailman::mmdx);
$mailman::mmak{'CC'} = $mailman::mmch; $mailman::mmga =
mmmg($mmat,'CCLINE'); if($mailman::mmbq eq '') {
$mailman::mmga = ''; } else { $mailman::mmga =
mmme($mailman::mmga,\%mailman::mmak); }
$mailman::mmak{'CCLINE'} = $mailman::mmga; mmmi($mmat,\%mailman::mmak);
} sub mmlw { my($mmam,$mmdu) = @_;
mmlj(mmml($mmam),$mmdu); my($mmat) = ''; if($mailman::mmac) {
$mmat = 't_nf_message.htm'; } else { $mmat = 't_f_message.htm'; }
$mailman::mmak{'USERNAME'} = $mailman::mmn;
$mailman::mmak{'USERNAMEHIDDEN'} = $mailman::mmp;
$mailman::mmak{'SERVER'} = $mailman::strIncomingServer;
$mailman::mmak{'SERVERHIDDEN'} = $mailman::mms;
$mailman::mmak{'PASSWORDHIDDEN'} = $mailman::mmr;
$mailman::mmak{'CHECKSUM'} = $mailman::mmy;
$mailman::mmak{'NUM'} = $mailman::mmcn; $mailman::mmak{'ID'} = $mailman::mmbm;
$mailman::mmak{'MESSAGENUM'} = $mailman::mmbo;
$mailman::mmak{'TO'} = $mailman::mmcf; $mailman::mmak{'FROM'} = $mailman::mmcg;
$mailman::mmak{'DATE'} = $mailman::mmbs;
$mailman::mmak{'SUBJECT'} = $mailman::mmci;
$mailman::mmak{'CC'} = $mailman::mmch; $mailman::mmga =
mmmg($mmat,'CCLINE'); if($mailman::mmbq eq '') {
$mailman::mmga = ''; } else {
$mailman::mmga = mmme($mailman::mmga,\%mailman::mmak); }
$mailman::mmak{'CCLINE'} = $mailman::mmga; $mailman::mmak{'MESSAGE'} = "\n";
my($mmbc) = ''; foreach $mmbc (@mailman::mmdx) { $mmbc =~ s/\015//g;
$mmbc =~ s/\&/\&\;/g; $mmbc =~ s/\\<\;/g; $mmbc =~ s/\>/\>\;/g;
$mailman::mmak{'MESSAGE'} .= $mmbc; } $mailman::mmak{'MESSAGE'} .= "\n";
mmmi($mmat,\%mailman::mmak); } sub mmlx { my($mmam) = @_;
$mailman::mmbj = mmlf($mmam); mmla($mma,"DELE $mailman::mmbj");
my($mmbi) = ''; $mmbi = <$mma>; unless($mmbi =~ /^\+OK/) { mmkx($mmbi); } }
sub mmly { my($mmam) = @_; mmlx($mmam); }
sub mmlz { my($mmam,$mmgb,$mmgc, $mmbp) = @_; my($mmdi) = '';
my($mmgd) = ''; my($mmge) = ''; my($mmgf) = '';
$mailman::mmak{'ATTACH'} = $mmb->param('ATTACH'); my($mmat) = '';
$mmat = 't_messageform.htm'; if($mmam ne 'NEW') {
mmlj(mmml($mmam),0); $mmgd = $mailman::mmbp;
$mmge = $mailman::mmbr; $mmgf = $mailman::mmbu; if($mailman::mmbv) {
$mailman::mmbp = $mailman::mmbv; } else { $mailman::mmbp = $mailman::mmbr; } if($mmgb)
{ $mailman::mmbp .= ", $mmgd";
if($mailman::mmbq){ $mailman::mmbp .= ", $mailman::mmbq"; } } if($mmgc) {
unless($mailman::mmbu =~ /^fwd\:/i) { $mailman::mmbu = "Fwd: $mailman::mmbu"; }
$mailman::mmbp = ""; } else { unless($mailman::mmbu =~ /^re\:/i) {
$mailman::mmbu = "Re: $mailman::mmbu"; } } $mailman::mmbq = ''; }
$mailman::mmbp =~ s/\"/"/g; $mailman::mmbu =~ s/\"/"/g;
if($mmam ne 'NEW') { $mailman::mmet = 0; $mmdi = mmll(\@mailman::mmdx,1);
if($mmgc) { my($mmgg) = mmmg($mmat, 'FORWARDHEADER');
$mailman::mmak{'ORIGINALTO'} = $mmgd; $mailman::mmak{'ORIGINALFROM'} = $mmge;
$mailman::mmak{'ORIGINALSUBJECT'} = $mmgf;
$mailman::mmak{'ORIGINALDATE'} = $mailman::mmbs;
$mmdi = mmme($mmgg, \%mailman::mmak) . $mmdi; if($mailman::mmet) {
$mailman::mmgh = $mmam; $mailman::mmak{'ERROR'} =
'The original message attachment(s) ' . 'will be included in this message.'; } } }
$mailman::mmak{'USERNAME'} = $mailman::mmn;
$mailman::mmak{'USERNAMEHIDDEN'} = $mailman::mmp;
$mailman::mmak{'SERVER'} = $mailman::strIncomingServer;
$mailman::mmak{'SERVERHIDDEN'} = $mailman::mms;
$mailman::mmak{'PASSWORDHIDDEN'} = $mailman::mmr;
$mailman::mmak{'CHECKSUM'} = $mailman::mmy;
$mailman::mmak{'NUM'} = $mailman::mmbj; $mailman::mmak{'MESSAGE'} = $mmdi;
$mailman::mmak{'TO'} = $mailman::mmbp; $mailman::mmak{'CC'} = $mailman::mmbq;
$mailman::mmak{'SUBJECT'} = $mailman::mmbu;
if(defined($mailman::strFromDomainName)) {
$mailman::mmak{'FROM'} = $mailman::mmn . '@' .
mmmz($mailman::strFromDomainName); } else {
$mailman::mmak{'FROM'} = $mailman::mmn . '@' .
mmmz($mailman::strIncomingServer); } my($mmfj,$mmfk,$mmfl) =
mmmo(); my($mmgi) = 0; if(($mmfj =~ /MSIE/i && $mmfk >= 4) ||
($mmfj =~ /Mozilla/i && $mmfk >= 2)) { if(!$mmgc) { if($mmb->param('ATTACH')) {
$mailman::mmak{'UPLOAD'} = mmmg($mmat, 'UPLOAD'); $mmgi = 1; }
else { $mailman::mmak{'UPLOAD'} = mmmg($mmat, 'BENIGNUPLOAD');
} } else { $mailman::mmak{'UPLOAD'} = ''; } } else { $mailman::mmak{'UPLOAD'} = ''; }
if($mmgi) { $mailman::mmak{'MULTIPARTTAG'} =
mmmg($mmat,'MULTIPARTTAG');
$mailman::mmak{'ENCTYPE'} = "multipart/form-data"; } else {
$mailman::mmak{'ENCTYPE'} = "application/x-www-form-urlencoded"; }
mmmi($mmat,\%mailman::mmak); } sub mmma { my($mmaj,$mmgj) = @_;
my($mmgc) = 0; $mailman::mmak{'ATTACH'} = $mmb->param('ATTACH'); my($mmat) = '';
$mmat = 't_messageform.htm'; $mailman::mmak{'USERNAME'} = $mailman::mmn;
$mailman::mmak{'USERNAMEHIDDEN'} = $mailman::mmp;
$mailman::mmak{'SERVER'} = $mailman::strIncomingServer;
$mailman::mmak{'SERVERHIDDEN'} = $mailman::mms;
$mailman::mmak{'PASSWORDHIDDEN'} = $mailman::mmr;
$mailman::mmak{'CHECKSUM'} = $mailman::mmy;
$mailman::mmak{'NUM'} = $mmb->param('NUM');
$mailman::mmak{'TO'} = $mmb->param('TO');
$mailman::mmak{'CC'} = $mmb->param('CC');
$mailman::mmak{'FROM'} = $mmb->param('FROM');
$mailman::mmak{'SUBJECT'} = $mmb->param('SUBJECT');
$mailman::mmak{'OUTGOING'} = $mailman::strOutgoingServer;
$mailman::mmak{'ERROR'} = $mmaj; unless(defined($mmgj) && length($$mmgj)) {
$mailman::mmak{'MESSAGE'} = $mmb->param('TEXT'); } else {
$mailman::mmak{'MESSAGE'} = $$mmgj; }
if(defined($mmb->param('FORWARDATTACHMENTS'))) { $mailman::mmgh =
mmmm($mmb->param('FORWARDATTACHMENTS')); $mmgc = 1; }
my($mmfj,$mmfk,$mmfl) = mmmo(); my($mmgi) = 0;
if(($mmfj =~ /MSIE/i && $mmfk >= 4) || ($mmfj =~ /Mozilla/i && $mmfk >= 2)) {
if(!$mmgc) { if($mmb->param('ATTACH')) { $mailman::mmak{'UPLOAD'} =
mmmg($mmat, 'UPLOAD'); $mmgi = 1; } else {
$mailman::mmak{'UPLOAD'} = mmmg($mmat, 'BENIGNUPLOAD'); } }
else { $mailman::mmak{'UPLOAD'} = ''; } } else { $mailman::mmak{'UPLOAD'} = ''; }
if($mmgi) { $mailman::mmak{'MULTIPARTTAG'} =
mmmg($mmat,'MULTIPARTTAG');
$mailman::mmak{'ENCTYPE'} = "multipart/form-data"; } else {
$mailman::mmak{'ENCTYPE'} = "application/x-www-form-urlencoded"; }
mmmi($mmat,\%mailman::mmak); } sub mmmb { my($mmba) = "\015\012";
my($mmbb, $mmbc) = @_; if($mailman::mmgk) { print $mailman::mmgl $mmbc . $mmba; }
else { my($mmbd) = length($mmbc . $mmba); syswrite($mmbb,$mmbc . $mmba,$mmbd); } }
sub mmmc { my($mmba) = "\015\012"; my($mmdi) = ''; my($mmea) = '';
my($mmgm) = ''; my($mmbp) = ''; my($mmaj) = ''; if($mmaj = mmlb()) {
if(defined($mmaj)) { $mmaj =~ s/^\-ERR(.*)$/$1/; } $mailman::bKioskMode = 0;
$mailman::mmak{'GREETING'} =
"The output template "$mmfi" exists and was found by the MailMan\n| . qq|script, but the script does not have permission to read it.
\n| . qq|On most Unix systems, you can go to the directory where MailMan is\n| . qq|installed and type "chmod 644 $mmfi" to solve this problem. If\n| . qq|your HTTP server is running in a different operating in a different\n| . qq|operating system, consult your HTTP server and operating system \n| . qq|documentation for more information.
\n| . qq|\n|; exit(1); } else { print qq|The output template "$mmfi" could not be found by the MailMan \n| . qq|script.
Make sure that this template is located where MailMan can \n| . qq|find it (in the same directory as the script itself on most web servers,\n| . qq|but not necessarily) and make sure that the web server process has\n| . qq|permission to read the file. Consult your HTTP server and operating\n| . qq|system documentation for more information.
\n| . qq|\n|; exit(1); } } sub mmmg { my($mmfi,$mmhn) = @_; my($mmfc) = ''; my($mmho) = new FileHandle(); if(defined($mailman::mmae)) { $mmfi = $mailman::mmae . $mmfi; } if(open($mmho, "<" . $mailman::strLocalTemplateLocation . $mmfi)) { my($mmhp) = ''; while(defined($_ = <$mmho>)) { $mmhp .= $_; } close($mmho); if($mmhp =~ /MailManSnippet\($mmhn\)\s*(.+)\s*EndSnippet\($mmhn\)/si) { $mmfc = $1; $mmfc =~ s/^\s+(\S.*)$/$1/; $mmfc =~ s/^(.*\S)\s+$/$1/; return $mmfc; } } $mmfc = qq|Template Error: Snippet "$mmhn" not found in | . qq|template "$mmfi"|; return $mmfc; } sub mmmh { my($mmfi,@mmhq) = @_; my(@mmhr); my($mmho) = new FileHandle(); if(defined($mailman::mmae)) { $mmfi = $mailman::mmae . $mmfi; } if(open($mmho, "<" . $mailman::strLocalTemplateLocation . $mmfi)) { my($mmhp) = ''; while(defined($_ = <$mmho>)) { $mmhp .= $_; } close($mmho); my($mmhn) = ''; foreach $mmhn (@mmhq) { if($mmhp =~ /MailManSnippet\($mmhn\)\s*(.+)\s*EndSnippet\($mmhn\)/si) { my($mmfc) = $1; $mmfc =~ s/^\s+(\S.*)$/$1/; $mmfc =~ s/^(.*\S)\s+$/$1/; push(@mmhr,$1); } else { mmkx( qq|Template Error: Snippet "$mmhn" not found in | . qq|template "$mmfi"|); } } return @mmhr; } } sub mmmi { my($mmfi,$mmhl,$mmas) = @_; my($mmhs) = 0; my($mmho) = new FileHandle(); if(defined($mailman::mmae)) { $mmfi = $mailman::mmae . $mmfi; } unless($mmhl->{'ME'}){ $mmhl->{'ME'} = $mailman::mmz; } my($mmeh) = localtime(time); $mmhl->{'UNIQUE'} = mmmp($mmeh); $mmhl->{'EDITION'} = $mailman::strMailManEdition; $mmhl->{'VERSION'} = $mailman::strMailManVersion; if(open($mmho, "<" . $mailman::strLocalTemplateLocation . $mmfi)) { print "Content-type: text/html\n"; my($mmm) = ''; if(defined($mailman::mmp)) { $mmm .= 'USERNAME' . '#' . $mailman::mmp . '&'; } if(defined($mailman::mms)) { $mmm .= 'SERVER' . '#' . $mailman::mms . '&'; } if(defined($mailman::mmr)) { $mmm .= 'PASSWORD' . '#' . $mailman::mmr . '&'; } if(defined($mailman::mmy)) { $mmm .= 'CHECKSUM' . '#' . $mailman::mmy; } if(defined($mailman::mmn) && $mailman::mmn ne '') { print "Set-cookie: MailManAuth=$mmm;" . "$mailman::mmab\n"; } if(defined($mailman::mmp)) { $mmhl->{'AUTHENTICATION'} = qq||; } if(defined($mailman::mms)) { $mmhl->{'AUTHENTICATION'} .= qq||; } if(defined($mailman::mmr)) { $mmhl->{'AUTHENTICATION'} .= qq||; } if(defined($mailman::mmy)) { $mmhl->{'AUTHENTICATION'} .= qq||; } $mmhl->{'AUTHENTICATION'} .= $mailman::mmt; $mmhl->{'SETTINGS'} = ''; if($mailman::mmac) { $mmhl->{'SETTINGS'} .= qq||; } if($mailman::mmad) { $mmhl->{'SETTINGS'} .= qq||; } if(defined($mailman::mmae)) { $mmhl->{'SETTINGS'} .= qq||; } if($mailman::mmgh) { my($mmht) = mmml($mailman::mmgh); $mmhl->{'SETTINGS'} .= qq||; } my(@mmc) = $mmb->param; my($mmd) = 0; my($mmhu) = ''; for($mmd=0;$mmd<$#mmc;$mmd++) { my($mmag) = $mmc[$mmd];; if($mmag ne 'USERNAME' && $mmag ne 'SERVER' && $mmag ne 'PASSWORD' && $mmag ne 'CHECKSUM' && $mmag ne 'SEND' && $mmag ne 'TEXT' && $mmag ne 'ATTACH' && $mmag !~ /USERFILE/) { $mmhu .= $mmag . '#' . $mmb->param($mmag) . '&'; } } chop($mmhu); if($mailman::mmac) { print "Set-cookie: MailManCmds=$mmhu; " . "path=$mailman::mmaa;\n"; } if($mailman::mmad) { print "Expires: Sun, 03 May 1998 16:00:00 GMT\n"; print "Cache-control: no-cache\n"; } print "\n"; if(defined($mailman::strDebug) && ($mmfi !~ /t\_f\_frameset/)) { print qq|| \n| . qq|DEBUG OUTPUT |
\n| .
qq|$mailman::strDebug| . qq| |