On Fri, Apr 29, 2011 at 09:30:32AM +0200, Ansgar Wiechers wrote: > On 2011-04-29 Troy Piggins wrote: > > Check out Victor's reply to my message. He explains the reason, but > > I was finding the same as you. This works fine so far: > > > > if /^Subject:/ > > if !/=\?\S+\?=(\s|$)/ > > /\S{60}/ REJECT no spaces > > endif > > endif > > For the sake of simplicity: > > if /^subject: +\S{60}/ > !/=\?\S+\?=\s*$/ REJECT no spaces > endif
This is not completely equivalent, it will fail when RFC2047 is used to encode a part of the subject, but unencoded text follows the encoded part. Change the "\s*$" to "(?:\s|$)". The rule I posted avoids firing on subjects that contain encoded strings anywhere in the subject, not just at the end. -- Viktor.