[Mailman-Users] bin/genaliases not generating aliases?

Mark Sapiro mark at msapiro.net
Thu Dec 15 19:13:54 EST 2016


On 12/15/2016 03:35 PM, Caesar Samsi wrote:
> I’ve attached postfix, mm_cfg.py, main.cf, and master.cf


And the list's content filtering remove all but postfix.txt which is
just as well, because 'postconf -n' and mm_cfg.py are all I wanted to
see anyway.


> I have created the initial list mailman (sudo bin/newlist
> --urlhost=www.yugi.us --emailhost=mail.yugi.us mailman)
> 
> Ran genaliases, still no aliases file in /usr/local/mailman/data.

What happened when you ran genaliases? Did it produce any output on your
terminal? If so, what? Did you run it via sudo as root or the Mailman
user ('list' in your case I think)?


Here's the relevant parts of mm_cfg.py and postconf -n with comments

mm_cfg.py

> #-------------------------------------------------------------
> # The name of the list Mailman uses to send password reminders
> # and similar. Don't change if you want mailman-owner to be
> # a valid local part.
> MAILMAN_SITE_LIST = 'mailman'

Have you created the 'mailman' list?. It must exist before you can start
Mailman.


> ...
> #-------------------------------------------------------------
> # Default domain for email addresses of newly created MLs
> DEFAULT_EMAIL_HOST = 'mailyugi.us'

Missing a dot - 'mail.yugi.us'


> #-------------------------------------------------------------
> # Default host for web interface of newly created MLs
> DEFAULT_URL_HOST   = 'www.yugi.us'
> #-------------------------------------------------------------
> # Required when setting any of its arguments.
> #add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
> add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
> 
> #-------------------------------------------------------------
> # The default language for this server.
> DEFAULT_SERVER_LANGUAGE = 'en'
> 
> #-------------------------------------------------------------
> # Iirc this was used in pre 2.1, leave it for now
> USE_ENVELOPE_SENDER    = 0              # Still used?

Yes, it's used, but 0 (False) is the default anyway.


...
> #-------------------------------------------------------------
> # 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'

OK


> SMTPHOST = 'localhost'
> SMTPPORT = 25

These are defaults anyway.


...
> POSTFIX_STYLE_VIRTUAL_DOMAINS = ['yugi.us']

If you want to generate data/virtual-mailman for lists in the
mail.yugi.us email domain, this should be

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['mail.yugi.us']

or

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['yugi.us', 'mail.yugi.us']

if you want both.


postconf -n

> 
> alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases

OK



> mydestination = localhost
> myhostname = mail.yugi.us
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> mynetworks_style = host
> myorigin = /etc/hostname
> readme_directory = no
> recipient_delimiter = +
> relay_domains = mail.yugi.us

mail.yugi.us should probably be a virtual_alias_domain, not a relay_domain.


...
> virtual_alias_domains = yugi.us

I.e., delete relay_domains and make the above

virtual_alias_domains = yugi.us, mail.yugi.us

or maybe just

virtual_alias_domains = mail.yugi.us


> virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf, mysql:/etc/postfix/mysql_virtual_alias_domainaliases_maps.cf, hash:/var/lib/mailman/data/virtual-mailman

OK.

> virtual_gid_maps = static:8
> virtual_mailbox_base = /var/vmail
> virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
> virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf, mysql:/etc/postfix/mysql_virtual_mailbox_domainaliases_maps.cf
> virtual_transport = dovecot
> virtual_uid_maps = static:150


I don't know what you are actually trying to do with mail to
*@mail.yugi.us and *@yugi.us. I.e. which domain(s) have Mailman list
addresses and which do not.

But none of this Postfix stuff affects whether genaliases created
data/aliases(.db) and data/virtual-mailman(.db).

My best guess is you are running genaliases as a user that doesn't have
permission to write in Mailman's data/ directory.
-- 
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