Great Circle Associates Majordomo-Users
(August 2002)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: block blank message?
From: Mike Oliver <Mike . Oliver @ Sun . COM>
Date: Fri, 30 Aug 2002 19:22:45 -0700 (PDT)
To: eric @ interversity . com
Cc: majordomo-users @ greatcircle . com
Reply-to: Mike Oliver <Mike . Oliver @ Sun . COM>

Eric Crump <eric@interversity.com> wrote:

> I hope this isn't really obvious, but I haven't found the answer yet. How
> can we bounce messages with no content? 

If the messages literally have no content then you could catch them by
adding the following lines marked '+' into the 'resend' script at about
line 819, in the parse_body() function (surrounding lines shown for
context):

      	    }
      	}
      	print OUT $_;
    } 	                                                        # while

 +  if ( !defined($approved)) {        
 +    	if ( $body_len < 1 ) {
 +    	    $gonna_bounce .= " Message body is empty ";
 +    	}
 + }
 
    print STDERR "$0: parse_body: exiting with '$gonna_bounce'\n" 
      	if $DEBUG;

If the message bodies you're trying to intercept consist of a number of
blank lines then you'll have to do something just very slightly more
complex than that.  At the top of the parse_body() function set a flag
variable to "true" and change it to "false" as soon as you see a line
that has real content, then test that rather than looking at the value
of $body_len in the code snippet above.

> I wondered if maybe just putting a body taboo entry of 
> 
> //
> 
> would work?

I think you mean /^$/, but you don't want to do that.  It'll bounce any
message that contains an empty line.

Mike.
-- 
mike.oliver@sun.com



Indexed By Date Previous: block blank message?
From: Eric Crump <eric@interversity.com>
Next: Re: block blank message?
From: Mike Oliver <Mike.Oliver@Sun.COM>
Indexed By Thread Previous: Re: Is majordomo still being used in new installations?
From: Daniel Liston <dliston@sonny.org>
Next: Re: block blank message?
From: Mike Oliver <Mike.Oliver@Sun.COM>

Google
 
Search Internet Search www.greatcircle.com