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
|
|