Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: perl script update

by Don Coyote (Hermit)
on Apr 16, 2013 at 06:44 UTC ( [id://1028820]=note: print w/replies, xml ) Need Help??


in reply to perl script update

Hello woody2010 and welcome to the monastery.

A quick sanity check on a ten year old script is your best starting point, you will have a better understanding of perl now, and will more easily be able to spot errors preventing successful transmission.

$mo = "$mo <option value=\"$name_email{$key}\"> $key < +/option> \n"; # my $mo ?

Will have flagged straight away with the use warnings & use strict pragmas.

open(MAIL, "|usr/bin/sendmail") ||&staus('update status message');

Does not exit gracefully on failure. What the code appears to do is update the status message to 'could not send' and then continue to attempt to send the message, returning a succesfully sent headed page to the user with a message declaring the message 'could not send'.

A further and probably the most important sanity check would be to run the script in Taint mode.

#!usr/bin/perl -T

The pipe open on 'user submitted'(?) email addresses, re where does $mo originate from? Is a priority concern.

Taint mode will hold the fort for you, while you convert this into a fork(exec sendmail) routine.

Form action should generally be post rather than get, $mo again.

It would not be inconceivable that a savvy hacker could supply their own list for $cgi->param('t'), resulting in spam reports on emails from your domain, leading to your domain being blocked.

So a number of things to look at really, try those. When the script is operating properly, you may better be able to identify the cause of the problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1028820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 13:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found