Hi guys,
I am the coordinator of the Bulgarian Gnome translation team. We have an
internal Mailman controlled list that we use for automatic notifications
via mail from internal staging VCS repositories and bug tracking
systems.
Currently I would like to add notifications from upstream vcs - KDE and
GNOME. Both projects have commit mailing lists that I will subscribe our
notification list to.
However the volume from upstream commit lists is really great and I need
to apply some filtering.
I made the following Handler:
-------------------------
import re
from Mailman import Errors
def process(mlist, msg, msgdata):
message_text=msg.as_string()
recepients = msg.get_all('To')
# GNOME
rGNOME=re.compile('/bg\\.po')
aGnome='[EMAIL PROTECTED]'
try:
i = recepients.index(aGnome)
# To GNOME, so check body
if None==rGNOME.search(message_text):
# Discard! Does not contain what we want
raise Errors.DiscardMessage('GNOME commit - not bg translation')
except ValueError:
# OK - not GNOME svn
pass
# KDE
rKDE=re.compile('/bg/(doc)?messages')
aKDE='[EMAIL PROTECTED]'
try:
i = recepients.index(aKDE)
# To KDE, so check subject
if None==rKDE.search(msg.get('subject')):
# Discard! Does not contain what we want
raise Errors.DiscardMessage('KDE commit - not bg translation')
except ValueError:
# OK - not KDE svn
pass
-------------------------
Now comes the part I do not understand - how do I ensure that mailman will
accept messages that were posted to the commit lists - they all have different
'From:' field (the identifier of the committer).
What can I do to ensure that commit messages via the upstream lists are
accepted by may mailman instance?
Kind regards:
al_shopov
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy: http://wiki.list.org/x/QIA9