Loading ...
Sorry, an error occurred while loading the content.

filter

Expand Messages
  • Gaal Yahas
    Anyway, here s something I had been meaning to write for a while now and only unlazed enough to actually DO today. Put this in your .procmailrc or something,
    Message 1 of 1 , May 7, 2000
    • 0 Attachment
      Anyway, here's something I had been meaning to write for a while
      now and only unlazed enough to actually DO today.

      Put this in your .procmailrc or something, for egroups email only,
      and don't even THINK of blaming me if it eats your mail :-)

      ==snip==
      #!/usr/bin/perl -wn

      # strip ads from eGroups mail

      use strict;
      use vars '$buf';

      my $lines;

      if (1 .. /^-{72}$/) { # legit part of the message fer sure
      print;
      } else {
      if (/^-{72}$/) {
      $lines++;
      if ($lines > 2) {
      print $buf; # what we had was probably legit
      $lines = 0;
      $buf = '';
      }
      }
      $buf .= $_; # remember this line
      }

      END {
      $buf =~ s/\A.*^-{72}\n//sm; # strip out ad
      print $buf; # print what's left (unsub info usually)
      }

      __END__
      ==snip==

      --
      believing is seeing
      gaal@...
      http://www.forum2.org/gaal/
    Your message has been successfully submitted and would be delivered to recipients shortly.