[Mailman-Users] Rejecting spam at the SMTP level?

Jim Popovitch jimpop at gmail.com
Sat Aug 8 17:43:35 CEST 2015

On Wed, Aug 5, 2015 at 3:15 AM, Jayson Smith <jaybird at bluegrasspals.com> wrote:
> A few months ago I did some Googling and found a project called
> Mailman-Milter which claims to reject unwanted list mail i.e., nonmember
> postings at the SMTP level. I would love to use this, but there's virtually
> no documentation and I've never been able to get it working. Has anyone else
> had any better luck, or do you know of any other solutions? I'm using
> Sendmail, by the way.

I'm not exactly sure how to do it in Sendmail (been a long time since
I've used that) but in Postfix it can be done by setting up a custom
master.cf service(s) and restriction class(es).

    # Mailman list member checks inet    n       n       n       -       1       spawn
argv=/usr/local/lib/mailman/scripts/check_subscriber mylist inet    n       n       n       -       1       spawn
argv=/usr/local/lib/mailman/scripts/check_subscriber mylist2

You can get a copy of the check_subscriber script here:

You then need to setup a restriction class that matches a mailinglist
posting address and then hooks into the master.cf service on listed above.  The restriction class matches just the
mailinglist posting address (not the -bounce, -owner, -subscribe,

mylist at mydomain.tld             mailman_subscribers_mylist
mylist2 at mydomain.tld           mailman_subscribers_mylist2

        check_recipient_access hash:/etc/postfix/check_recipients,

    # declare our custom restriction classes
    smtpd_restriction_classes =

   # define our custom restriction class for mylist
  mailman_subscribers_mylist =
        check_sender_access tcp:,

   # define our custom restriction class for mylist2
   mailman_subscribers_mylist2 =
        check_sender_access tcp:,

I would be interested in hearing/learning about how to make that work
in sendmail if you get the oppty to shoehorn something like this it
into your setup.

-Jim P.

More information about the Mailman-Users mailing list