> Isn't there some way to write some code for sendmail that does an
> address verification before accepting the message?  I'm willing to bet
> 90% of the people I *want* to get email from have finger-able accounts. 
> Can't we use one of the ident protocols to check email on the way in?

    No, that is not easy as there are aliases, machine name changes, etc.
etc. etc.  I am currently bouncing between owl.mall-net.com and
polly.mall-net.com.  On one confounded mailing list, everything from polly
is bounced!  And I am unable to unsubscrube the plain mall-net.com,
because I am on either polly or owl. So I get doubles of everything...

> Or, what about a mailform script that allows you to pick a unique
> variable to replace the email address.  Right now, generic mailforms

   That is no problem.  Here is a piece of inelegant code Perl that sends
a subscription request to me with some data.  Feel free to bend it to your
will.  You could have it send you the contents of a large text field or
such from a form page.

-------------------------------------

#!/usr/bin/perl
#############################################################################
#  Add keyword lists, keyword format change
#  Add "head" keyword -- adds other file to output file, placing "chat"
#      comment in that file.
   $hpath="http://www.mall-net.com/";
   $lpath='www.mall-net.com';
   $pgm="cgibin/chat.cgi";
########################################################################

    print "Content-type: text/html\n\n\n";

    print "<HTML><BODY><CENTER><H1>SUBSCRIBED</H1></CENTER><HR>\n";
    
    &webparms();  # doc=path dest=email@host
    # TO email, subject, note or file 
    $addr = $PARM{'email'};
    $fmt  = $PARM{'format'};
    $type = $PARM{'type'};

            ## Mail to               SUbject            
    &sendnote('[EMAIL PROTECTED]',"-- SUB200 ".$addr.' '.$fmt 
           ,' '.$type.'-'.$fmt);
    &sendnote($addr," --- SUBSCRIBED ".$type." ---"
           ,"/home/javilk/public_html/se_report/200.txt");
             ## Extra item from file sent to subscriber...

    print "\n<BR>Subscribe: ",$addr
         ,"\n<BR>To ",$type
         ,"\n<BR>First issue has been mailed."
         ;

#############################################################################
sub sendnote {
  local($to,$subj,$item) = @_;


   #### Very crude check to see if address is valid.
  if (index($to,'@') < 1){
     print "Sorry, E-mail address is not valid";
     exit;
  }

 $sendmail="/usr/lib/sendmail -t -n";
   open(SENDMAIL,"| $sendmail")|| die("\n CAN NOT OPEN MAIL \n\n");

   print SENDMAIL "To: ",$to,"\n";
   print SENDMAIL "Subject: ",$subj,"\n";
   print SENDMAIL "X-Remote-Hos: ".$ENV{"REMOTE_ADDR"}."\n\n";

   if ('/' eq substr($item,0,1)){
      open(FL,$item)||die 'Unable to open file. ',$file,'  Notify [EMAIL PROTECTED]';
      while($_ = <FL>){print SENDMAIL $_;}
   } else {
      print SENDMAIL $item;
   }
    close(SENDMAIL);
}
#############################################################################
#############################################################################
sub webparms {

   if ("GET" eq $ENV{"REQUEST_METHOD"} ) {
       $FORM_DATA = $ENV{'QUERY_STRING'};
   } else {
       $LENGTH = $ENV{'CONTENT_LENGTH'};
      while ($LENGTH) {
         $FORM_DATA .= getc(STDIN);
         $LENGTH--;
   }  }
  # --------------------------

#print "\n<BR>FORM DATA: " ,$FORM_DATA;

   foreach(split(/&/, $FORM_DATA)){
      ($NAME,$VALUE) = split(/=/,$_);
      $NAME =~ s/\+/ /g;
      # ---- translation missing  
      $VALUE =~ s/\+/ /g;
      # ---- Tranlation missing
      # find unique name
      $NUM = "0";
      while( $PARM{$NAME} ne ""){
         $NUM++;
         $NAME =~ s/\.([0-9]+$)|$/\.$NUM/ ;
      }
      $VALUE =~ s/%(..)/pack("c",hex($1))/ge;
      $PARM{$NAME} = $VALUE;  
   }
}

############################################################################
############################################################################
############################################################################


[EMAIL PROTECTED]  ------------------  [EMAIL PROTECTED]      
----------------------- IMAGINEERING --------------------------
----------------- Every mouse click, a Vote -------------------
---------- Do they vote For, or Against your pages? -----------
----- What people want: http://www.mall-net.com/se_report/ ----
---------------------------------------------------------------
--- Have you analyzed your viewer's footprints in the logs? ---
--- Webmaster's Resources: http://www.mall-net.com/webcons/ ---
--- Web Imagineering -- Architecture to Programming CGI-BIN ---
---------------------------------------------------------------

____________________________________________________________________
--------------------------------------------------------------------
 Join The NEW Web Consultants Association FORUMS and CHAT:
   Register Today at: http://just4u.com/forums/
Web Consultants Web Site : http://just4u.com/webconsultants
   Give the Gift of Life This Year...
     Just4U Stop Smoking Support forum - helping smokers for
      over three years-tell a friend: http://just4u.com/forums/
          To get 500 Banner Ads for FREE
    go to http://www.linkbuddies.com/start.go?id=111261
---------------------------------------------------------------------

Reply via email to