Moving large messages to spam folder

Chris <[email protected]> Sun, 12 Feb 2017 20:19:01 -0600
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
--===============1243666597==
Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature";
	boundary="=-aj8uct0ExcjMpUYEBfHv"


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

Anything bigger than 100k has the subject appended as below. Lately
I've been getting messages from yahoo accounts that run about 630k give
or take that I know are spam and I'd like to have them moved with
procmail to my spam folder automatically. I found the 2nd formail
recipe below by doing some googling and put it into my .procmailrc.
Instead of using the sender IP I've been putting the CIDR into the
badips file -=C2=A098.136.192.0/18 for example. I don't want to filter out
all of yahoo because I have a few yahoo mailing lists I'm on. Does this
make sense or is there a much easier way to do this?

:0 fh w
* > 100000
* ^Subject:\/.*
| formail -I "Subject: {* -BIG- *} $MATCH"

:0
* ? formail -x"From:" -x"Sender:" \
=C2=A0=C2=A0=C2=A0=C2=A0-x"Reply-To:" -x"Return-Path:" \
=C2=A0=C2=A0=C2=A0=C2=A0| egrep -is -f /home/chris/badips
$JUNKMAIL

Thanks for any assistance
Chris

--=20
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
20:06:05 up 9 days, 12:04, 2 users, load average: 0.07, 0.16, 0.17
Description:	Ubuntu 16.04.2 LTS, kernel 4.4.0-62-generic
--=-aj8uct0ExcjMpUYEBfHv
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

iEYEABECAAYFAlihF5UACgkQ43Kn2pjmcFwwXwCcCXej68YYtDuq5deIc0r5eCP+
aTQAniV0p6gz+LUvK5dU30UxCHsgGv51
=inka
-----END PGP SIGNATURE-----

--=-aj8uct0ExcjMpUYEBfHv--


--===============1243666597==
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]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
--===============1243666597==--