[Mailman-Users] How to silently, automatically reject ALL"implicit destination" messages?

Mark Sapiro msapiro at value.net
Mon Dec 12 19:39:36 CET 2005


Alex Schuilenburg wrote:

>We get a large amount of spam to our unmoderated lists and as moderator
>I am getting tired of rejecting "implicit destination" messages. They
>are always spam - no sensible poster BCC's and all list aliases are covered.
>
>Looking through the list archives there was talk about this feature
>being added into 2.1 and then possibly not making it :-(
>
>Are there any hidden config settings that will allow me to do this in
>2.1.5 or has anyone made such mods and is willing to share the patch
>with me?


If you want to unconditionally do what the subject of this message
says, I think the patch is pretty simple, but I haven't tested it at
all so beware.

In the module Mailman/Handlers/Hold.py you will see

    #
    # Implicit destination?  Note that message originating from the
Usenet
    # side of the world should never be checked for implicit
destination.
    if mlist.require_explicit_destination and \
           not mlist.HasExplicitDest(msg) and \
           not msgdata.get('fromusenet'):
        # then
        hold_for_approval(mlist, msg, msgdata, ImplicitDestination)
        # no return


I think all you need to do is replace

        hold_for_approval(mlist, msg, msgdata, ImplicitDestination)

with

        raise Errors.DiscardMessage

The discard will still be logged in 'vette', but otherwise, the message
will just disappear.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list