Re: An 'or' recipe

Chris <[email protected]> Tue, 15 Aug 2017 15:58:58 -0500
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
--===============1907509166==
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature";
	boundary="=-jg/YnpSDHo8gBMUQxdel"


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

On Tue, 2017-08-15 at 10:19 +0300, udi M wrote:
>=20
> On 14/08/17 02:20, John Conover wrote:
> >=20
> > #
> > ws=3D'[=C2=A0=C2=A0=C2=A0=C2=A0]*($[=C2=A0=C2=A0=C2=A0]+)*'
> To be precise:
>=20
> ws=3D'[=C2=A0=C2=A0=C2=A0]*'=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0# when the=C2=
=A0=C2=A0[]=C2=A0=C2=A0contains TAB and SPACE
>=20
> >=20
> > #
> > :0
> > * 2147483647^0 $ ^From:${ws}.*susanmay21@iinet\.net\.au
> This line will includes strings like:=C2=A0=C2=A0From:Hello=C2=A0
> [email protected]
> it is not what Chris asked for.
>=20
> --udi
>=20
In my case I believe that either would work. It's just that with this
* 2147483647^0 $ ^From:${ws}ads@adstarrling\.com=C2=A0procmail is not
checking for another string in front of the senders address. I imagine
that if I wanted to for authors that have their own domains such as the
one above I could use=C2=A0
* 2147483647^0 $ ^From:${ws}.*@adstarrling\.com=C2=A0
though I may be wrong since I'm definitely not a procmail guru, not
even close.

>=20
> >=20
> > * 2147483647^0 $ ^From:${ws}.*billh@marsjourney\.info
> > * 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=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=A0=C2=A0John
> >=20
> > Chris writes:
> > >=20
> > > On Sun, 2017-08-13 at 22:40 +0000, John Levine wrote:
> > > >=20
> > > > In article <[email protected]> you write:
> > > > >=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
> > > > > The output to my procmaillog shows
> > > > > procmail: No match on "^From:[email protected] |^From:b
> > > > > illh@m
> > > > > arsj
> > > > > ourney.info |^From:[email protected] |^From:barry@barryj
> > > > > hutchi
> > > > > 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:jrobertsonwr
> > > > > ites@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.=C2=A0=C2=A0Try this:
> > > >=20
> > > > :0
> > > > * ^From:.*([email protected]|[email protected]|mail@
> > > > cchase
> > > > harwood.com|[email protected]|[email protected]|he
> > > > lp@boo
> > > > kfunnel.com|[email protected]|[email protected]|cg
> > > > ockel@
> > > > cgockelwrites.com|[email protected]|[email protected]
> > > > m)
> > > > $AUTHORS
> > > >=20
> > > > If you do a lot of this, you may need to make LINEBUF
> > > > bigger.=C2=A0=C2=A0I 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
--=20
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
15:52:53 up 7:57, 1 user, load average: 0.27, 0.17, 0.22
Description:	Ubuntu 16.04.3 LTS, kernel 4.10.0-32-generic

--=-jg/YnpSDHo8gBMUQxdel
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

iEYEABECAAYFAlmTYJMACgkQ43Kn2pjmcFzVSACeI2xq0U1kc9b+kp2tPnEv9F70
vJMAn2X5ynboC22+iChXOl4NnteTHYN5
=0XVo
-----END PGP SIGNATURE-----

--=-jg/YnpSDHo8gBMUQxdel--


--===============1907509166==
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
--===============1907509166==--