Menu

#179 Filter spam on message body

Mailman 2.2 / 3.0
open
nobody
5
2022-10-10
2002-11-28
anser
No

This patch adds a matching spam check for body content.
It works exactly like the header check, except the
message body (after base64/quoted-printable decoding)
is scanned.

You will need to remove and re-add any lists that you
want to use this feature on after installing it. Make
sure you get a new Defaults.py as well.

The patch is pretty clean.

Discussion

  • anser

    anser - 2002-11-28

    Patch File

     
  • Barry Warsaw

    Barry Warsaw - 2002-12-24
    • milestone: 172188 --> Mailman 2.2 / 3.0
     
  • Barry Warsaw

    Barry Warsaw - 2002-12-24

    Logged In: YES
    user_id=12800

    Because this is a new feature, I have to defer it until
    after MM2.1

     
  • Narcis Garcia

    Narcis Garcia - 2022-10-09

    How can I apply this patch to a current Mailman 2.1.29 ?
    What command to "bodypatch" file?

     
  • Mark Sapiro

    Mark Sapiro - 2022-10-10

    You can apply the patch by first cd to the directory containing your Mailman installation and then

    patch -p0 < /path/to/bodypatch
    

    It will apply with only line number differences except for the hunk

    *** 298,303 ****
    --- 298,305 ----
              self.send_goodbye_msg = mm_cfg.DEFAULT_SEND_GOODBYE_MSG
              self.bounce_matching_headers = \
                      mm_cfg.DEFAULT_BOUNCE_MATCHING_HEADERS
    +         self.bounce_matching_body = \
    +                 mm_cfg.DEFAULT_BOUNCE_MATCHING_BODY
              self.anonymous_list = mm_cfg.DEFAULT_ANONYMOUS_LIST
              internalname = self.internal_name()
              self.real_name = internalname[0].upper() + internalname[1:]
    

    which will have to be applied manually.

    However this patch is not recommended. It should also patch Mailman/Version.py to bump DATA_FILE_VERSION and Mailman/versions.py to set bounce_matching_body so you don't need to remove and recreate lists. See the FAQ article at https://wiki.list.org/x/4030615 for another way to do this.

     

Log in to post a comment.