[8339] in Perl-Users-Digest
Perl-Users Digest, Issue: 1956 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 23 05:07:23 1998
Date: Mon, 23 Feb 98 02:00:34 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 23 Feb 1998 Volume: 8 Number: 1956
Today's topics:
a beginner's question... <Christian.Khoury@inria.fr>
add user automatically to the passwd file with a Perl S <hagen@bildbau.de>
Beginner in trouble <alberto.turon@posta.unizar.es>
Re: Canonical absolute file paths; or, removing up (../ <metcher@spider.herston.uq.edu.au>
Re: Cool .sig! <rjk@coos.dartmouth.edu>
Re: DBD/oracle, and LD_LIBRARY_PATH (T.J. Nijweide)
Re: differences perl 4.0.1.8 -> 4.0.3.6 (John M. Gamble)
Hangs with sendmail ... <jquinn@shell7.ba.best.com>
Re: How to: "ENTER = submit form" ? <rick@slicks.demon.co.uk>
Re: HowTo "break" and ?: operator <rjk@coos.dartmouth.edu>
Re: Killfile Triage <tchrist@mox.perl.com>
Re: Mail Attachments via Perl Sendmail A REAL ANSWER! <rcd@kiwi.net>
Re: Regexp question... <rjk@coos.dartmouth.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Feb 1998 09:34:05 +0100
From: Christian Khoury <Christian.Khoury@inria.fr>
Subject: a beginner's question...
Message-Id: <34F1347D.5DB5@inria.fr>
hi, is there a way to force Perl do "unsigned long" arithmetic
operations ?
thanx,
Christian
------------------------------
Date: Mon, 23 Feb 1998 10:14:46 -0000
From: "Hagen Seyring" <hagen@bildbau.de>
Subject: add user automatically to the passwd file with a Perl Script
Message-Id: <34f13e81.0@news.sireco.de>
I want add user automatically to the passwd file with a Perl Script.
Are there any perl modules or scripts which i can use?
Hagen Seyring
insel@msn.com
------------------------------
Date: Mon, 23 Feb 1998 10:41:36 +0100
From: Alberto Turon Lanuza <alberto.turon@posta.unizar.es>
Subject: Beginner in trouble
Message-Id: <34F1444F.24231F55@posta.unizar.es>
Hi, I4m trying to write my first PERL script, but I4m having serious
problems with a question. I think it is very easy, but I4m not expert.
Could you help me, please?
My script has to read several files and match two strings, returning the
number of lines that contain both strings. Why doesn4t the following
code run?
foreach $domain (@domains) {
$machine=0;
opendir(DIR,"../../logs");
@files = readdir(DIR);
closedir(DIR);
foreach $fich (@files)
{
if (($fich ge $inifile) && ($fich le $endfile))
{
$fich='../../logs/'.$fich;
$machine += `egrep -c "$domain.*\/html\/machine" $fich`;
}
}
}
I know there are beter ways to do it, but remember I am a beginner. Now
I just need it to run.
Sorry, I have read several FAQ4s but I can4t discover the answer.
Thanks a lot
Alberto
aturon@acm.org
------------------------------
Date: Mon, 23 Feb 1998 10:15:19 +1100
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Canonical absolute file paths; or, removing up (../) segments
Message-Id: <34F0B187.35E9BA2A@spider.herston.uq.edu.au>
How about:
sub CanonicalizePath {
my $path = join '/', @_;
$path =~ s![^\.\.|/]+/\.\./!!g;
$path =~ s!/(\.|)/!/!g; # won't resolve ./a/b to a/b -
suggestions?
return $path;
}
I haven't assured myself that this is general, but it works for your
examples.
--
Jaime Metcher
Justin Vallon wrote:
>
> The following is much the same, but here's some more code. How about a
> general "CanonicalizePath"?
>
> sub CanonicalizePath {
> my $path = join '/', @_;
$path =~ !/([^\.\.])/\.\.!/$1!g;
> my @work = split '/', $path;
> my @out;
> my $is_absolute;
>
> if (@work && $work[0] eq "") {
> $is_absolute = 1;
> shift @work;
> }
>
> while (@work) {
> my $seg = shift @work;
> if ($seg eq "." || $seg eq "") {
> } elsif ($seg eq "..") {
> if (@out && $out[-1] ne "..") {
> pop @out;
> } else {
> # Leading "..", or "../..", etc.
> push @out, $seg;
> }
> } else {
> push @out, $seg;
> }
> }
>
> unshift @out, "" if $is_absolute;
> return join('/', @out);
> }
>
snip test code
------------------------------
Date: Mon, 23 Feb 1998 02:13:25 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Steve Linberg <see-below@crocker.com>
Subject: Re: Cool .sig!
Message-Id: <34F12195.5A3322E3@coos.dartmouth.edu>
[posted and mailed]
Steve Linberg wrote:
>
> _ / ' _ /
> ( /)//)//)(//)/(
> /
>
> Very nice! Very original. Did you do it yourself?
Thanks! Actually, I used figlet. The font is italic.
The figlet homepage:
<http://st-www.cs.uiuc.edu/users/chai/figlet.html>
A web-based figlet service:
<http://www.inf.utfsm.cl/cgi-bin/figlet>
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
It's funny 'cause it's true ... and vice versa.
------------------------------
Date: 23 Feb 1998 08:45:37 GMT
From: tobias@socrates.et.tudelft.nl (T.J. Nijweide)
Subject: Re: DBD/oracle, and LD_LIBRARY_PATH
Message-Id: <6crcvh$2a3$1@delphi.et.tudelft.nl>
John D Groenveld (groenvel@cse.psu.edu) wrote:
: In article <6cjk36$knl$1@delphi.et.tudelft.nl>,
: T.J. Nijweide <tobias@socrates.et.tudelft.nl> wrote:
: >I'm currently writing some scripts that use DBI and DBD::oracle. The
: >problem I have is that oracle needs libclntsh.so.1.0, but that is not
: >in the LD_LIBRARY_PATH for most users. I could of course write a wrapper
: Did you install a binary version of DBD::Oracle? Did you install DBD::Oracle
: and later change ORACLE_HOME? I dont understand why you have LD_LIBRARY_PATH
: set.
: John
: groenveld@acm.org
I found out a bit more about our installation.
DBD::Oracle was installed on a system with oracle in /oracle, and
most other systems have oracle in /someotherhierarchy/oracle.
There are two ways I can think of to make this work, but they're both
not good enough. I need a third. :)
- Symlink to /oracle.
- We have so many systems, it would be very hard to guarantee that
they all have the correct symlink. (About 50 unix admins over here.)
- Build DBD::ORacle to refer to correct dir.
- Many people use the current version and don't take too well to
changes that aren't _really_ necessary. (On systems that do have
/oracle.)
- Building a nice sh wrapper.
- I don't like sh wrappers.
Ok, I lied, I have three solutions, but I need a fourth. :)
Tob
--
======-------- Tobias J. Nijweide MESA Consulting B.V.
=======--------- ph. (+31)-15-2510733 P.O. Box 9
=======--------- tobias@mesa.nl 2270 AA Voorburg
__==== www.mesa.nl ---__U_n_i_x____I_n_t_e_r_n_e_t__ The Netherlands ____
------------------------------
Date: 23 Feb 1998 01:32:38 GMT
From: jgamble@ripco.com (John M. Gamble)
Subject: Re: differences perl 4.0.1.8 -> 4.0.3.6
Message-Id: <6cqjjm$kdb$1@gail.ripco.com>
In article <34ee26ff$3$ofn$mr2ice@speaker>,
Brandon S. Allbery KF8NH <bf8$s03c92f97$a93d2@kf8nh.apk.net> wrote:
>[p&e]
>
>In <6cht4s$1tca$1@ausnews.austin.ibm.com>, on 02/19/98 at 06:20 PM,
> rhaig@austin.ibm.com (Haig) said:
>+-----
>| I'm looking for historical information about updates to perl4
>| (ver 4.0.1.8 -> 4.0.3.6) and the security & other implications
>| thereof.
>+--->8
>
>You should be able to find stuff like this on CPAN, with the unsupported Perl4
>distributions.
>
>BTW, it's Perl 4.0 patchlevel 18 and patchlevel 36 (or 4.018 / 4.036 in the
>vernacular), not 4.0.1.8 / 4.0.3.6. The only thing magic about those numbers
>is that enough changes had accumulated to make a new full Perl release a good
>idea at those times. (pl35 had a full release as well.)
>
>| Also, I'd be interested in what would have to be done to any arbitrary
>| perl4.0.1.8 script to make it run on perl5.
>+--->8
>
>The only thing I've ever run in to is that Perl 4 would allow you to use an
>unquoted @ in a double-quoted string as long as it wasn't followed by the name
>of a list variable that had already been "seen" by Perl at that point; Perl 5
>requires you to backslash all @'s in double-quoted strings, because they can
>be more than just variables (consider the idiom for embedding a random
>expression in a string: "... @{[ some_expression ]} ...") and because the
[snip]
Memory, Memory, Memory. An important improvement in perl5.
I had one script (fortunately not neede for production) that had
a list variable with over 19,000 integers in it, defined that way
in text in the script. On my machines with limited memory, the
script would silently truncate the list to around 17,000+ elements.
When i ran this same script under perl5, the problem went away.
Perl5 is much better at handling memory-intensive problems than
perl4.
-john
February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.
------------------------------
Date: 23 Feb 1998 09:07:23 GMT
From: Greg <jquinn@shell7.ba.best.com>
Subject: Hangs with sendmail ...
Message-Id: <6cre8b$jmj$1@nntp1.ba.best.com>
Hi,
Hoping someone can help me with this; I have a simple perl
cgi script that attempts to send an email through sendmail
but the bloody thing hangs when run either from the unix
command line or through a web server.
The code is shown below:
----------------------------------------------------------
open(MAIL, "| /usr/lib/sendmail $user\@college.org");
print MAIL "Date: $date\n";
print MAIL "From: admin\@college.org\n";
print MAIL "To: $user\@college.org\n";
print MAIL "Subject: A test\n\n";
print MAIL "Dear $desc,\n\n";
print MAIL "This is a test";
print MAIL "Goodbye!";
close(MAIL);
----------------------------------------------------------
All the variables are set OK.
This is my first time to try a pipe to sendmail and of
course it doesn't work!
This is running on Solaris 2.6 (ultra); Any ideas?
Thanks
Greg
------------------------------
Date: 22 Feb 98 21:09:22 +0000
From: "Rick Townsend" <rick@slicks.demon.co.uk>
Subject: Re: How to: "ENTER = submit form" ?
Message-Id: <1204.357T1121T12691841@slicks.demon.co.uk>
On 14-Feb-98 17:41:15, Aldert Hoogland said :
>I have built a web-store using the Selenal Sol web_store cgi-script.
>I changed some things in the script to make it more useful for my
>situation. There is one problem that I don't know how to solve:
>Many people hit the ENTER key to submit a form, for example many search
>engines work that way. The search-engine that is embedded in the
>web-store script however resets the form when you hit the ENTER-key.
>This can be very confusing for people, who might think the search-engine
>did not find any results.
>How do I need to change the script or the HTML for the form so that it
>will also submit the form after hitting the ENTER-key. If possible, I
>would prefer to make this changement only for forms that have only one
>input text-field. When there are more fields I want only the
>SUBMIT-button to submit the form.
Did you ever get an answer to this? If so I'd be interested to know
what it was.
Rick.
--
/\\ rick@slicks.demon.co.uk Sam-Bones \\ //
// \\ A4000 Warp 040 40Mgz Cybervision 64 \\ //
//===\\ home page http://www.slicks.demon.co.uk \\ //
// \\ Team AMIGA \//
--
------------------------------
Date: Mon, 23 Feb 1998 01:01:36 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: anand@erc.msstate.edu
Subject: Re: HowTo "break" and ?: operator
Message-Id: <34F110CA.A01A0386@coos.dartmouth.edu>
[posted and mailed]
anand@erc.msstate.edu wrote:
>
> Is there an equivalent of C "break" that can be used to terminate for example
> a while loop? I tried the same "break" but doesn't seem to work.
>From the Programming Perl index:
break statement (see last operator)
> And is there an equivalent of C's ?: operator used in conditional expressions?
Too bad you didn't try this one as well. It would have worked.
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
It's funny 'cause it's true ... and vice versa.
------------------------------
Date: 23 Feb 1998 00:56:15 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Killfile Triage
Message-Id: <6cqhff$k4l$1@csnews.cs.colorado.edu>
In comp.lang.perl.misc, Richard Caley <spt@cstr.ed.ac.uk> writes:
:In article <34eb0c11.1243611@news.tornado.be>, Bart Lateur (bl) writes:
:bl> Did you know that over 95% of the spam I receive, does not include my
:bl> e-mail address, neither in the "To:" nor in the "cc:" field?
:
:Did you know that a significant proportion of the legitimate mail I
:recieve [sic] does not contain my address in the To: or Cc: fields?
Oh for Pete's sake, use a real filter. ;-)
--tom
#!/usr/bin/perl
sub EX_UNAVAILABLE { 69 } # sendmail bounce
@pw = getpwuid($<);
require 'deliverlib/audit.pl';
require 'deliverlib/mh.pl';
*mail_audit = *log;
@exempt_users = qw{
bhalsey
buus
millert
drew
sharon
larry@wall.org
jason
gnat
orwant
chip
ora.com
dvk
};
# can't put @ signs in here; they get stripped
@mailing_lists = qw{
christ
cyberspace-l
ex-convex
hostmaster
members
conference
netstat
tpi-advis
packrats
perlbug
pc6.python.org
p5p
win32
penguin
root
perlclasses
perlfaq
perl-journal
porters
postmaster
ptk
pub-night
sage
tom
trn
webmaster
};
@banned_users = qw{
(gary|strand).*\@.*[nu]car
stanley\@oce.orst.edu
scott\@spy.org
pperchan
channel-a.com
Pascal_Amram
amram
pcmaileu.euro.ml.com
pmpcs.com
CCMAIL:Gateway
gmac\@netcom.ca
garrow
lovegod\@earthling.net
jlegere\@ipsa.net
rmgrise\@spacestar.net
};
&initialize();
$HOME = $ENV{HOME}
|| $ENV{LOGDIR}
|| $pw[7]
|| die "No home directory";
$USER = $ENV{USER}
|| $ENV{LOGNAME}
|| $pw[0]
|| die "Cannot determine user for id $>";
&mh_profile();
&openlog();
$maildrops = $MH{'path'} . '/in.coming';
# avoid duplicate messages, which are defined as
# having the same subject, body length, body checksum,
# and received with 60 minutes of each other.
local($db) = "$MH{'path'}/.dupmsgdb";
if (dbmopen(%Msgs, $db, 0644)) {
local($sum) = unpack("%31C*", $body);
local($len) = length($body);
$mid = $headers{'message-id'};
if ($Msgs{$mid}) {
&log("duplicate message id $mid discarded");
exit;
} elsif ($Msgs{$subject, $len, $sum} + 24*60*60 > time) {
&log("duplicate message body discarded")
unless $headers{from} =~ /\bcron\b/i;
# reset so perpetual msgs never get through
$Msgs{$subject, $len, $sum} = time;
exit; # duplicate
} else {
$Msgs{$subject, $len, $sum} = time;
$Msgs{$mid} = 1;
}
dbmclose(%Msgs);
}
foreach $user ( qw(garrow) ) {
if ( $headers{from} =~ /$user/i && grep(/porter/, @to, @cc) ) {
&log("bouncing p5p user $user");
print STDERR "Sorry, $user; you have been removed from the perl5-porters list on mail.perl.com for conduct unbecoming a perl porter.\n";
&deposit("$maildrops/banned");
exit 69;
}
}
foreach $user ( @banned_users ) {
if ( eval { $headers{from} =~ /$user/i } ) {
&log("bouncing banned user $user");
print STDERR "Unauthorized mail delivery from banned user rejected.\n";
&deposit("$maildrops/banned");
exit 69;
}
}
# $organization = "convex" if $organization eq "local" && (getpwnam($from))[0];
#if ($headers{'from'} =~ /tchrist(\@.*perl.com|$)/) {
#&log('discarding mail from myself');
#exit;
#}
push(@to, $headers{'apparently-to'}) if $headers{'apparently-to'};
push(@to, $headers{'resent-to'}) if $headers{'resent-to'};
push(@cc, $headers{'resent-cc'}) if $headers{'resent-cc'};
if (grep(/camel(-authors)?/,@to,@cc)) {
&vacation();
&log("resend camel mail to sharon");
&rcvdist('sharon@netlabs.com');
&log("store into perl/book");
&rcvstore("camel");
&log("deposit camel mail into personal");
&deposit("$maildrops/personal");
exit;
}
#if ($headers{'from'} =~ /$RESEND/oi) {
#&log('rcvstore outbox');
#&rcvstore("outbox");
#exit(0);
#}
if (looks_like_spam()) {
&log("Mail from known spam-hosting site rejected\n");
&deposit("$maildrops/spam");
exit(69);
}
mime_check();
if ($headers{'subject'} =~ /BOUNCE\s+perl-packrats:/i || $headers{'to'} =~
/owner-pack/i ) {
&log("bouncing packrats bounce");
print STDERR "Don't send me your bounced\n";
exit 69;
}
# this mail was not sent to me directly, so don't answer with vacation mail,
# but do everything else.
#
if (grep(/win32/i, @to, @cc)) {
&log("deposit into win32");
&deposit("$maildrops/win32");
exit;
}
if (grep(/cyberspace-l/i, @to, @cc)) {
&log("deposit into wotc");
&deposit("$maildrops/wotc");
$saved++;
}
if (grep(/trn/i, @to, @cc)) {
&log("deposit into trn");
&deposit("$maildrops/trn");
exit;
}
if (grep(/cgi|libwww/i, @to, @cc)) {
&log("deposit into cgi");
&deposit("$maildrops/cgi");
$saved++;
}
if (grep(/tk/i, @to, @cc)) {
&log("discarding ptk mail");
exit;
}
if (grep(/wu-?ftp/i, @to, @cc)) {
print STDERR "User not subscribed to this mailing list.\n";
&log("discarding wu-ftp mail");
exit(69);
}
if (grep(/sage/i, @to, @cc)) {
&log("discarding sage mail");
exit;
}
if (grep(/bug|porter/i, @to, @cc) || $header =~ /Apparently-to:.*perl/i) {
&log("deposit into pp");
&deposit("$maildrops/pp");
exit;
}
# default handling for mail addressed directly to me
if (grep(/^$USER\b/io, @to, @cc)
|| grep(/perl(book|class|faq)/i, @to, @cc)
|| grep(/camel.*?\@ora\.com/i, @to, @cc)
|| grep(/webmaster/i, @to, @cc)
)
{{
next if $from =~ /\b$USER\b/;
next if $from =~ /daemon|root|operator|postmaster/i;
&vacation();
# &rcvdist($RESEND);
&log("deposit into personal");
&deposit("$maildrops/personal");
exit; # don't fall through for copies
}}
# &vacation(); # not for lists
### &rcvdist($RESEND);
exit if $saved++;
if (junk() || grep /mailer|daemon|postmaster|root/i, @to,@cc) {
&log("deposit into junk");
}
if (!forme()) {
print STDERR "Unauthorized mail delivery denied\n";
&log("Not4Me Spam foiled");
&deposit("$maildrops/spam");
exit(69);
}
if (junk() || grep /mailer|daemon|postmaster|root/i, @to,@cc,$from) {
if ($body =~ /X-Mailer: Perl AutoFAQ/) {
&log("drop bounced autofaq");
exit;
}
if ($body =~ /Automatic mail from tchrist/) {
&log("drop bounced autoreply");
exit;
}
&log("deposit into junk");
&deposit("$maildrops/junk");
exit;
}
&log("deposit into lists");
&deposit("$maildrops/lists");
exit;
sub junk { ($precedence =~ /junk|bulk/i) }
sub forme {
return 1 if grep(/\b(tom|thoth|classes|tchrist)\b/i, @to, @cc);
for $addr ( @mailing_lists ) {
return 1 if grep(/$addr/, @to, @cc);
}
return 0;
}
sub looks_like_spam {
local $_ = $header;
study;
my $re;
while ($re = <DATA>) {
chomp $re;
my $nre = $re;
unless ($re =~ /^\W/) {
$re = '^(?:X-|From|To|Message|Received|Reply|NNTP|Comment).*'
. '\B' . $re . '\B';
}
if ( eval { /$re/mi } ) {
&log("Spamchecker caught $nre");
return 1;
}
if ($@) { &log("Badpat: $@\n") }
}
return 0;
}
sub exempt_user {
foreach my $user ( @exempt_users ) {
return 1 if eval { $headers{from} =~ /\b$user\b/i };
}
return 0;
}
sub mime_check {
local $_;
return unless $_ = $headers{"content-type"};
return if exempt_user();
return if $headers{"form"} =~ /mailer|daemon|root|operator|postmaster/i;
if ( m#multipart/#i ) {
mail_audit("bounce multipart mime");
mft_message();
print STDERR "REJECT multipart\n\n";
exit EX_UNAVAILABLE;
}
if ($headers{'content-transfer-encoding'} =~ /quoted-printable/ ) {
mft_message();
mail_audit("bounce quoted illegible");
print STDERR "REJECT quoted illegible\n\n";
exit EX_UNAVAILABLE;
}
return if /^text$/i || m#text/plain#i;
mft_message();
mail_audit("bounce MIME fmt $_");
exit EX_UNAVAILABLE;
}
sub mft_message {
&deposit("$maildrops/mimes");
print STDERR <<'EOF';
***********************************************
*** MFT (MIME Firewall Toolkit) Intercept ***
***********************************************
Your message was in MIME format, and has therefore been intercepted
by MFT. Although the headers were legible, the remaining parts are
likely unreadable without MIME-aware tools. For optimal convenience
and portability, please do not send MIME messages to individuals on
other systems than your own who have not requested it.
MIME mail not accepted; resend using plain ASCII, or make special
arrangements with recipient.
EOF
}
# <<<< other long lines were deleted for posting >>>
# ^(?:From|To|Received|Message).*(?:204\.130\.243\.|204\.137\.12[89]\.|204\.137\.1[3456789].\.|204\.137\.2[01].\.|204\.137\.22[0123]\.|204\.157\.|205\.137\.|205\.198\.|205\.254\.|206\.42\.|206\.62\.|206\.84\.|206\.148\.|206\.185\.|206\.249\.|207\.142\.|209\.14\.)
# ^(?:X-|From|Received|To|Reply-To).*(?:hotmail.com|ios.net|sojourn.com)
__END__
(?:153.34.122.79|mtigwc0..worldnet.att.net)
xxxjournal.net
never-ending-gallery.com
mxtro.com
call\.com
searchengine-help.com
(?:quantumcom.net|cvcom.net)
winstar.com
\bcyber(?!space)\S+\.com
clarksville.com
uplinkpro.com
pds\@pec.com
secretwebsite\.com
infoworksusa.com
(?:ctynet|sallynet|marynet|nancynet).com
mailexcite.com
earthpost.com
fwtunesco\.org
(?:xxxdoe.net|mail.sisna.com)
1-500-fingers.com
lostvegas.com
1-global.com
aligned\.com
powertips.com
we-deliver.net
t-1net.com
tnlb.com
ac.technicalplacement.com
\bix\.netcom\.com
infowatch.com
infowatch.net
splitinfinity
prolinx.net
uu\.net
1stamend.com
anyone\.com
207.25.201
sitecheck.com
datachannel.com
212\.net
4link.net
4u.com
50andup.com
citymagnet\.com
webworksonline\.com
hubnet.com
mercury.af2.com
@abinitio.com
bridge.net
@extractor\.com
moonglow\.com
abcguitars.com
abvintel.com
Accudata@acc-u-data
acd.net
adbenterprises.com
admin@magiccorp.com
adultchamber.com
adultsights.com
Advertise4u.com
afterhoursmag.com
allvip.com
alpha.net
alwaysaboveaverage.com
amateurknight.com
amateurnude.com
americapro.com
amvco.com
andrew@net-link.net
androtec.com
angie@megabytecoffee.com
anotherdomain.com
answerme.com
ar-web-service.com
asianmall.com
asiannude.com
astrobiz\.com
astroluz.com
atlantis.net
atlonline.com
attorneycrawford.com
audioforum.com
awgroup.com
babchurch.org
babeview.com
bank4u.com
banner-year.com
bbbiiizzz.com
beachnet\.com
bealeader.com
betterways.net
bhoman.com
big-web.com
bighotdeals.com
bigprofits
biolynx.com
shuttle.com.au
bisopps.com
bizimage.com
bluediamondu.com
bowecay.com
bpsi.net
breakthroughproducts.com
breakthruproducts.com
bridge-technologies.com
broad.way\.com
brobro.com
bu1kemai1.com
bulk-e-mail.com
bulkads.com
bulkmail.net
bulksendit.com
businesslink.net
buttonwood.net
bvbotanicals.com
c-s-consulting.com
californiakid
camelot.net
capella.net
carproinc.com
cash4u.com
ccsplprod.com
cefali.com
cei.com
cei.net
censuscd.com
centralregistry.com
centurycigar.com
cfriends.com
chag.com
chancellor.com
chatvideo.com
cheapcalls.com
cindymccain.com
clanorchids.com
clever.net
collegezone.com
comp-sol.com
computer4u.com
conestogasupply.com
consolidatedmold.com
contactmarket.com
cpemail.com
creativemedia.com
creditmds.com
crt-enterprises.com
csionline.com
cwave.com
cyber-broadcasting\.com
cyber-mail.com
cyber-time.com
cyber-times.com
cyber-wizard.com
cyberclearance.com
cyberemag.com
cyberfamily.net
cybermaxx.com
cyberout.com
cyberout96.com
cyberpr[o0]m[o0]
cyberpr0m0.com
cyberpr0mo.com
cyberpreneur.com
cyberprom0.com
cyberpromo.com
cyberpromo.net
cyberpromotions.com
cyberramp.com
cyberservices.com
cybersexbrothel.com
cybershopclub.com
cybertimes
d3vdo.com
damsel.com
danny@ans.com.au
darnassoc.com
datadepo.com
datagoldsystems.com
davenda.com
daveweil.com
daviscomputers.com
delatech.com
desen.com
devout.com
dex.com
dialsprint.net
diode.com
divcomm.com
dm1.com
dn.net
dnsent@mail.deltanet\.com
domainseller.com
Don'tEver@MessWith.Me
dr@ris.net
dstrahan.com
e-health.com
e-values.com
eager4u.com
(?:To|From|Cc):.*?(?!zot)\.earthlink
earthfriends.com
earthstar.com
earthsuccess.com
easywave.com
econ-enterprises.com
electriciti.com
electro-mail.com
emai12u.com
emai1srus.com
email.com
email2u.com
email2you.com
emailpage.com
emailsrus.com
emaster.com
emutoday.com
erotic4u.com
eroticsites.com
escorts-on-line.com
escortsrus.com
eternal.net
excited4u.com
fastone.com
fastresults.com
fatalblindness.com
feir.com
ffinternet.com
fia.net
fight4rights.com
findsuccess.com
first-team.com
flasexnet.com
foamworks.com
fordandassoc.com
forfree.com
fpausa.com
freeconnect.com
freedomstarr.com
freenudity.com
freeppp.com
freepromo.com
freeview.com
From.*(?:uscom.com)
future.at
gamut
gcproductions.com
gemstars.com
gemstarts.com
gen.com
genasys-mechanical.com
genesisnetwork.net
georgewalther.com
georgewalthers.com
getexcited.at
getrich.com
gilels.com
girlsplay.com
globalent.net
globalfn.com
globecomm.net
godhatesfags.com
gohomeray.com
goldweb.net
good-earth.com
gormly\.com
gosnet.com
greentimes.com
growthfunding.com
grphcimgs.com
gtwinc.com
hallgroup.com
hardcorealley.com
hbhinc.com
health2.com
hereyougo.com
hi-cap.com
hitmasters.com
hk.com
hk.net
hkstar.com
hmall.com
hoflink.com
home-biz.net
HOMEMAIL.COM
honeys.com
hookup.com
hootowl.com
host@internet.com
hotgrrls.com
hottstuff.com
howling.com
hunkview.com
huxtableassociates.com
ibb.com
ictcom.com
Idea4u.com
iiu.com
imag.net
imago.net
imc3.com
impotence-away
iname.com
infinitelegacies.com
infiweb.com
info@optimalmethods.com
inforamp.net
information4U.com
infotextinc.com
intense4u.com
internet-mail.com
internet.com
internetfleamarket
internetfree.com
ipt.aol\.com
iq-internet.com
islandtradersintl.com
isp-inter.net
ispam.com
ispam.net
ivbp.com
jcpromotions.com
jjj.com
job4u.com
jobshopstaffing.com
john@globetech.demon.co.uk
jpro.com
jservices.com
justamazing.com
kazuyoshi.com
keepmailing.com
keygate.net
keyinfonet.com
koolshade.com
kopensky.com
l-e-n-members.com
l-e-n.com
lanphere1.com
laurient.com
len-update.com
lettucepatch
lewd4u.com
libertyteam.com
lifeplus.at
light-avenue.com
light.co.za
likallio@up.net
ljsimon.com
locationmanagement.com
lords.com
lrspublications.com
ltgcomm.com
lust4u.com
luv2cu.com
mad.scientist.com
magical-mail.com
mailbank.com
mailloop.com
mailreport.com
mailzone.com
malenude.com
managementresultsinc.com
market1.com
mary-world.com
marynet.com
mas-automate.com
massemail.com
massmarket.com
matrixcapital.com
mci2000.com
megd.com
memo.net
meoksnet.com
metro.net
mhclimited.com
microsp\.com
monarchy.com
mortagemanager.com
mremail.com
msm.net
multi-level.com
multi@manybiz.com
mustbuy.com
mvisibility.com
myself.com
n-i.com
nancynet.com
naplesnet.com
natureplus.com
net-works.net
netamerica1.com
netchem.chem
netcreations.com
nethaus.net
netime.com
netway.net
newpyru@netnet.net
nnt.com
noblock.com
nocensorship.com
notnet\.com
nowhere\.com
oak.visc.com
omnisolve.com
overtheair.com
pacific-ocean.com
pantless.com
phazer.com
phoenix.at
pin-point.com
pleaseread.com
pleasure4u.com
popstar.com
positive-thinking.com
postmaster@mail.babeview.com
ppgsoft.com
presidency.com
prodigy.net
promocyber.com
promotions.com
pwrnet.com
qcnet.com
quantcom.com
quantumcom.net
randomdomain.com
rcnet.com
reedrules.com
revenue.com
rmjent.com
rob@pair.com
rosepin.com
rosey.com
sallynet.com
sanfordw.com
satelnet.org
savearth.com
savepaper.com
savetrees.com
scientist.com
scn.org
seductress.com
seemen.com
sendmail1.com
sensuousexotics.com
seriousincome.com
shoppingplanet.com
sister.com
smtp.*interramp.com
snappy.com
sndsngnwgift.com
softcell.net
spicy4u.com
stock-spectator.com
stockpick.com
stoptheblock.com
Social.Connect
strutyourstuff.com
studline.com
Summers.com
svetlana-spb\.com
swallace.com
sweeties.com
sweinc.com
sympatico.ca
tara-helps.com
tech-center.com
telysis.com
theguru.com
themall.net
TOPSERVICE.COM
tp22@mail.utexas.edu
tri-lakes.net
twave.net
uconect.com
ultimate.org
ultranet.ca
unclaimed-property\.com
upx.net
urgentmail.com
usa.net
usseal.com
vapors.com
virtual-adnet.com
webcreations.com
webersmall\.com
webpower.com
weirdness.com
westworld.com
workmail.com
writeme.com
wvbp.com
xtc4u2c.com
xtv.com
yougotmail.com
youvegotmail.com
zilo.com
zim.com
ziplink.net
zrs.net
zsigo\.com
zygn.com
zygon.com
gis.net
^(?:From|Comments|Received|To|Reply|X-).*@pwrn(?:e|i)t.com
^(?:From|Comment|Message|To).*patch.*primenet\.com
^(?:From|Received).*(?:204.216.216.130|192.188.72.17)
^(?:From|Received).*(?:agis|atlantis).net
^(?:From|Received).*(?:big-web|bigweb)\.com
^(?:From|Received).*(?:connectup.com|thegrid.net)
^(?:From|Received).*(?:cupid\.com|glasscity.net)
^(?:From|Received).*(?:cyberhighway.net|micron.net)
^(?:From|received).*(?:death-star.com|206.154.39\.)
^(?:From|Received).*(?:findsuccess\.com|ynterpro\.com)
^(?:From|Received).*(?:franklin-one.com|supernet.net)
^(?:From|Received).*(?:fullmkt\.com|totaltel\.com)
^(?:From|Received).*(?:internetmedia\.com|cyber-space.net)
^(?:From|Received).*(?:int|clev).prodigy.net
^(?:From|Received).*(?:opmcybershop|decaturnet|yoursuccess).com
^(?:From|Received).*(?:progressfort\.com|newhorizonsads\.com|globalprosp\.com|globalprosper\.com|globalprosper\.com|pathinternational\.com|markettheworld\.com|marketexploding\.com|globalfn\.com)
^(?:From|Received).*(?:servint.com)
^(?:From|Received).*(?:telysis.com|206\.222\.197)
^(?:From|Received).*(?:unisisteq|theresteq)\.com
^(?:From|Received).*204.182.94.6(?:5|8)
^(?:From|Received).*204.216.109.131
^(?:From|Received).*207.211.116
^(?:From|Received).*208.206.54\.
^(?:From|Received|Message|To).*(?:207.238.142\.|206.181.122.58)
^(?:From|Received|Reply).*(?:KD4@msn|KenD333@aol).com
^(?:From|Received|To).*(?:saylordesign|206.150.180)
^(?:Message-|X-|From|To|Received|Reply|NNTP|Comment).*(?:adgrafix.com|tio.com|psi.ca|netnutz.com|\.future.at|globalone.net|2001.net|globalcomputing.com|mediaone.net|polaris.net|cyber-broadcasting.com|out..ibm.net|startext.net|londen.tip.nl|clubmail..com|arn.net|infoback.net|netopp.com|clubmail..com|st-clair.mo.us|208.201.160|ixpress.com|arctic\.net|finite-tech\.com|cartridge.com|ipgnet.com|dutch-delight.nl|samalama.com|inka\.de|cupid.com|iswt.com|slog.com|eastland.net|towhee.com|ezlink.com)
^(?:Message-|X-|From|To|Received|Reply|NNTP|Comment).*(?:webspinerz.com|mwci.net|lords.com|cagleg.net|ee.net|dancris.com|digiweb.com|tlxnet.net|netfind.net|applink.com|umark.com|delphy.com|worldwidepromo.com|wangfed.com|flinet.com|owlsnest.com)
^(?:Received.*205.218.152.117|.*sweeties\.com)
^(?:Received|From).*@(?:dm1\.com|cyberdrive.net)
^(?:To|X-|From|Reply-to|Rely-To|Received).*(?:buytime.com|chag.com|selfhelpnet.com|moneyworld.com|fincon.com|natureplus.com|helpnet.com|NATUREPLUS.com|HELPnet.com|BUYTIME.com|CHAG.com|SELFHELPnet.com|MONEYWORLD.com|FINCON.com)
^(?:X-Sender|From|Received|Reply).*(?:acun.com|206.27.86.1)
^(?:X-Sender|From|Received|Reply).*(?:ozemail.com.au|203.108.4.(?:0|38))
^(?:X-Sender|From|Received|Reply).*(?:softcell.(?:net|de)|metronet.de)
^(?:X-Sender|From|Received|Reply).*gte.net
^(?:X-Sender|From|Received|Reply).*ham@ix.netcom.com
^(?:X-Sender|From|Received|Reply).*homeworkers.com
^(?:X-Sender|From|Received|Reply).*ilos.net
^(?:X-Sender|From|Received|Reply).*skylink.net
^(?:X-Sender|From|Received|Reply).*vci.net
^(?:X-|From|Message-|Received|Comment).*(?:remail@miron.vip.best.com|mixmaster@remail.obscura.com|remailer@replay.com|alias@alpha.c2.org|nymrod@nym.jpunix.com|mix@zifi.genetics.utah.edu|remailer@remailer.nl.com|haystack@holy.cow.net|lucifer@dhp.com|remailer@cypherpunks.ca|winsock@c2.org|config@nym.alias.net|remailer@huge.cajones.com|mix@squirrel.owl.de|middleman@jpunix.com|alias@alias.cyberpass.net|dustman@athensnet.com|config@weasel.owl.de|x@deathsdoor.com|taskey.com)
^(?:X-|From|Received|Message).*(?:earthstar.com|earthonline.com|mailpro.com|primeleads.com|us1@usinternet.com)
^.*(?:X-Sender|From|Received|Sender|X-Sender|Return-Path|Message-ID).*juno.com
^.*nicers.com
^.*youcan@dom.com
^Comments: Authenticated sender .*pop3.interramp.com
^From.*(?:ALLcomnet.com|IMALL.com|allcomnet.com|imall.com)
^From.*(?:capella.net|129\.37\.239)
^From.*(?:conserve@savearth.com|putpeel@putpeel.com|putpeel@nigel.axess.net)
^From.*(?:express|Cstone)@isp-inter.net
^From.*(?:party|octonline).com
^From.*(?:positive-thinking.com|yvv.com|tripod.com|azstarnet.com)
^From.*(?:quantcom.com|cvcom.net)
^From.*(?:spectro.net|palware.com)
^From.*(?:vivanet.com|lynnet.com)
^From.*(?:nicelife\@texas\.ca)
^From.*(?:vpx|ilk)\.com
^From.*(?:xtend|tricreations|target-email)\.com
^From.*enterprise@compuserve.com|Received.*199\.174\.|From.*invest@compuserve
^From:.*(?:honeys.com)
^From:.*(?:netfree.com)
^Received.*(?:199.173.16[05]\.|204.245.127.)
^Received.*(?:207\.201\.206.|elan-vital.com)
^Subject:.*Returned mail *warning.*cannot send
^To.*friend@host.com
^To: Friend@public\.com
^To: Profits2u@aol\.com
^X-Mailer: Allaire Cold Fusion
goldenapples.com
nbis\@ccw\.net
info\@inexchange\.net
info\@travelshop\.de
kjacks\@kwinet\.com
steve1\@df\.alphatwo\.net
tq6621\@worldnet\.att\.net
asginc\@msn\.com
nexus\@onramp\.com
scriptmaster\@scriptsearch\.com
paul\@dante\.lek\.net
pat124\@shorelineent\.com
resume\@mindsrc\.com
reply\@elist500\.com
traffic\@trafficboost\.com
mmd\@focus\-asia\.com
deanders\@maximgroup\.com
hotmail\.com
k112\@alegup\.com
cservice\@misti\.com
mail\.com
spt\@cstr\.ed\.ac\.uk
sae\@saeweb\.com
--
Tom Christiansen tchrist@jhereg.perl.com
No, I'm not going to explain it. If you can't figure it out, you didn't
want to know anyway... :-)
--Larry Wall in <1991Aug7.180856.2854@netlabs.com>
------------------------------
Date: Mon, 23 Feb 1998 01:20:09 -0800
From: Craig <rcd@kiwi.net>
Subject: Re: Mail Attachments via Perl Sendmail A REAL ANSWER!
Message-Id: <34F13F48.78824BFE@kiwi.net>
This is a multi-part message in MIME format.
--------------E643362859EF6F2A214915BE
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Recently I asked the NG if anyone knew how to send attachments with Perl's
sendmail. It was tough finding an answer that didn't require the MIME::Lite
module. I figured it out though. I pieced a few things together that a few
posters had said and compiled a Perl script that will do it. If you are
among the frustrated as I was, fear no longer. The script is attached. I
currently have the script configured to be able to send jpg, gif, zip,
html, htm, txt, dat, doc, pl, and cgi attachments. It's not designed for
other file extensions, but the code is simple, I'm sure you can figure it
out if you need to send .exes or something. I successfully tested it with
at least 3 different email programs (as the receivers) and rocketmail too.
I'm not sure if it will work sending images to Macs though.
I appreciate the help that this NG has given me and now I am giving back.
Craig Dansie
Dansie Website Design
http://www.dansie.net
design@dansie.net
--------------E643362859EF6F2A214915BE
Content-Type: application/x-perl; name="attach.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="attach.pl"
#!/usr/bin/perl
# By Craig Dansie <www.dansie.net>
# and Andrew Starr <http://www.amherst.edu/~atstarr>
# 2/22/98
#####################################################
# Variables
# Put the name of your file here
$filename = "attach.pl";
# Location of sendmail program on your host
$mailprog = '/usr/sbin/sendmail';
# The directory location of where the attachment is located.
$file = "/usr/home/r/rcd/public_html";
#$mailprog = '/bin/sendmail';
#$file = "/usr/local/etc/httpd/htdocs/dansie/Dotred.gif";
# The email where you want the attachment to be sent to.
$to = $ENV{'QUERY_STRING'};
# Who the message is from
$myemail = 'rcd@kiwi.net';
# Subject of the email.
$subject = "Attachment!";
# Type your message here.
$message = "This is an attachment.";
# Confirmation message that the email has been sent.
$confirm_message = "The email and attachment has been sent!";
###############################################
# DONE!
###############################################
$file = $file . "/" . "$filename";
######################################################
# Encode according to file extention.
if ( $filename =~ /\.gif$/i )
{
$content_type = "image/gif; name=\"$filename\"; x-mac-type=\"47494666\"; x-mac-creator=\"4A565752\"";
$encoding = "base64";
}
if ( $filename =~ /\.jpg$/i )
{
$content_type = "image/jpeg; name=\"$filename\"; x-mac-type=\"4A504547\"; x-mac-creator=\"4A565752\"";
$encoding = "base64";
}
if ( $filename =~ /\.zip$/i )
{
$content_type = "application/zip; name=\"$filename\"; x-mac-type=\"705A4950\"; x-mac-creator=\"705A4950\"";
$encoding = "base64";
}
if ( $filename =~ /\.html$/i || $filename =~ /\.htm$/i )
{
$content_type = "text/html; charset=\"us-ascii\";";
}
if ( $filename =~ /\.txt$/i || $filename =~ /\.dat$/i || $filename =~ /\.doc$/i || $filename =~ /\.pl$/i || $filename =~ /\.cgi$/i )
{
$content_type = "text/plain; charset=\"us-ascii\";";
}
#############################################
# Get the attachment
if ( $encoding )
{
open (IMAGE, "$file");
binmode (IMAGE);
undef $/; $rawimage = <IMAGE>; $/ = "\n";
close IMAGE;
$b64image = &encode_base64 ($rawimage);
chomp $b64image;
}
else # Doesn't need encoding. (Plain text type of document)
{
open (FILE,"$file");
@file = <FILE>;
close (FILE);
}
#############################################
# Send Email
open (MAIL, "| $mailprog $to") || die ("$0: Fatal Error! Cannot open sendmail:: $!\n");
print MAIL "Reply-to: $myemail\n";
print MAIL "From: $myemail\n";
print MAIL "To: $to\n";
print MAIL "Subject: $subject\n";
print MAIL "Mime-Version: 1.0\n";
print MAIL "Content-type: multipart/mixed; boundary=\"======================_888227034==_\"\n";
print MAIL"--======================_888227034==_
Content-Type: text/plain; charset=us-ascii";
print MAIL "\n\n";
print MAIL "$message\n\n";
print MAIL "--======================_888227034==_
Content-Type: $content_type\n";
if ( $encoding )
{
print MAIL "Content-Transfer-Encoding: $encoding\n";
print MAIL "Content-Disposition: inline; filename=\"$filename\"\n\n";
print MAIL "$b64image";
}
else
{
print MAIL "Content-Disposition: inline; filename=\"$filename\"\n\n";
foreach $line (@file)
{
print MAIL "$line";
}
}
print MAIL "\n\n\n";
print MAIL "--======================_888227034==_--";
close (MAIL);
#######################################
# Confirm Mail has been sent
print "Content-type: text/html\n\n";
print "$confirm_message";
#######################################
sub encode_base64 ($;$)
{
my $res = "";
my $eol = $_[1];
$eol = "\n" unless defined $eol;
while ($_[0] =~ /(.{1,45})/gs)
{
$res .= substr (pack ('u', $1), 1);
chomp ($res);
}
$res =~ tr|` -_|AA-Za-z0-9+/|; # `# help emacs
my $padding = (3 - length($_[0]) % 3) % 3;
$res =~ s/.{$padding}$/'=' x $padding/e if $padding;
if (length $eol) { $res =~ s/(.{1,76})/$1$eol/g; }
$res;
}
--------------E643362859EF6F2A214915BE--
------------------------------
Date: Sun, 22 Feb 1998 16:54:32 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Regexp question...
Message-Id: <34F09E9A.C3435B3A@coos.dartmouth.edu>
Brian McCauley wrote:
>
> The "*" qualifier in regexp matches as many as possible of something.
> Where there is abiguity the first one wins.
^^^^^^^^
Does this describe regexes created by Abigail? :-)
> [...]
>
> I've seen some extened versions of regex that have a qualifer that
> matches as few as possible of something. I don't think perl has this
> but I may be wrong.
You mean the non-greedy quantifiers '*?', '+?', and '??' ?
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1956
**************************************