Moving this from private to dev.

On 8/26/2011 5:23 PM, Michael Scheidell wrote:
who wants to test out my patch?
then maybe we can contact some of these 'abusers' and see if they want to test patch. (its NOT spam, its transactional email.. we aren't trying to sell them anything)
I don't believe this is spam. We have a business relationship since they are using sa-update
who wants to write the template email? our SOC engineers (who are good at tracking down people) can find responsible party.
I don't think we need anything that official. We are trying to fix a legitimate problem and I believe their IT people will be interested in trying to resolve the issue. At worst, they can modify their cron to only try 1x per day.
<https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6655>

i found that sa-update will just happily go about its business (try to pull files from the mirrors, even if it can't write to the TMPDIR).

This patch checks to see if the dir exists (opendir/closedir), and, fixes a problem in logic. for some reason, you can open $tmpfile in Util.pm, and it complains if you closefile() it, but it doesn't undef $tmpfile.

diff -bBru /tmp/Util.pm /usr/local/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Util.pm
--- /tmp/Util.pm    2011-06-06 19:59:17.000000000 -0400
+++ /usr/local/lib/perl5/site_perl/5.10.1/Mail/SpamAssassin/Util.pm 2011-08-26 17:12:19.000000000 -0400
@@ -1025,6 +1024,8 @@
     return;
   }

+  opendir(my $dh, $tmpdir) || die "Could not open $tmpdir: $!";
+  closedir $dh;

Michael, doesn't this close the directory handle with no logic to ever leave it open? Is that what you meant?

Also, I don't see why we aren't exiting the program after you've found this error. Is there any point in continuing?

Additionally, I'm thinking we should modify http_get as well to add some error traps.

Below this:

if ($response->is_success) {
      return $response->content;
    }

adding something like
else {

if ($result->is_error) {
    dbg("http: $result->error_as_HTML");
    die("ERROR: There was an error contacting: $url.");
}

Regards,
KAM

Reply via email to