![]()
I quickly slapped together the following .maildelivery lines and Perl
script, which may be of use to those of you who use slocal or other
filters:
.maildelivery:
#
# REPLACE /home/mark WITH APPROPRIATE DIRECTORY
#
# First, pass through filter, which will discard long messages:
to faq | A /home/mark/faqsort.p
cc faq | A /home/mark/faqsort.p
to <faq-maintainers@MIT.EDU> | A /home/mark/faqsort.p
# Next, file messages that make it through.
to faq > ? /home/mark/Mail/newfaq
cc faq > ? /home/mark/Mail/newfaq
to <faq-maintainers@MIT.EDU> > ? /home/mark/Mail/newfaq
faqsort.p:
#!/bin/perl
@text=<>; #slurp in entire message
$lines=scalar(@text); #number of lines in message
if (scalar(@text) < 500) {
# exit with "failed to deliver" code, so .maildelivery will try next rule
exit 1;
}
# Pretend message delivery succeeded; message ends up in bit bucket
exit 0;
-- Mark Bradford, Software Engineer <> mark@ucar.edu
UCAR Office of Field Project Support <> (303) 497-8169
[
Usenet Hypertext FAQ Archive |
Search Mail Archive |
Authors |
Usenet
]
[
1993 |
1994 |
1995 |
1996 |
1997
]
![]()
© Copyright The Landfield Group, 1997
All rights reserved