[Mailman-Users] Virtual Domains for Mailing Lists in MailMan

Mark Sapiro mark at msapiro.net
Fri Jun 19 00:30:48 CEST 2009


Bryan Harrison wrote:
>
>I've found the resources you recommended helpful, but am stymied  
>nonetheless.  I'm bright but not expert with Postfix or Mailman, and  
>have been butting my head against this for days.
>
>As a test, I'm trying to install mailman on the server gilded- 
>bat.laughingboot.net, and create functioning lists mailman at laughingboot.net 
>  and galaxy at gurgitate.org.  Virtual domains are humming along nicely  
>in both Apache and Postfix.
>
>Mailman's processes run and I can browse the interface site, but all  
>my tests now bounce with:
>
><"|/usr/share/mailman/mail/mailman post galaxy"@gilded- 
>bat.laughingboot.net>:
>    data format error. Command output: |/usr/share/mailman/mail/ 
>mailman post
>    galaxy: Bad protocol


See below


>If you're feeling particularly saintly, I've P.S.'d install_mailman.sh  
>below –  the very rough script I'm using to install and configure  
>mailman.
>
>Relevant lines from main.cf are
>
>virtual_alias_maps = hash:/etc/postfix/virtual,hash:/var/mailman/data/ 
>aliases,hash:/var/mailman/data/virtual-mailman


The entry "hash:/var/mailman/data/aliases" should be in alias_maps, not
virtual_alias_maps.


>virtual_mailbox_domains = hash:/etc/postfix/virtual_domains


Your Mailman domains should be virtual_alias_domains.
virtual_mailbox_domains can't deliver properly to Mailman aliases.


>mm_cfg.pys looks like this:
>
># Include Defaults:
>
>from Defaults import *
>
># Site-specific overrides:
>
>MTA = 'Postfix'
>DEFAULT_EMAIL_HOST = 'laughingboot.net'
>DEFAULT_URL_HOST = 'gilded-bat.laughingboot.net'


Probably not absolutely necessary, but put

VIRTUAL_HOSTS.clear()

here to remove the add_virtualhosts entry from Defaults.py.


>add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
>add_virtualhost('gurgitate.org', 'gurgitate.org')
>POSTFIX_STYLE_VIRTUAL_DOMAINS = 'gurgitate.org'
>DEFAULT_MAX_MESSAGE_SIZE = 10000           # KB
>
>I'm running OS X Server 10.5.7.
>
>I'll burn an SUV to the Gods on your behalf if you care to help me out.
>
>Best regards,
>Bryan
>
>
># !/bin/tcsh
># INSTALL MAILMAN TEST
># Last Updated:  2009-06-15
># Assumes prior installation of Xcode.
>
>serveradmin stop mail
>/usr/share/mailman/bin/mailmanctl stop
>
>rm -Rf /var/mailman/*
>rm -Rf /usr/share/mailman/*
>mkdir -p -m ug=rwx,o=rx /var/mailman
>mkdir -p -m a+rx,g+ws /usr/share/mailman
>chown _mailman:_mailman /var/mailman
>chown _mailman:_mailman /usr/share/mailman
>chmod -R 2777 /var/mailman
>chmod -R 2777 /usr/share/mailman


These are a bit permissive - should be 2775.


>
>mkdir -p /Library/TemporaryItems
>cd /Library/TemporaryItems
>
>curl -O http://superb-west.dl.sourceforge.net/sourceforge/mailman/mailman-2.1.12.tgz
>tar -xzf mailman-2.1.12.tgz
>cd mailman-2.1.12
>
># Pick One, anyone, none of them work:
>
># ./configure --prefix=/usr/share/mailman --with-var-prefix=/var/ 
>mailman --with-username=_mailman --with-groupname=_mailman --with-cgi- 
>gid=_www
># ./configure --prefix=/usr/share/mailman --with-var-prefix=/var/ 
>mailman --with-username=_mailman --with-groupname=_mailman --with-mail- 
>gid=_mailman --with-cgi-gid=_www --without-permcheck


The one above should be correct. With Postfix integration, the
"mail-gid" is the primary group of the owner of
/var/mailman/data/aliases.db which should be _mailman. It shouldn't
need --without-permcheck


>./configure --prefix=/usr/share/mailman --with-var-prefix=/var/mailman  
>--with-username=_mailman --with-groupname=_mailman --with-mail- 
>gid=_postfix --with-cgi-gid=_www --without-permcheck
>
>make
>make install
>
>chown _www:_mailman /var/mailman/archives/private
>chmod o-r-x /var/mailman/archives/private
>touch /var/mailman/data/aliases
>touch /var/mailman/data/virtual-mailman


The above two touch shouldn't be needed.



>scp #copy mm_cfg.py from where I'm working on it to its proper home.
>
>/usr/share/mailman/bin/newlist -q mailman bryan at laughingboot.net  
>mypassword
>/usr/share/mailman/bin/config_list -i /var/mailman/data/sitelist.cfg  
>mailman
>
>/usr/share/mailman/bin/newlist -q galaxy bryan at gurgitate.org mypassword
>/usr/share/mailman/bin/config_list -i /var/mailman/data/sitelist.cfg  
>galaxy


/var/mailman/data/sitelist.cfg is only intended for the site list named
'mailman' (unless you set something different for MAILMAN_SITE_LISTin
mm_cfg.py). You need something like

/usr/share/mailman/bin/newlist -q mailman bryan at gurgitate.org mypassword
/usr/share/mailman/bin/config_list -i /var/mailman/data/sitelist.cfg
mailman 

Yo don't want the config_list for other lists.


>/usr/share/mailman/bin/withlist -l -r fix_url galaxy -- 
>urlhost=gurgitate.org


Instead of the above, just create it with

/usr/share/mailman/bin/newlist -q -u gurgitate.org  galaxy
bryan at gurgitate.org mypassword



>cd /usr/share/mailman/bin
>./genaliases


If you create the lists in the proper domain with newlist, you don't
need genaliases at this point.


>serveradmin start mail
>./mailmanctl -s start
>./check_perms -f


Do the check_perms before the mailmanctl start


>rm -R /Library/TemporaryItems/
>

-- 
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