#!/usr/bin/perl open (SUBJECT2, "<$memberinfo/mmailsubject.txt"); if ($LOCK_EX){ flock(SUBJECT2, $LOCK_EX); } @fmpg = ; close (SUBJECT2); foreach $fji6(@fmpg) { @f9ih = split(/\|/,$fji6); chomp($hlk9); } $c06p = "$f9ih[0]"; $jpg9 = "$f9ih[2]"; chomp($f9ih[1]); $f87k = $f9ih[3]; chomp($f87k); $dj6h = $f9ih[4]; chomp($dj6h); $ek46 = $f9ih[6]; chomp($ek46); $iobm = $f9ih[7]; chomp($iobm); $k5fh = $f9ih[8]; chomp($k5fh); $aci1 = $f9ih[9]; chomp($aci1); $bpmc = $f9ih[11]; chomp($bpmc); $h44j = $f9ih[12]; chomp($h44j); $e2g9 = $f9ih[13]; chomp($e2g9); $g4cm = $f9ih[14]; chomp($g4cm); $id0j = $f9ih[15]; chomp($id0j); $e09k = $f9ih[16]; chomp($e09k); $doea = $f9ih[17]; chomp($doea); $bk2d = $f9ih[18]; chomp($bk2d); $e6l3 = $f9ih[19]; chomp($e6l3); open (FILE,"<$lists/$f9ih[1].signature"); @kjmf = ; close(FILE); undef $/; open (ITEXT,"<$memberinfo/$bpmc"); if ($LOCK_EX){ flock(ITEXT, $LOCK_EX); } $jp43 = ; close (ITEXT); $/ = "\n"; undef $/; open (INVITATION,"<$memberinfo/$h44j"); if ($LOCK_EX){ flock(INVITATION, $LOCK_EX); } $ki9p = ; close (INVITATION); $/ = "\n"; unless ($e6l3) { &aca("$f9ih[1]list"); open (DATDUPES,"<$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DATDUPES, $LOCK_EX); } @g6cf = ; close(DATDUPES); open (DATDUPES2,">$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DATDUPES2, $LOCK_EX); } foreach $ed48(@g6cf) { chomp($ed48); $g6cf{$ed48} = 1; } while (($k85c,$dl7m) = each(%g6cf)) { print DATDUPES2 "$k85c\n"; } close(DATDUPES2); &acc("$f9ih[1]list"); &aca("$f9ih[1]removes"); if (-e "$removes/$f9ih[1].list") { undef $/; open (LIST1,"<$removes/$f9ih[1].list"); if ($LOCK_EX){ flock(LIST1, $LOCK_EX); } $ec0d = ; close (LIST1); $/ = "\n"; (@k84a) = split(/\n/, $ec0d); foreach $b85f(@k84a) { chomp($b85f); $hpo6 =~ s/\r//; $hpo6 =~ s/\s//g; chomp($ggn8); open (DAT,"<$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } @g6cf = ; close(DAT); $k1a6 = 0; open (DAT,">$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } foreach $ed48(@g6cf) { chomp($ed48); if ($b85f ne $ed48) { print DAT "$ed48\n"; } } } close(DAT); unlink("$removes/$f9ih[1].list"); &acc("$f9ih[1]removes"); } if (-e "$bounces/$f9ih[1].unsubscribe") { &aca("$f9ih[1]unsubscribe"); undef $/; open (LIST1,"<$bounces/$f9ih[1].unsubscribe"); if ($LOCK_EX){ flock(LIST1, $LOCK_EX); } $ec0d = ; close (LIST1); $/ = "\n"; (@k84a) = split(/\n/, $ec0d); foreach $b85f(@k84a) { chomp($b85f); $hpo6 =~ s/\r//; $hpo6 =~ s/\s//g; chomp($ggn8); open (DAT,"<$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } @g6cf = ; close(DAT); $k1a6 = 0; open (DAT,">$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(DAT, $LOCK_EX); } foreach $ed48(@g6cf) { chomp($ed48); if ($b85f ne $ed48) { print DAT "$ed48\n"; } } } close(DAT); unlink("$bounces/$f9ih[1].unsubscribe"); &acc("$f9ih[1]unsubscribe"); } } if ($e6l3) { @g6cf = $jpg9; } else { &aca("$f9ih[1]list"); open (LIST,"<$lists/$f9ih[1].list"); if ($LOCK_EX){ flock(LIST, $LOCK_EX); } @g6cf = ; close (LIST); &acc("$f9ih[1]list"); } open (LOG, ">$maildir/$ek46.txt"); unless ($e6l3) { $cdcn = @g6cf; $ki9p =~ s/\r//g; @ki9p = split (/\n/,$ki9p); push(@g6cf, @ki9p); $djb9 = @g6cf; $i93h = ""; $d836 = '1'; $b3bf = '0'; } foreach $hc87(@g6cf) { if ($e2g9 eq 'on') { if ($b3bf == "$g4cm") { &aaf; sleep ($id0j); $b3bf = "0"; } } chomp($hc87); $hc87 =~ s/\r//; $c06p = "$f9ih[0]"; $jpg9 = "$f9ih[2]"; $bjcg = "$memberinfo/tempfile"; $e2pf = ""; $gn8b = ""; if ($d836 > $cdcn) { $i93h = "1"; if($f9ih[9] eq 'on') { $h27l = $hc87; $h27l =~ s/\@/\=\:/g; $e2pf .= $jp43; $e2pf .= "
"; $e2pf .= "Subscribe $hc87
"; $e2pf .= "-" x 75 . "

"; } else { $h27l = $hc87; $h27l =~ s/\@/\=\:/g; $gn8b .= $jp43; $gn8b .= "\r\n"; $gn8b .= "http:\/\/$f87k$dj6h?a=1&l=$f9ih[1]&e=$h27l\r\n"; $gn8b .= "-" x 75 . "\r\n\r\n"; } } open (MESSAGE2, "<$memberinfo/$ek46-mm.txt"); if ($LOCK_EX){ flock(MESSAGE2, $LOCK_EX); } @bf33 = ; close (MESSAGE2); open (MESSAGE4, "<$memberinfo/$ek46-mm-textonly.txt"); if ($LOCK_EX){ flock(MESSAGE4, $LOCK_EX); } @dk4n = ; close (MESSAGE4); foreach $hmff(@bf33) { if (lc $iobm eq 'on') { $hmff =~ s/page=http:\/\//page=/g; $hmff =~ s/page=/http:\/\/$f87k$dj6h?which=$ek46&page=/; $hmff =~ s/address=/address=$ed48/; } $e2pf =~ s/\r//g; $e2pf .= "$hmff"; unless ($d836 > 1) { print LOG "$hmff"; } } foreach $bbc8(@dk4n) { if (lc $iobm eq 'on') { $bbc8 =~ s/page=http:\/\//page=/g; $bbc8 =~ s/page=/http:\/\/$f87k$dj6h?which=$ek46&page=/; $bbc8 =~ s/address=/address=$ed48/; } $gn8b =~ s/\r//g; $gn8b .= "$bbc8"; unless ($d836 > 1) { print LOG "$hmff"; } } $e2pf .= "\n\n"; $gn8b .= "\n\n"; foreach $hpo6(@kjmf) { $e2pf .= "

$hpo6

"; $gn8b .= "$hpo6"; unless ($d836 > 1) { print LOG "$hmff"; } } $e2pf .= "\r\n\r\n"; $gn8b .= "\r\n\r\n"; if ((lc $f9ih[5] eq 'on') && (!($i93h))) { $e2pf .= "

"; $e2pf .= "-" x 75 . "
"; $e2pf .= "To be unsubscribed from the $e09k mailing list, simply click on the link below:
"; $h27l = $hc87; $h27l =~ s/\@/\=\:/g; $e2pf .= "Unsubscribe $hc87
"; $e2pf .= "

"; } unless ($f9ih[10]) { $e2pf .= "

This mailing proudly powered by Subscribe Me™ Professional - Enterprise Edition

\r\n\r\n"; } if ((lc $f9ih[5] eq 'on') && (!($i93h))) { $gn8b .= "-" x 75 . "\n"; $gn8b .= "To be unsubscribed from the $e09k mailing list "; $gn8b .= "simply click on the link below \n"; $h27l = $hc87; $h27l =~ s/\@/\=\:/g; $gn8b .= "http://$f87k$dj6h?r=1&l=$f9ih[1]&e=$h27l\n"; $gn8b .= "\n\n"; } unless ($f9ih[10]) { $gn8b .= "This mailing proudly powered by Subscribe Me(TM) Professional - Enterprise Edition\n"; $gn8b .= "http://www.subscribemepro.com"; } $e2pf .= "\r\n\r\n"; $gn8b .= "\n\n"; &aac("$hc87","$jpg9","$c06p","$e2pf",0,"$e09k","$gn8b","$doea","send_as_text"); unless ($e6l3) { &aag; } close (LOG); $d836++; $b3bf++; } unlink("$memberinfo\\mmailsubject.txt"); unlink("$memberinfo\\$ek46-mm.txt"); unlink("$memberinfo\\$bpmc"); unlink("$memberinfo\\$h44j"); $d836--; unless ($e6l3) { &ad8; } sub ad8{ $e2pf = ""; $gn8b = ""; $e2pf .= "Subject: Subscribe Me Mass Mailing Status!\r\n\r\n"; $gn8b .= "Subject: Subscribe Me Mass Mailing Status!\r\n\r\n"; $e2pf .= "Your Subscribe Me Mass Mailing was successfully\r\n"; $gn8b .= "Your Subscribe Me Mass Mailing was successfully\r\n"; $e2pf .= "sent to $d836 e-mail addresses.\r\n\r\n"; $gn8b .= "sent to $d836 e-mail addresses.\r\n\r\n"; $e2pf .= "Automated Subscribe Me Responder\r\n\r\n"; $gn8b .= "Automated Subscribe Me Responder\r\n\r\n"; &aac("$jpg9","$jpg9","Subscribe Me Mass Mailing Status!","$e2pf",0,"$e09k","$gn8b","send_as_html","$bk2d"); } sub aac{ my($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d) = @_; if (lc $mailusing eq 'sendmail') { if ($username) { open (MAIL, "|$mailprog -t -f \"$jpg9\" ") || print ("Can't open $mailprog!\n"); } else { open (MAIL, "|$mailprog -t") || print ("Can't open $mailprog!\n"); } print MAIL "To: $gac5\n"; print MAIL "From: $e09k <$jpg9>\n"; print MAIL "Reply-To: $e09k <$jpg9>\n"; print MAIL "Subject: $c06p\n"; print MAIL "MIME-Version: 1.0\r\n"; print MAIL "Content-Type: multipart/alternative\;\n boundary=boundary42\r\n"; print MAIL "--boundary42\r\n"; if (($bk2d) || (!($doea))) { print MAIL "Content-Type: text/plain; charset=\"ISO-8859-1\"\r\n"; print MAIL "Content-Transfer-Encoding: 8bit\r\n\r\n"; $gn8b =~ s/\r//g; print MAIL "$gn8b"; print MAIL "\n\n"; if (!($doea)) { print MAIL "--boundary42--\r\n"; } else { print MAIL "--boundary42\r\n"; } } if ($doea) { print MAIL "Content-Type: text/plain; charset=\"ISO-8859-1\"\r\n"; print MAIL "Content-Transfer-Encoding: 8bit\r\n\r\n"; $e2pf =~ s/\r//g; print MAIL "$e2pf"; print MAIL "\n\n"; print MAIL "--boundary42--\r\n"; } print MAIL "\n\n"; close MAIL; } else { $j48a = &aad($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d); if ($j48a < 1) {print "
\nSendmail error # $j48a
\n";} } } sub aad{ my ($gac5, $jpg9, $c06p, $e2pf, $bjcg, $e09k, $gn8b, $doea, $bk2d) = @_; my ($eplb) = $jpg9; if (!$gac5) { return -8; } my ($h9gj, $jolj, $g133); my ($fj18) = 2; my ($gjel) = 1; $h9gj = (getprotobyname('tcp'))[2]; $jolj = 25; $kb2k = ($smtp_addr =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) ? pack('C4',$1,$2,$3,$4) : (gethostbyname($smtp_addr))[4]; if (!defined($kb2k)) { return -1; } if (!socket(S, $fj18, $gjel, $h9gj)) { return -2; } if (!connect(S, pack('Sna4x8', $fj18, $jolj, $kb2k))) { return -3; } select(S); $| = 1; select(STDOUT); $_ = ; if (/^[45]/) { close S; return -4; } print S "helo localhost\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "mail from: <$jpg9>\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "rcpt to: <$gac5>\r\n"; $_ = ; if (/^[45]/) { close S; return -6; } print S "data\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } print S "To: $gac5\r\n"; print S "From: $e09k<$jpg9>\r\n"; print S "Reply-to: $e09k<$eplb>\r\n" if $eplb; print S "Subject: $c06p\r\n"; print S "MIME-Version: 1.0\n"; print S "Content-Type: multipart/alternative\;\n boundary=boundary42\n\n"; print S "--boundary42\n"; if (($bk2d) || (!($doea))) { print S "Content-Type: text/plain; charset=\"ISO-8859-1\"\n"; print S "Content-Transfer-Encoding: 8bit\n\n"; $gn8b =~ s/\r//g; print S "$gn8b"; print S "\n\n"; if (!($doea)) { print S "--boundary42--\n"; } else { print S "--boundary42\n"; } } if ($doea) { print S "Content-Type: text/html; charset=\"ISO-8859-1\"\n"; print S "Content-Transfer-Encoding: 8bit\n\n"; $e2pf =~ s/\r//g; print S "$e2pf"; print S "\n\n"; print S "--boundary42--\n"; } print S "\r\n.\r\n"; $_ = ; if (/^[45]/) { close S; return -7; } print S "quit\r\n"; $_ = ; close S; return 1; } sub aaf{ $e09k = shift(); $e2pf = ""; $gn8b = ""; $e2pf .= "Your Subscribe Me Mass Mailing is currently in progress.\n\n"; $gn8b .= "Your Subscribe Me Mass Mailing is currently in progress.\n\n"; $e2pf .= "Your current Subscribe Me batch mailing has sent to $b3bf e-mail addresses\n"; $gn8b .= "Your current Subscribe Me batch mailing has sent to $b3bf e-mail addresses\n"; $e2pf .= "and is now on hold. The next batch of mailings will be in $c057{'every'} seconds\n\n"; $gn8b .= "and is now on hold. The next batch of mailings will be in $c057{'every'} seconds\n\n"; $e2pf .= "Automated Subscribe Me Responder\n\n"; $gn8b .= "Automated Subscribe Me Responder\n\n"; &aac("$jpg9","$jpg9","Subscribe Me Mass Mailing Status!","$e2pf",0,"$e09k","$gn8b"); } sub aag{ open (MAILDIR, ">$maildir/$ek46-count.txt"); if ($LOCK_EX){ flock(MAILDIR, $LOCK_EX); } print MAILDIR "$d836,$hc87,$e09k\n"; close(MAILDIR); } sub aca{ my $g6j6 = $_[0]; my $gg8j = time + 5; if (-e "$tempdir/$g6j6.lock") { open (LOCK,"$tempdir/$g6j6.lock"); my $cd06 = ; close (LOCK); chomp ($cd06); if ($cd06 < (time - 10)) { unlink ("$tempdir/$g6j6.lock"); } } while (-e "$tempdir/$g6j6.lock" && time < $gg8j) { sleep(1); } if (-e "$tempdir/$g6j6.lock") { unless ($hlj1) { print "Content-type: text/html\n\n"; $hlj1 = 1; } unless ($j81f) { &ab7; } print qq—\n
\n \n \n \n \n
\n

Subscribe\n Me Status: Multiple Submissions Detected!

\n\n\n

Multiple submissions\n were detected. This sometimes occurs if you press the "SUBSCRIBE" button\n more than once, or that your browser was refreshed while waiting for a response.

\n Please check your e-mail for the results of your\n submission

\n—;&ab8; exit; } else { open (LOCKFILE, ">$tempdir/$g6j6.lock"); print LOCKFILE time; close (LOCKFILE); } } sub acc{ my $g6j6 = shift; unlink ("$tempdir/$g6j6.lock"); } 1;