|Problems? Is your data what you think it is?|
Re: perl script updateby Don Coyote (Monk)
|on Apr 16, 2013 at 06:44 UTC||Need Help??|
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.
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.