[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] Re: ModeWhen - News
In message <mpro.p0sce7004a813023f.pittdj@xxxxxxxxxxxx>
David Pitt <pittdj@xxxxxxxxxxxx> wrote:
> Fred Graute, on 10 Dec, wrote:
>
> > In message <56a86354f0Lists@xxxxxxxxxxx>
> > "Richard Torrens (lists)" <Lists@xxxxxxxxxxx> wrote:
> >
> > > In article <6f24c1a756.fjgraute@xxxxxxxxx>,
> > > Fred Graute <fjgraute@xxxxxxxxx> wrote:
> >
> > [snip]
> >
> > > > I've changed the _newstest expression to include "Return-Path:" and
> > > > "Path:" so it should cover most cases now.
> > >
> > > > _newstest ** ( < "From:" | "Path:" | "Return-Path:")
> > >
> > > Excellent! But I think that is for the next release? It doesn't seem to
> > > work with 4.70a12 (23-Apr-2017)
> >
> > It should work with 4.70a12, it does on my copy of StrongED (which is
> > somewhat ahead of 4.70a12 but no changes that affect ModeWhen handling).
>
> Apart from a bit of case sensitivity, the last search header should be
> "Return-path:", it worked here too on 4.70a12.
Interesting, all the mails I tested with had "Return-Path:" (ie with
capitol P) in them. Although I've now found some with a lower case 'p'.
It seems to be down to the ISP as to how "Return-Path:" is capitalised.
A quick skim through the relevant RFCs suggests that a capitol 'P' is
correct.
Anyway the '_newstest' could be adjusted to allow both. It's just a
question of how.
Make it completely case insensitive:
_newstest ** ( < \- "From:" | "Path:" | "Return-Path:")
Allow both lower and upper case 'p':
_newstest ** ( < "From:" | "Path:" | "Return-Path:" | "Return-path:")
_newstest ** ( < "From:" | "Path:" | ("Return-" 'Pp' "ath:"))
_newstest ** ( < "From:" | (["Return-"] ("Path:" | "path:")))
_newstest ** ( < "From:" | (["Return-"] 'Pp' "ath:"))
The first variant is the simplest form but has a greater chance of false
positives. The others all work too and are more accurate but they are a
bit more complex.
Cheers,
Fred.
--
StrongED Developer
http://www.stronged.iconbar.com/
--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives at http://diy.Torrens.org/RO/StrongED/index.html