[Mailman-Users] Modifying Mailman-generated virtuals file

Philip M. White pmw at qnan.org
Fri Oct 14 19:46:57 CEST 2005

On Fri, Oct 14, 2005 at 08:47:15AM -0700, Mark Sapiro wrote:
> Philip M. White wrote:
> >
> >So I wonder, is there any clean way of getting Mailman to append
> >`@localhost' to every virtuals line?
> I'm a little confused here. If you have MTA = 'Postfix' in mm_cfg.py,
> Mailman uses the Mailman/MTA/Postfix.py to update the 'aliases' and
> 'virtual-mailman' files when creating or deleting a list.
> On creation, Postfix.py checks the host_name of the list and if it is
> in POSTFIX_STYLE_VIRTUAL_DOMAINS, it adds entries to the
> 'virtual-mailman' file that look like listname at host_name,
> listname-bounces at host_name, etc.
> It looks to me as though if you create a list with host_name (email
> host) of 'localhost', you get what you want as long as 'localhost' is
> in POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py. Perhaps there are
> reasons why this won't work in your case, but I don't understand why
> the entries don't have '@something' appended in any case.
> If creating the list with host_name of 'localhost' is not a solution,
> and I can see that it may well not be becauses of the other uses of
> host_name, the only alternative is to modify Mailman/MTA/Postfix.py.
> You can do this 'cleanly' by storing the modified version as (e.g.)
> Mailman/MTA/localPostfix.py and then putting MTA = 'localPostfix' in
> mm_cfg.py. In this way, your modified version will not be overwritten
> when Mailman is upgraded.

I think there is confusion here.  Originally, my virtuals file looks
cs1234 at list.qnan.org              cs1234

Once the switchover to `cs1234' happens, the alias file should take
care to pipe it to the necessary command.  However, this is a problem
for me, since by default Postfix will resolve `cs1234' to
cs1234 at qnan.org.  The key here is that qnan.org is another virtual
aliases setup, so Postfix does not look at Mailman's alias file.  It
looks at qnan.org's dedicated alias file (which only contains local
system users), does not find the `cs1234' entry, and fails with a
'user does not exist in relay table' error.

The reason this happens is that Postfix's mynetworks is only configured
for localhost and localhost.$mydomain, and the reason for /that/ is that
in trying to achieve a namespace separation for qnan.org and
list.qnan.org, the Postfix mailing list recommended the solution of
splitting both away from Postfix's "core" configuration into separate
virtual aliases.

My solution to the lookup problem is to change the virtuals file to:
cs1234 at list.qnan.org              cs1234 at localhost

This forces Postfix to examine the mynetworks' set of aliases, match a
cs1234 entry of Mailman's alias file, and pipe the message to the
correct command.

So, my goal is to get Postfix to add `@localhost' to the right-hand
side, not the left.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.python.org/pipermail/mailman-users/attachments/20051014/a534441a/attachment.pgp 

More information about the Mailman-Users mailing list