[Mailman-Users] scripts/owners not setting list domain

Peter Radcliffe pir at pir.net
Wed Nov 15 02:46:14 CET 2006

I recently upgraded from mailman 2.0.x to 2.1.x finally (yeah, I've
been kinda busy moving countries again) and was bitten by what seems to
me to be a change in behaviour.

Mail sent to <listname>-owner was appearing with an SMTP envelope
sender of <listname>-bounces@<DEFAULT_URL_HOST> which isn't a valid
domain for mailman mail since it's different from DEFAULT_EMAIL_HOST
so the mail was bouncing.

I confirmed this by temp changing DEFAULT_EMAIL_HOST to something
else, ran fix_url and restarted the qrunners and it followed the
config. All other mail was currectly using

I checked I had gotten rid of all the old variables, had run
add_virtualhost() properly in mm_cfg.py, ran fix_url, restarted the
qrunners, etc, everything I could find about it until I ran

It seems, as that person says, that scripts/owner calls
Utils.get_site_email() with no hostname which goes through
get_domain() to get where it's looking for... which pulls the hostname
out of mm_cfg.DEFAULT_URL_HOST.

Now, to my mind, using a URL host for email is never the right answer
unless no DEFAULT_EMAIL_HOST has been configured.

My mm_cfg.py section is thus;
DEFAULT_EMAIL_HOST = 'list.pir.net'
DEFAULT_URL_HOST = 'www.pir.net'

I can't see a way to configure that to get what I think is the right
answer from 
  hostname = mm_cfg.VIRTUAL_HOSTS.get(get_domain(), get_domain())
but perhaps I'm missing something.

My answer was the following patch to scripts/owner. Since there is a
known list name at that point why not get the domain to use from it's

Am I missing something?


*** owner.orig	Wed Nov 15 01:21:13 2006
--- owner	Wed Nov 15 01:20:24 2006
*** 30,35 ****
--- 30,36 ----
  import paths
  from Mailman import mm_cfg
  from Mailman import Utils
+ from Mailman.MailList import MailList
  from Mailman.i18n import _
  from Mailman.Queue.sbcache import get_switchboard
  from Mailman.Logging.Utils import LogStdErr
*** 49,54 ****
--- 50,56 ----
          print >> sys.stderr, _(
              'mailowner script, list not found: %(listname)s')
+     mlist = MailList(listname, lock=0)
      # Queue the message for the owners.  We will send them through the
      # incoming queue because we need some processing done on the message.  The
      # processing is minimal though, so craft our own pipeline, expressly for
*** 57,63 ****
!                 envsender=Utils.get_site_email(extra='bounces'),
--- 59,66 ----
!                 envsender=Utils.get_site_email(hostname=mlist.host_name,
!                                                extra='bounces'),


More information about the Mailman-Users mailing list