Trevor Jenkins wrote:
procmail has a feature for checking the length (number of lines) of the
I thought it was bytes. From procmailrc(5)
< Check if the total length of the mail is shorter than
the specified (in decimal) number of bytes.
body of a message. Is there a similar feature whereby I can check the
length (number of characters) of a particular header line? I'm thinking
particularly of the Subject line ...
BIGSUBJECT=128
:0
* ? test `formail -xsubject: | wc -c` -gt $BIGSUBJECT
{
# subject is too long!
...
Now something like this might be usable as a starting point for
something a little nicer:
BIGSUBJECT=128
:0
* ^Subject: *\/[^ ].*
{ SJ=$MATCH }
:0a
* SJ ?? > BIGSUBJECT
{
# subject is too long!
...
The above recipes are of course untested...
--
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information. Sorry.
Collin Park Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail