procmail
[Top] [All Lists]

Re: removing whitespace between adjacent 'encoded-word's

2004-12-15 11:28:35
Toen wij Robert Allerstorfer kietelden, kwam er dit uit:

Instead of [-a-z0-9]+ I am using
av_CHARSET = "([a-z]+[_-]?[a-z0-9-]+)"
# covers encodings like iso-8859-15 iso-8859-8-i us-ascii gb2312
shift_jis

Yes, that is better. An alternative is to just add the underscore
[-a-z0-9_]+

See http://www.professional.org/procmail/furrin.rc for several charsets
that will not match even your regex, like those with two underscores in
them.

Suggestion:   av_CHARSET = '([a-z][a-z0-9_-]+[a-z0-9])'
(single quotes, because no variables have to be expanded)


Where you use it, you have parts like (b|q) and [^\?].  There is no
need to be that verbose: [bq] and [^?] are as good or better ways
to express the same.

There are points where you only use ^ to anchor to the start of
a variable-value. Remember: ^ is any linefeed, ^^ is the start.


In your procmailrc, you set the logfile before DROPPRIVS,
and call chown. Another approach:

   LOGFILE = $_.log
   :
   DROPPRIVS = yes
   LOGFILE   = $MAILDIR/procmail.log


I looked into how you merged my bq-code with your project, and saw
that you added the tilde to $asc. There were unexpected side-effects
with that, but I can't remember which. Consider yourself warned. :)

-- 
Grtz, Ruud


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>