Re: Encoding woes

Sam Varshavchik <[email protected]> Tue, 07 Feb 2023 07:35:27 -0500
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--===============7084881769308370929==
Content-Type: multipart/signed;
    boundary="=_monster.email-scan.com-112161-1675773327-0001";
    micalg=pgp-sha1; protocol="application/pgp-signature"

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not support MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in 1996.
To open this message correctly you will need to install E-mail or Usenet
software that supports modern Internet standards.

--=_monster.email-scan.com-112161-1675773327-0001
Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Francesco Ariis writes:

> Hello,
>     I have finished setting up my ~/.mailfilter. Almost everything
> functions well.
> One thing that gives me troubles is possibly related to message
> encoding.
>
>
> There are some GitHub push messages that I do want to see, like
>
>     @Xyz Pushed 3 commits
>
> Hence I wrote this:
>
>     if ( /^@[a-zA-Z0-9_-]+ pushed [0-9]+ commits?.$/:bD )
>         to $MAILFOLDER/spam
>
> (notice the =E2=80=98$=E2=80=99 at the end.)
>
> Now, *some* messages are caught by this filter, some not. I inspected
> two of them with vim
>
>     ----=3D=3D_mimepart_xyz
>     Content-Type: text/plain;
>      charset=3DUTF-8
>     Content-Transfer-Encoding: 7bit
>
>      @someone pushed 5 commits.
>
>     ----=3D=3D_mimepart_qwz
>     Content-Type: text/plain;
>      charset=3DUTF-8
>     Content-Transfer-Encoding: quoted-printable
>
>      @else pushed 6 commits.=3D0D
>
> The message which does not trigger the pattern has an additional =E2=80=
=9C=3D0D=E2=80=9D
> at the end.
>
> I know that I could just remove the =E2=80=98$=E2=80=99 from my regexp =
to make it work
> on both messages, but I wonder whether there is a more principled solut=
ion,
> if I should report this to my MRA (getmail) or what else.

getmail is not involved here. This is how the mail was sent. It's strange =
to =20
observe variation in formats of automated github spam. Maybe they're doin=
g =20
A/B testing, and either the A, or the B, is sending broken mail.

>     if ( /^@[a-zA-Z0-9_-]+ pushed [0-9]+ commits?.$/:bD )

The period actually matches any character. This is a Perl RE. Try:

>     if ( /^@[a-zA-Z0-9_-]+ pushed [0-9]+ commits?\.\r?$/:bD )

to match a real period, and an optional CR, which is what that encodes. =20
maildrop should be able to decode it, and apply the regexp.


--=_monster.email-scan.com-112161-1675773327-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEMWrVnbBKLOeG9ifkazpiviedvyUFAmPiRY8ACgkQazpivied
vyWktRAA9lvAZodlLAja+4lYE/3EFbBFtRxmrW8Lcdc+42IezFOas8xQfkZ+fpIB
MdPkshRZZjX8LuOq5fPkLikNS1E9TC8zH7wuRASQi3QYjr0PJACE7aHAsj7oy0w4
AMLX9QfGZnE2yPFwVkwImEkAWgxvVTL7Zi0DNjt6PcWtJmCmjQnXtwbJz7bxNvg4
daGJb6kSSfFXJGDfZOI/7KrbP6xUUEpouE/HDx5Y5+J6g7AX2rx4pobb1h8qzTGa
qEJ4zSRDBu3vV+MqoYE3EXMSF864Oi542BMyPh7Nd5xRFK4LA9eP1G+pNhdSXBPT
7asjcFwR9nV0W0t7+4roWFQL1C00Lo9IjduXNZPe6JfeSi9YXYd48t3kpJftrSvm
2GELQTtK2N+csPfxSLOuHYoLlIekdFaMaqQuhZZN6DjqaV99y+vwnxxy/T+CODBj
GKQwLKdSt3Iue/PHkSFLsPGYsVE/LdjyUSEAOuMXrknc6KdpHdNX2OQ25uEzRHMj
sgcvWFyuUjOl53yFL6s4eJHCjAwclHmLpDwa6Q94+UJ845RuldNbD6yO6MCQqYe/
ntGaByPWzjtWw0aFRu8VL0tqcF30vTZ5+lPWNqcoGrsFzNzPEyq5h5Sa6tFWekZw
7+Swme9nOak0enXQQE+c1wCjA6gclo+JZ3pIWN0gKWM0ViecT+M=
=q4kZ
-----END PGP SIGNATURE-----

--=_monster.email-scan.com-112161-1675773327-0001--


--===============7084881769308370929==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============7084881769308370929==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

--===============7084881769308370929==--