#! @PERL@ -wT # List the messages in a user's log directory # Copyright (c) 2006 by Rhyolite Software, LLC # # This agreement is not applicable to any entity which sells anti-spam # solutions to others or provides an anti-spam solution as part of a # security solution sold to other entities, or to a private network # which employs the DCC or uses data provided by operation of the DCC # but does not provide corresponding data to other users. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # Parties not eligible to receive a license under this agreement can # obtain a commercial license to use DCC and permission to use # U.S. Patent 6,330,590 by contacting Commtouch at http://www.commtouch.com/ # or by email to nospam@commtouch.com. # # A commercial license would be for Distributed Checksum and Reputation # Clearinghouse software. That software includes additional features. This # free license for Distributed ChecksumClearinghouse Software does not in any # way grant permision to use Distributed Checksum and Reputation Clearinghouse # software # # THE SOFTWARE IS PROVIDED "AS IS" AND RHYOLITE SOFTWARE, LLC DISCLAIMS ALL # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RHYOLITE SOFTWARE, LLC # BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # Rhyolite Software DCC 1.3.50-1.24 $Revision$ # @configure_input@ # This file must protected with an equivalent to httpd.conf lines # in the README file. use strict 'subs'; use POSIX qw(strftime); # get DCC parameters local($list_msg_link, $user_dir); # quiet -w warnings # do('@cgibin@/common') || die("could not get DCC configuration: $!\n"); local($msg_day_first, $msg_day_last, $msg_first, $msg_last, $msg_newer, $msg_part_num, @msgs_num, %msgs_date, %msgs_from, %msgs_result, %msgs_subject); # get_log_msgs($query{msg} ? $query{msg} : undef, 20, 1); html_head("Messages Logged for $user at $hostname"); print "

"; print $#msgs_num >= 0 ? ($#msgs_num+1) : "No"; print " messages logged for $user at $hostname at "; print strftime "%x %X", localtime; print "

\n

\n

\n"; print $query{result} ? html_str_encode($query{result}) : " "; print "\n

\n"; common_buttons(); print "\n"; if ($#msgs_num >= 0) { my($msg_num, $msg, $next_date, $last_date); print < EOF print_links(); for ($msg_num = $msg_first; $msg_num <= $msg_last; ++$msg_num) { my($msg) = $msgs_num[$msg_num]; next if (!$msg); $next_date = $msgs_date{$msg}; if ($next_date =~ s/(.*) .*/$1/) { if (! $last_date) { print "
\n"; print " $next_date"; if ($msg_part_num) { print " part $msg_part_num"; $msg_part_num= 0; } print "\n From\n  \n Subject\n"; } elsif ($last_date ne $next_date) { print "
 \n"; print " $next_date"; print "\n  \n  \n  \n"; } $last_date = $next_date; } print "
$list_msg_link${url_ques}msg=$msg\">"; print $msg_num+1; print < $msgs_date{$msg} $msgs_from{$msg} $msgs_result{$msg} $msgs_subject{$msg} EOF } if ($msg_num > $#msgs_num) { print <  Next Day       EOF } print_links(); print <

Grey greylist embargo OK-Grey greylist embargo ended
DCC bulk according to DCC network    OK-DCC not bulk according to DCC network
Rep bad DCC Reputation
MTA blacklisted by mail system MTA-OK whitelisted by mail system
BL blacklisted in whiteclnt files WL whitelisted in whiteclnt files
DNSBL DNS blacklisted URL
italic checks off
EOF } html_footer(); print "\n\n"; # re-enable mail notifications unlink("$user_dir/notify.marker", "$user_dir/notify.pending", "$user_dir/notify.block"); close(MARK) if (open(MARK, "> $user_dir/notify.marker")); sub print_links { my($msg_num); print "

\n"; print " $list_log_link\">Newest\n"; print_bounded_link($msg_day_last+1, "Next Day"); print_bounded_link($msg_newer, "Newer"); print_bounded_link($msg_first-1, "Older"); print_bounded_link($msg_day_first-1, "Previous Day"); print_bounded_link(0, "Oldest"); } sub print_bounded_link { my($msg_num, $name) = @_; my($val); if ($msg_num > $#msgs_num) { $val = ""; } elsif ($msg_num < 0) { $val = "${url_ques}msg=$msgs_num[0]"; } else { $val = "${url_ques}msg=$msgs_num[$msg_num]"; } print " $list_log_link$val\">$name\n"; }