On Thu, 30 Sep 1999, James W. Durkin wrote:
> I would like have Majordomo bounce (to the list admins) incoming
> messages that come in without any Subject: header at all. Any
> suggestions on how to accomplish this? "taboo_headers" doesn't seem
> to have a negation option of any sort.
You could add a filter before resend that checks the mail for the
existance of an explicit subject field. For those without one, you just
add an empty one, and the you can use the following test in taboo_headers
/^subject: *$/i
A filter could be as simple as (please test it before use in production):
#!/usr/local/bin/perl
while (<>) {
if (!$headerdone and /^ *$/) {
$headerdone = 1;
if ($subjectfound) {
print;
} else {
print "Subject:\n\n";
};
} elsif (!$headerdone) {
$subjectfound = 1 if /^subject:/i;
print;
} else {
print;
};
};
-----------------------------------------------------------------
Mats Dufberg mats.dufberg@abc.se
Alvdalsvagen 133 +46 8 38 48 59
SE-165 75 Hasselby, Sweden
References:
|
|