[Mailman-Users] genaliases not updating aliases file

Maria McKinley maria at shadlen.org
Sat Sep 1 05:00:57 CEST 2012


On 8/31/12 7:13 PM, Mark Sapiro wrote:
> On 8/31/2012 5:20 PM, Maria McKinley wrote:
>>
>> I am having difficulty getting genaliases to work. When I run it, it
>> outputs a list of my mailing lists, but it does not change the file
>> /var/lib/mailman/data/aliases or aliases.db
>
>
> If you want to use aliases and have genaliases update files, you must have
>
> MTA = 'Postfix'
>
> (uncommented) in mm_cfg.py.
>
>

Great, I'll do this.

>> I am using postfix, and have the following in my main.cf file
>>
>> alias_maps = hash:/etc/aliases, ldap:ldapdata,
>> hash:/var/lib/mailman/data/aliases
>> alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
>>
>> virtual_alias_maps = hash:/etc/postfix/virtual,
>>          hash:/var/lib/mailman/data/virtual-mailman
>> virtual_alias_domains = $virtual_alias_maps
>
>
> What do you have in Postfix's transport maps?

I actually had that included in my original email, but here you go:
I have this in /etc/postfix/transport:
lists.example.com   mailman:

Or is this not what you mean by transport maps?
>
>
>> I believe when I set this up I was not using virtual aliases, but can't
>> find documentation on this anymore, and not sure how to tell for sure. I
>> think it does not matter if I do or not, since I only have one domain
>> that I am using for mailman. I am using postfix-to-mailman.py, since I
>> have this line in /etc/postfix/master.cf
>>
>> mailman   unix  -       n       n       -       -       pipe
>>    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
>>    ${nexthop} ${user}
>
>
> Defining the transport doesn't mean it's used. Do you have an entry like
>
> lists.shadlen.org   mailman:
>
> in /etc/postfix/transport?
>
> (sigh...) second time this week ...
>
> Please read the posts at
> <http://mail.python.org/pipermail/mailman-users/2012-August/073993.html>, <http://mail.python.org/pipermail/mailman-users/2012-August/073994.html>
> and
> <http://mail.python.org/pipermail/mailman-users/2012-August/073997.html>.
>

Thanks so much, no idea why these don't show up when googling. My one 
annoyance with Mailman is it has no good search feature. Sorry for 
asking a question that had so recently been brought up.

>
>> In postfix-to-mailman.py it gives instructions for virtual aliases, but
>> not for non-virtual aliases, so maybe now I have to use virtual aliases
>> if I am using postfix-to-mailman.py?
>
>
> The "officially unsupported by the GNU Mailman project", 3rd party
> postfix_to_mailman.py delivery method is an alternative to and
> incompatible with aliases.
>
>
>> I am confused by somewhat conflicting documentation. In mm_cfg.py, it says:
>
>
> Talk to Debian/Ubuntu about this.
>
>> In mm_cfg.py, it says:
>> # Uncomment if you use Postfix virtual domains (but not
>> # postfix-to-mailman.py), but be sure to see
>> # /usr/share/doc/mailman/README.Debian first.
>> #MTA='Postfix'
>>
>> But then in postfix-to-mailman.py, it says
>> # /etc/mailman/mm_cfg.py
>> #    MTA = Postfix # So that mailman generates the recipients table
>
>
> I *think* that the Debian/Ubuntu package with postfix_to_mailman.py uses
> the Mailman generated virtual-mailman file (created with
>
> MTA = 'Postfix'
> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.shadlen.org']
>
> in mm_cfg.py) as a recipient_maps table, not as virtual_alias_maps. My
> mind boggles at the nonsensical nature of all this. The only point (and
> it's a weak one) of using postfix_to_mailman.py in the first place is so
> you don't have to rely on Mailman's generation of aliases and
> virtual_alias_maps, but then they (Debian) turn around and rely on
> Mailman to generate a virtual alias map which they use as a relay
> recipient map to stop non-list mail from getting to the 'mailman' transport.
>
>
>> The README was not particularly helpful in this case.
>>
>> The stuff for mailman in main.cf (in addition to the alias stuff above) is
>>
>> # stuff for mailman
>> relay_domains = lists.shadlen.org
>> transport_maps = hash:/etc/postfix/transport
>> mailman_destination_recipient_limit = 1
>>
>> I have this in /etc/postfix/transport:
>> lists.example.com   mailman:
>>
>> Can anyone help make sense of this?
>
>
> Unfortunately, Yes.
>
> The basic thing you have to decide is whether to use
> postfix_to_mailman.py or Mailman's Postfix integration.
>
> postfix_to_mailman.py:
>      advantages:
>          - doesn't require aliases
>          - at least as originally intended without relay_recipient_maps,
>            once it's working it continues to work as lists are created
>            and deleted
>      disadvantages:
>          - no support from the people who distribute it in their package
>            (why else are you here?)
>          - required a dedicated domain for mailing lists
>          - does not support non-list addresses in the dedicated domain
>          - triggers grumpy rants when you ask for help on this list.
> Mailman - Postfix integration:
>      advantages:
>          - documented and supported by the GNU Mailman project.
>          - works well in hundreds if not thousands of Mailman
>            installations
>          - allows multiple list domains, both local and virtual.
>          - allows non-list addresses in list domains
>      disadvantages:
>          - you tell me. Maybe it doesn't work or is hard to
>            configure in some arcane Postfix configurations.
>

Perfectly happy to switch. Just took the Debian default years ago, and 
have no idea why it only became a problem now. Well, I have some idea; 
many upgrades and moving servers later, and haven't tried to make, move 
or remove any lists for many years.

In addition to the instructions you pointed me to for using postfix with 
mailman, I am assuming I also do the following (stuff that I did 
following instructions in postfix_to_mailman.py, some of which has been 
confirmed that I need to get rid of in links you gave me, but including 
all for completeness):

#get rid of the virtual-mailman entry in virtual_alias_maps from 
postfix/main.cf:

virtual_alias_maps = hash:/etc/postfix/virtual,
         hash:/var/lib/mailman/data/virtual-mailman

# and this other stuff in main.cf:
relay_domains = lists.shadlen.org
transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1

# Get rid of these lines from master.cf:
mailman   unix  -       n       n       -       -       pipe
   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
   ${nexthop} ${user}

# remove this line from /etc/postfix/transport:
lists.example.com   mailman:

# and finally from /etc/mailman/mm_cfg.py
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.example.com']
# alias for postmaster, abuse and mailer-daemon
DEB_LISTMASTER = 'postmaster at example.com'

Thanks so much for your help.


More information about the Mailman-Users mailing list