"Richard G. Ball" <Richard_Ball@merck.com> 07/16/02 04:25PM >>> On [2002-Jul-16] Tim Pierce <twp@rootsweb.com> wrote: In article <sd342c82.076@ccp2.jhuccp.org>, KEVIN ZEMBOWER <KZEMBOWER@jhuccp.org> wrote:
We're using GroupWise here. As far as I can tell, there's no
So, are there any alternative solutions?
It's supposed to be legal to break headers into multiple lines by adding whitespace at the front of each "continuation line." [snip]
So you could try forcing the issue by breaking the X-Command into these continuation lines yourself well before the 72-character
Richard's solution, below, seems to work like a champ. No problems in testing with it so far. For others who may implement this, make sure that, if you used the original X-Commands-in-the-body recipe, from the FAQ, that you remove the older recipe before you install and run this one. Forgetting to do that cost me about an hour's work. Richard, and all others who contributed to this discussion, thank you very much. -Kevin Zembower option to [snip] limit.
I don't know if SmartList/procmail will actually handle the continuation line correctly, but it seems like it ought to.
If Kevin can't turn off line-wrap he probably can't enforce headers either :-( Since x-commands are not common there isn't much of a performance penalty for using the Perl sledge-hammer to make things fit. So: put the x-command in the body on as many lines as needed and then in rc.local.r00 do: :0 B * $ ^[ ]*\/$\X_COMMAND:.*[^ ] { # Remove the X_Command from the body, and insert it in the header # allow it to extend over multiple lines. the perl script concatenates the # whole body together and removes irrelevant whitespace. this is then fed back # to procmail to extract the command and put it in the header. :0 fw |perl -ne 'if(/^$/ .. eof()) {chomp;push(@l,$_);}else{print;}if(eof()){forea ch (@l){$i++;last if /__END/}$l=join(" ",@l[0..$i-1]);$l.="\n";$l=~tr/ / /s;$l= ~s/^\s+//;$l.=join("\n",@l[$i..$#l]);print "\n$l\n";}' :0 B * $ ^\/$\X_COMMAND:.*[^ ] { :0 fw | grep -v "^$X_COMMAND:" | formail -I"$MATCH" } } Note: this assumes there are no x-commands in the headers (if there are you need to account for that case separately. I think the above comes out of code Alan Stebbens put out for handling this "problem". Rich -- richard_ball@merck.com (I regret the presence of the legal disclaimer but I have no control over it) ------------------------------------------------------------------------------ Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it. ============================================================================== _______________________________________________ Smartlist mailing list Smartlist@lists.RWTH-Aachen.DE http://MailMan.RWTH-Aachen.DE/mailman/listinfo/smartlist