[Mailman-Users] Help needed Mailman, Postfix with MySQL and Virtual Domain Lists

Mark Sapiro mark at msapiro.net
Sat Feb 8 19:20:50 CET 2014


On 02/07/2014 01:59 PM, George Kasica wrote:> Hello:
> 
> Currently I've got Postfix running with virtual domains with a MySQL
> database and am trying to get Mailman to do so as well.
> 
> I can get one domain to work mailtest at netwrx1.org but anything else is
> failing as below. Can someone assist? I've loaded the aliases as shown in to
> mysql and the snip of the mm_cfg.py is below as well.
> I've looked at varius on line FAQs and other references but am still stuck -
> have bounced all the relevant iitems postfix and mailman.
...
> Feb  7 15:09:56 eagle postfix/smtpd[5953]: NOQUEUE: reject: RCPT from
> mail-by2lp0235.outbound.protection.outlook.com[207.46.163.235]: 550 5.1.1
> <skunk-works at netwrx1.org>: Recipient address rejected: User unknown in
> virtual mailbox table; from=<gkasica at netwrx1.com>
> to=<skunk-works at netwrx1.org> proto=ESMTP
> helo=<na01-by2-obe.outbound.protection.outlook.com>
...
> Aliases
> ======
> INSERT  INTO aliases (mail,destination) VALUES
> ('skunkworks at netwrx1.org','skunkworks at lists.netwrx1.org'),


skunk-works or skunkworks? Is that the problem?


> /etc/mm_cfg.py
> =============
...
> VIRTUAL_HOSTS =
> {'netwrx1.com','netwrx1.net','netwrx1.org','mke-skywarn.org','petdiabetes.ne
> t','skywarn.biz','skywarn.tv','skywarn.us','twmbfelinerescue.org'}


The above is wrong!

VIRTUAL_HOSTS is a python dictionary with keys = URL hosts and values =
the corresponding email hosts. (The above syntax creates something
entirely different.) It is maintained by add_virtualhost directives as
below. It should never be assigned a value in mm_cfg.py because this
creates an entity mm_cfg.VIRTUAL_HOSTS distinct from
Defaults.VIRTUAL_HOSTS, but the add_virtualhost directives still
maintain Defaults.VIRTUAL_HOSTS which is not referenced in Mailman.

The only direct reference th VIRTUAL_HOSTS that should ever be in
mm_cfg.py is

VIRTUAL_HOSTS.clear()

if needed to remove the default entry set in Defaults.py if it is
erroneous, and if needed, it must be VIRTUAL_HOSTS.clear() and not
VIRTUAL_HOSTS = {} to avoid creating mm_cfg.VIRTUAL_HOSTS distinct from
Defaults.VIRTUAL_HOSTS.

> # Required when setting any of its arguments.
> #add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
> add_virtualhost('www.netwrx1.com','netwrx1.com')
> add_virtualhost('www.netwrx1.net','netwrx1.net')
> add_virtualhost('www.netwrx1.org','netwrx1.org')
> add_virtualhost('www.mke-skywarn.org','mke-skywarn.org')
> add_virtualhost('www.petdiabetes.net','petdiabetes.net')
> add_virtualhost('www.skywarn.biz','skywarn.biz')
> add_virtualhost('www.skywarn.tv','skywarn.tv')
> add_virtualhost('www.skywarn.us','skywarn.us')
> add_virtualhost('www.twmbfelinerescue.org','twmbfelinerescue.org')
>  
> POSTFIX_STYLE_VIRTUAL_DOMAINS =
> ['netwrx1.com','netwrx1.net','netwrx1.org','mke-skywarn.org','petdiabetes.ne
> t','skywarn.biz','skywarn.tv','skywarn.us','twmbfelinerescue.org']


This does nothing if you don't also have

MTA = 'Postfix'

to cause Mailman to generate data/aliases and data/virtual-mailman to be
referenced by Postfix.

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