[Mailman-Users] hepl with python syntax, etc.

Mark Sapiro mark at msapiro.net
Thu Oct 22 02:15:14 CEST 2009

marisa at umn.edu wrote:
>Hello! I have three questions. I really will appreciate your help!
>As you will notice from the questions, I am dealing with spam mail from
>people who writes from "konwn" servers  -- I already filter messages with
>heathers that show "spam" and "unknown". One of the major problems is
>some people that uses for the "from" address the name of the mailng list,
>so I like to be able to filter messages by individual names as well.
>1) What is the expression that I should use for:
>"List of non-member addresses whose postings will be immediately held for
>If I want to allaw all but a few users (like list1 and list2) from   
>my domain (stat.umn.edu anbd/or umn.edu) to be hold for moderation?
>I tested with combinations like:
>^.*\@*\.umn\.edu | =! suzane\@stat\.umn\.edu | =!jerry\@stat\.umn\.edu
>but things do not work. If I use only:
>yes, I can accept people from this domain and no one else, but when
>I add an "and" ("|") everything seems to break and no one from the
>umn.edu domain is is accepted.


works, but it doesn't do what you mean. It matches any address that
contains ".umn.edu" anywhere within it including such things as
user.umn.edu at example.com and user at mail.umn.education.net. It literally
says zero or more anything followed by zero or more '@' followed by
'.umn.edu' followed by anything.

What you want for this is


which matches any address that ends with "@umn.edu" or ".umn.edu"

The attempt at negative expressions for suzane and jerry is completely
invalid. The spaces around '|' are significant. They will be part of
the regexps and need to match, and '=!' is not valid.

First, are suzane and jerry list members?  Anything you put in
*_these_nonmembers only applies to nonmembers. These will not serve to
hold posts from members that would ordinarily be accepted.

If suzane and jerry are not members, just put


in hold_these_nonmembers and put the two lines

suzane at stat.umn.edu
jerry at stat.umn.edu

in accept_these_nonmembers which is tested first. lines that don't
begin with ^ are simple addresses, not regexps.

>I also try to use the example from a mailng list topic -- "How do I
>accept or reject all addresses from a particular domain".
>I included in "List of non-member addresses whose postings will be
>automatically discarded" the names of the users that I want to discard
>(list1 and list2 on my exaple) plus the negation of all the others 
>from the domain I will alllaw:
>That box looks like:
>list1 at stat.umn.edu
>list2 at stat.umn.edu
>and no good resoults neither.

This one matches the literal addresses 'list1 at stat.umn.edu' and
'list2 at stat.umn.edu' plus any address that does not end with
'@anything.umn.edu' or '@umn.edu'. If that's what you want, it should
work, but remember it only applies to non-member addresses.

>2) how does mailman builds the lists that show on:
>"List of non-member addresses whose postings will be automatically
>"List of non-member addresses whose postings will be automatically
>and other places like for some spam filters as well?

Mailman doesn't 'build' those lists except that when you process a post
from a non-member in the admindb interface, you can check a box to add
the From: address of that post to one of those lists.

>and 3)   
>I understand that mailman will retry when mail can not be sent once each
>hours for five days, according with:
>but by looking at logs (mailman and postfix) it seems like mailman
>attempts to send the messages again each time it gets the error 450 from
>postfix. that becames a never ending dialogue! Am I missign some

A 450 from Postfix during SMTP should result in that one message being
retried once every hour for 5 days, but the same will happen with the
next message and the next.

If these 450 statuses are undeliverable local addresses, put

unknown_local_recipient_reject_code = 550

in Postfix's main.cf to return 550 instead which will result in an
immediate bounce.

Mark Sapiro <mark at msapiro.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