Re: An 'or' recipe

Chris <[email protected]> Mon, 14 Aug 2017 15:36:50 -0500
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
--===============0090187281==
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature";
	boundary="=-NbjA76e0E10zWX91iCpm"


--=-NbjA76e0E10zWX91iCpm
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, 2017-08-13 at 16:20 -0700, John Conover wrote:
> #
> ws=3D'[=C2=A0=C2=A0=C2=A0=C2=A0]*($[=C2=A0=C2=A0=C2=A0]+)*'
> #
> :0
> * 2147483647^0 $ ^From:${ws}.*susanmay21@iinet\.net\.au
> * 2147483647^0 $ ^From:${ws}.*billh@marsjourney\.info=C2=A0=C2=A0=C2=A0
> * 2147483647^0 $ ^From:${ws}.*mail@cchaseharwood\.com
> * 2147483647^0 $ ^From:${ws}.*barry@barryjhutchison\.com
> =C2=A0=C2=A0=C2=A0=C2=A0.
> =C2=A0=C2=A0=C2=A0=C2=A0.
> =C2=A0=C2=A0=C2=A0=C2=A0.
> * 2147483647^0 $ ^From:${ws}.*jrobertsonwrites@gmail\.com
> $AUTHORS
> #
>=20
> where ${ws} is folded whitespace, (the characters between the block
> braces are a tab character, hex 09, followed by a space character,
> hex
> 20).
>=20
> The '.' (period character,) should be escaped, otherwise in a regular
> expression, it means any character.
>=20
> The email addresses you receive the most messages from should be at
> the top of the recipe, (as soon as a match is found, procmail stops
> the recipe search, and goes directly to the action, i.e., store the
> message in ${AUTHORS}.)
>=20
> =C2=A0=C2=A0=C2=A0=C2=A0John
>=20
Hi John, sorry it took me so long to reply. When I first saw your reply
I was totally confused which sometimes isn't hard for me. So, I've been
reading up on procmail scoring and I 'think' I'm beginning to
understand what you did above but I'm going to have to do some more
reading on in before I totally understand what you did.

Chris

> Chris writes:
> >=20
> > On Sun, 2017-08-13 at 22:40 +0000, John Levine wrote:
> > >=20
> > > In article <[email protected]> you write:
> > > >=20
> > > >=20
> > > > :0
> > > > *^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected] |\
> > > > ^From:[email protected]
> > > > $AUTHORS
> > > Ugh, see below.
> > >=20
> > > >=20
> > > >=20
> > > > The output to my procmaillog shows
> > > > procmail: No match on "^From:[email protected] |^From:bil
> > > > lh@m
> > > > arsj
> > > > ourney.info |^From:[email protected] |^From:barry@barryjhu
> > > > tchi
> > > > son.
> > > > com |^From:[email protected] |^From:[email protected]
> > > > >=20
> > > > > ^From:bra
> > > > [email protected] |^From:[email protected]
> > > > |^From:cgockel
> > > > @cgo
> > > > ckelwrites.com |^From:[email protected] |^From:jrobertsonwrit
> > > > es@g
> > > > mail
> > > > .com"
> > > >=20
> > > > Does that look correct?
> > > Yes, it's very rare to have a From: line with no white space or
> > > comment
> > > between the From: and the address.Try this:
> > >=20
> > > :0
> > > * ^From:.*([email protected]|[email protected]|mail@cc
> > > hase
> > > harwood.com|[email protected]|[email protected]|help
> > > @boo
> > > kfunnel.com|[email protected]|[email protected]|cgoc
> > > kel@
> > > cgockelwrites.com|[email protected]|[email protected])
> > > $AUTHORS
> > >=20
> > > If you do a lot of this, you may need to make LINEBUF bigger.I
> > > have
> > > patterns like this that are over 4000 characters long and they
> > > work
> > > fine.
> > >=20
> > > R's,
> > > John
> > >=20
> > Thanks John, I see now what you did. By putting the addresses in
> > braces
> > separated by a pipe it's still essentially what I have only neater
> > and
> > procmail will still go through each address until it gets a hit.
> >=20
> > Thanks so much for the help
> >=20
> > Chris
> >=20
> > --=C2=A0
> > Chris
> > KeyID 0xE372A7DA98E6705C
> > 31.11972; -97.90167 (Elev. 1092 ft)
> > 17:45:21 up 2 days, 9:58, 1 user, load average: 1.31, 0.75, 0.57
> > Description:	Ubuntu 16.04.3 LTS, kernel 4.10.0-32-generic
> > ____________________________________________________________
> > procmail mailing list=C2=A0=C2=A0=C2=A0Procmail homepage: http://www.pr=
ocmail.org/
> > [email protected]
> > https://mailman.rwth-aachen.de/mailman/listinfo/procmail
> ____________________________________________________________
> procmail mailing list=C2=A0=C2=A0=C2=A0Procmail homepage: http://www.proc=
mail.org/
> [email protected]
> https://mailman.rwth-aachen.de/mailman/listinfo/procmail
--=20
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
15:33:29 up 3 days, 7:46, 1 user, load average: 1.20, 0.66, 0.51
Description:	Ubuntu 16.04.3 LTS, kernel 4.10.0-32-generic

--=-NbjA76e0E10zWX91iCpm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEABECAAYFAlmSCeIACgkQ43Kn2pjmcFxsTwCcCWsuuhW/hMICXe4M9HMDySHa
4E8AnjlXkWXLLqXdi11eSBSh5tQlpd0/
=Gx0F
-----END PGP SIGNATURE-----

--=-NbjA76e0E10zWX91iCpm--


--===============0090187281==
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
https://mailman.rwth-aachen.de/mailman/listinfo/procmail
--===============0090187281==--