LSTOWN-L Archives

LISTSERV List Owners' Forum

LSTOWN-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mon, 18 Jun 2001 17:07:48 -0700
text/plain (65 lines)
On Mon, Jun 18, 2001 at 07:34:41PM -0400, Don Wiss wrote:
> rex Sheasby wrote:
>
>> LISTSERV (obviously) knows what the footer is, since it is added to
>>each message (on lists that have footers enabled), so scanning for it
>>before posting the message would be easy.
>
> Not that easy. You're forgetting that some lists have rotating banners. It
> would have to look for all of them.

I didn't forget. It's still easy, it just takes more time. I don't
know, but my guess is that the added time would be minuscule compared
to the time required to send out messages to the list. If fact, if the
bounce option were implemented the average post would be shorter
because there wouldn't be as much quoting. Overall, LISTSERV
performance would probably actually increase because the incoming
filter time would be more than offset by the reduced posting time.

FWIW, here's what I use to strip yahoogroups ads on my incoming mail:

# Removes the first ad in Yahoogroups list emails.
# First and last line of ad are matched by $start and $end, and some string
# inside the ad by $admatch. The whole ad is replaced by $note.
#
# The usual headache with bare-bones Unix-rubbish: the sed solution never(!)
# works under Solaris 2.7 because -e handles neither newlines nor nested
# '{ }'-lists. Solaris awk is also too dumb - nawk is required.
# Needless to say, the GNU tools never have a problem. Long live the Penguin!
#
# In the public domain.
# Volker Kuhlmann <[log in to unmask]>
#   31 Aug 2000
#

:0
* ^Delivered-To:.*@yahoogroups\.com
* ^Mailing-List:.*@yahoogroups\.com

# With awk (change nawk to gawk etc. if necessary):
#
{
  end='...--------------------.*--------------------[-~>=_|e]*$'
  start="^$end"
  admatch='http:\/\/.*\.yahoo\.com\/.*\/'
  note='\[YahooGroups ad autostripped\]'
  :0 fbw
  | gawk "\
      BEGIN { ad=0; done=0 }\
      done { print; next }\
      ad && \$0 ~ \"$end\" { \
        ad=0; \
        if (match(text,\"$admatch\")) {\
          print \"$note\"; done=1\
        } else {\
          print text \$0; text=\"\" }\
        next\
      }\
      \$0 ~ \"$start\" { ad=1 }\
      ad { text=text \$0 \"\n\" }\
      !ad { print }\
      "
}

-rex

ATOM RSS1 RSS2