Re: [Mailman-Users] Mailman on multiple domains
As a follow-up, I don't seem to have the virtual-mailman file on my server anywhere as stated in the documentation....
From: Scott Race Sent: Tuesday, October 28, 2008 1:18 PM To: mailman-users@python.org Subject: Mailman on multiple domains
I have Postfix and Mailman running on a RHLE server. Mailman and Postfix work fine for a single domain setup.
I have now setup my postfix configuration setup to accept mail for multiple domains. I did so editing main.cf to include the new domain I want to receive mail for, created a local user account for the user, and created a virtual_alias_maps file which tells the email to the second domain to forward to the new user account I setup.
So I have mailman running on a new VirtualHost, I can create a list from the web interface, I can join lists and all emails from the system look ok (having the second domain name). When posting, I get the following:
Your message did not reach some or all of the intended recipients.
Subject: Test Post
Sent: 10/28/2008 1:11 PM
The following recipient(s) could not be reached:
Scott-test-request@second-domain.org on 10/28/2008 1:11 PM
You do not have permission to send to this recipient. For
assistance, contact your system administrator.
MSEXCH:MSExchangeIS:/DC=local/DC=jda:SERVER
This must have something to do with my virtual_alias_maps file, which currently has nothing in it except a map from the second domain to a local user (which I just did as a test). I'm sure I'm missing something here?
Thanks
Scott
Scott Racewrote:
As a follow-up, I don't seem to have the virtual-mailman file on my server anywhere as stated in the documentation....
Is the virtual domain in
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['the.virtual.domain']
in mm_cfg.py.
Is the host_name of the list = the.virtual.domain
Have you run Mailman's bin/genaliases since setting
MTA= 'Postfix'
and
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['the.virtual.domain']
in mm_cfg.py?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
So I didn't have the entry for POSTFIX_STYLE_VIRTUAL_DOMAINS in my mm_cfg.py file.
So I added the following:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['www.second-domain.com']
Ran /bin/genaliases, no errors....
Mail still bounces with the following:
Your message did not reach some or all of the intended recipients.
Subject: Test to list
Sent: 10/30/2008 4:16 PM
The following recipient(s) could not be reached:
scott-test@second-domain.com on 10/30/2008 4:16 PM
There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.com>: Recipient address rejected: User unknown in virtual alias table
Guess I still don't know how the virtual alias table gets updated when a list is created....thanks in advance for any thoughts.
Scott
-----Original Message----- From: mailman-users-bounces+webaccount=jdaarch.com@python.org [mailto:mailman-users-bounces+webaccount=jdaarch.com@python.org] On Behalf Of Mark Sapiro Sent: Wednesday, October 29, 2008 4:36 PM To: Scott Race; mailman-users@python.org Subject: Re: [Mailman-Users] Mailman on multiple domains
Scott Racewrote:
As a follow-up, I don't seem to have the virtual-mailman file on my server anywhere as stated in the documentation....
Is the virtual domain in
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['the.virtual.domain']
in mm_cfg.py.
Is the host_name of the list = the.virtual.domain
Have you run Mailman's bin/genaliases since setting
MTA= 'Postfix'
and
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['the.virtual.domain']
in mm_cfg.py?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/webaccount%40jdaarc h.com
Security Policy: http://wiki.list.org/x/QIA9
Scott Race wrote:
So I didn't have the entry for POSTFIX_STYLE_VIRTUAL_DOMAINS in my mm_cfg.py file.
So I added the following:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['www.second-domain.com']
This domain has to match the host_name attribute of the list (the 'email host', not the 'url host'). It seems likely it should be 'second-domain.com', not 'www.second-domain.com'.
Ran /bin/genaliases, no errors....
But did it produce a data/virtual-mailman file?
Mail still bounces with the following:
Your message did not reach some or all of the intended recipients.
Subject: Test to list Sent: 10/30/2008 4:16 PM
The following recipient(s) could not be reached:
scott-test@second-domain.com on 10/30/2008 4:16 PM There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.com>: Recipient address rejected: User unknown in virtual alias table
Guess I still don't know how the virtual alias table gets updated when a list is created....thanks in advance for any thoughts.
If the list's host_name is in POSTFIX_STYLE_VIRTUAL_DOMAINS, the appropriate virtual mappings are added to data/virtual-mailman and POSTFIX_MAP_CMD (default '/usr/sbin/postmap') is run to update data/virtual-mailman.db.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks, fixed the domain name in the mm_cfg.py to read ['second-domain.com'].
Running the /bin/genaliases doesn't return an error, but doesn't generate the /data/virtual-mailman file. The mailman error logs don't show anything (no errors since Oct 22).
Sounds like the virtual-mailman file missing is my main problem, huh?
Scott
From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Fri 10/31/2008 12:02 PM To: Scott Race; mailman-users@python.org Subject: Re: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
So I didn't have the entry for POSTFIX_STYLE_VIRTUAL_DOMAINS in my mm_cfg.py file.
So I added the following:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['www.second-domain.com']
This domain has to match the host_name attribute of the list (the 'email host', not the 'url host'). It seems likely it should be 'second-domain.com', not 'www.second-domain.com'.
Ran /bin/genaliases, no errors....
But did it produce a data/virtual-mailman file?
Mail still bounces with the following:
Your message did not reach some or all of the intended recipients.
Subject: Test to list Sent: 10/30/2008 4:16 PM
The following recipient(s) could not be reached:
scott-test@second-domain.com on 10/30/2008 4:16 PM There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.com>: Recipient address rejected: User unknown in virtual alias table
Guess I still don't know how the virtual alias table gets updated when a list is created....thanks in advance for any thoughts.
If the list's host_name is in POSTFIX_STYLE_VIRTUAL_DOMAINS, the appropriate virtual mappings are added to data/virtual-mailman and POSTFIX_MAP_CMD (default '/usr/sbin/postmap') is run to update data/virtual-mailman.db.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Scott Race wrote:
Thanks, fixed the domain name in the mm_cfg.py to read ['second-domain.com'].
Running the /bin/genaliases doesn't return an error, but doesn't generate the /data/virtual-mailman file. The mailman error logs don't show anything (no errors since Oct 22).
Sounds like the virtual-mailman file missing is my main problem, huh?
Yes.
Go to the list's General Options page and look near the bottom at "Host name this list prefers for email.". Does this match second-domain.com?
What you ultimately need to do to configure all this depends on whether or not you will have multiple Mailman domains or a single Mailman domain.
If there is only a single mailman domain = second-domain.com you want something like
DEFAULT_URL_HOST = 'www.second-domain.com' DEFAULT_EMAIL_HOST = 'second-domain.com' add_virtual_hosts(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
in mm_cfg.py
and then run
bin/withlist -l -a -r fix_url
to fix the web_page_url and host_name attributes of all the lists.
If you have more Mailman domains, it's more complex, but until you have the proper host_name for your lists, genaliases won't create/update virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for the reply - so this will be a multiple mailman domain. Currently list working on first-domain.org, trying to get it working on second-domain.org.
So yes, "Host name this list prefers for email" is correct as second-domain.org.
My mm_cfg.py looks like this:
from socket import *
try:
fqdn = getfqdn()
except:
fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn
DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above
add_virtualhost # MUST be called after they have been defined.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
add_virtualhost('www.first-domain.org', 'first-domain.org')
add_virtualhost('www.second-domain.org',
'second-domain.org')
##############################################################
# Put YOUR site-specific configuration below, in mm_cfg.py . #
# See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from
mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['second-domain.org']
MTA = 'Postfix'
So, I might be getting somewhere now...so I have a virtual-mailman file now, it's in /etc/mailman. It has the following entries:
# LOOP ADDRESSES START mailman-loop@second-domain.org mailman-loop # LOOP ADDRESSES END
# STANZA START: scott-test # CREATED: Fri Oct 31 15:44:28 2008 scott-test@second-domain.org scott-test scott-test-admin@second-domain.org scott-test-admin scott-test-bounces@second-domain.org scott-test-bounces scott-test-confirm@second-domain.org scott-test-confirm scott-test-join@second-domain.org scott-test-join scott-test-leave@second-domain.org scott-test-leave scott-test-owner@second-domain.org scott-test-owner scott-test-request@second-domain.org scott-test-request scott-test-subscribe@second-domain.org scott-test-subscribe scott-test-unsubscribe@second-domain.org scott-test-unsubscribe # STANZA END: scott-test
And the virtual-mailman.db is present and current (same date and time as the virtual-mailman file).
So, getting closer, but a test to the list still bounces: The following recipient(s) could not be reached:
scott-test@second-domain.org on 10/31/2008 1:47 PM
There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.org>: Recipient address rejected: User unknown in virtual alias table>
At this point I'm wondering if since I'm using a second domain, I need to include the first domain in the virtual domain config? Right now it seems like only my second-domain is in the virtual config.
Scott
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 1:13 PM To: Scott Race Cc: mailman-users@python.org Subject: RE: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
Thanks, fixed the domain name in the mm_cfg.py to read
['second-domain.com'].
Running the /bin/genaliases doesn't return an error, but doesn't generate the /data/virtual-mailman file. The mailman error logs don't show anything (no errors since Oct 22).
Sounds like the virtual-mailman file missing is my main problem, huh?
Yes.
Go to the list's General Options page and look near the bottom at "Host name this list prefers for email.". Does this match second-domain.com?
What you ultimately need to do to configure all this depends on whether or not you will have multiple Mailman domains or a single Mailman domain.
If there is only a single mailman domain = second-domain.com you want something like
DEFAULT_URL_HOST = 'www.second-domain.com' DEFAULT_EMAIL_HOST = 'second-domain.com' add_virtual_hosts(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
in mm_cfg.py
and then run
bin/withlist -l -a -r fix_url
to fix the web_page_url and host_name attributes of all the lists.
If you have more Mailman domains, it's more complex, but until you have the proper host_name for your lists, genaliases won't create/update virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Scott Race wrote:
Thanks for the reply - so this will be a multiple mailman domain. Currently list working on first-domain.org, trying to get it working on second-domain.org.
So yes, "Host name this list prefers for email" is correct as second-domain.org.
My mm_cfg.py looks like this:
from socket import * try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above add_virtualhost # MUST be called after they have been defined.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('www.first-domain.org', 'first-domain.org') add_virtualhost('www.second-domain.org', 'second-domain.org')
############################################################## # Put YOUR site-specific configuration below, in mm_cfg.py . # # See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['second-domain.org']
MTA = 'Postfix'
So, I might be getting somewhere now...so I have a virtual-mailman file now, it's in /etc/mailman.
I don't recall your telling us that this was a RedHat package. These things make a difference.
It has the following entries:
# LOOP ADDRESSES START mailman-loop@second-domain.org mailman-loop # LOOP ADDRESSES END
# STANZA START: scott-test # CREATED: Fri Oct 31 15:44:28 2008 scott-test@second-domain.org scott-test scott-test-admin@second-domain.org scott-test-admin scott-test-bounces@second-domain.org scott-test-bounces scott-test-confirm@second-domain.org scott-test-confirm scott-test-join@second-domain.org scott-test-join scott-test-leave@second-domain.org scott-test-leave scott-test-owner@second-domain.org scott-test-owner scott-test-request@second-domain.org scott-test-request scott-test-subscribe@second-domain.org scott-test-subscribe scott-test-unsubscribe@second-domain.org scott-test-unsubscribe # STANZA END: scott-test
And the virtual-mailman.db is present and current (same date and time as the virtual-mailman file).
That's good.
So, getting closer, but a test to the list still bounces: The following recipient(s) could not be reached:
scott-test@second-domain.org on 10/31/2008 1:47 PM There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.org>: Recipient address rejected: User unknown in virtual alias table>
At this point I'm wondering if since I'm using a second domain, I need to include the first domain in the virtual domain config? Right now it seems like only my second-domain is in the virtual config.
That's probably not a problem.
Does your main.cf virtual_alias_maps point to /etc/mailman/virtual-mailman where it is or does it point somewhere else. How about alias_maps?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Sorry bout that...yes, RHLE server.
/etc/postfix/main.cf has the following (in reference to the questions below):
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps virtual_alias_domains = hash:/etc/postfix/mydomains alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases
With your direction, realizing I likely needed a reference to this virtual-mailman file in my virtual_alias_maps, I added it, and my test post went through!
Not sure if I need the reference to virtual-mailman in my alias_maps too, didn't think so, and so I didn't add it.
Thanks a TON for the help!
Scott Race
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 2:16 PM To: Scott Race Cc: mailman-users@python.org Subject: RE: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
Thanks for the reply - so this will be a multiple mailman domain. Currently list working on first-domain.org, trying to get it working on second-domain.org.
So yes, "Host name this list prefers for email" is correct as second-domain.org.
My mm_cfg.py looks like this:
from socket import * try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above add_virtualhost # MUST be called after they have been defined.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('www.first-domain.org', 'first-domain.org') add_virtualhost('www.second-domain.org', 'second-domain.org')
############################################################## # Put YOUR site-specific configuration below, in mm_cfg.py . # # See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['second-domain.org']
MTA = 'Postfix'
So, I might be getting somewhere now...so I have a virtual-mailman file now, it's in /etc/mailman.
I don't recall your telling us that this was a RedHat package. These things make a difference.
It has the following entries:
# LOOP ADDRESSES START mailman-loop@second-domain.org mailman-loop # LOOP ADDRESSES END
# STANZA START: scott-test # CREATED: Fri Oct 31 15:44:28 2008 scott-test@second-domain.org scott-test scott-test-admin@second-domain.org scott-test-admin scott-test-bounces@second-domain.org scott-test-bounces scott-test-confirm@second-domain.org scott-test-confirm scott-test-join@second-domain.org scott-test-join scott-test-leave@second-domain.org scott-test-leave scott-test-owner@second-domain.org scott-test-owner scott-test-request@second-domain.org scott-test-request scott-test-subscribe@second-domain.org scott-test-subscribe scott-test-unsubscribe@second-domain.org scott-test-unsubscribe # STANZA END: scott-test
And the virtual-mailman.db is present and current (same date and time
as
the virtual-mailman file).
That's good.
So, getting closer, but a test to the list still bounces: The following recipient(s) could not be reached:
scott-test@second-domain.org on 10/31/2008 1:47 PM There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.org>: Recipient address rejected: User unknown in virtual alias table>
At this point I'm wondering if since I'm using a second domain, I need to include the first domain in the virtual domain config? Right now it seems like only my second-domain is in the virtual config.
That's probably not a problem.
Does your main.cf virtual_alias_maps point to /etc/mailman/virtual-mailman where it is or does it point somewhere else. How about alias_maps?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Scott Race wrote:
Sorry bout that...yes, RHLE server.
It isn't a question of the OS, but rather whether Mailman was configured and installed from our source distribution or from a RedHat RPM which differs significantly in terms of where things are found.
With your direction, realizing I likely needed a reference to this virtual-mailman file in my virtual_alias_maps, I added it, and my test post went through!
Not sure if I need the reference to virtual-mailman in my alias_maps too, didn't think so, and so I didn't add it.
Correct: alias_maps references the aliases and virtual_maps references the virtual mapping.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Now just hit one more slight snag, can no longer create new lists on the second-domain.org.
Fails with the Bug in Mailman version 2.1.5 - We're sorry, we hit a bug! Error.
/var/log/mailman error shows:
admin(14722): RuntimeError: command failed: /usr/sbin/postmap /etc/mailman/virtual-mailman (status: 1, Operation not permitted)
I noticed that apache is now trying to own the virtual-mailman file in /etc/mailman, didn't notice that before. Changing the ownership to root:mailman doesn't work, when trying to create a list it fails and apache takes ownership back.
Scott
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 2:16 PM To: Scott Race Cc: mailman-users@python.org Subject: RE: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
Thanks for the reply - so this will be a multiple mailman domain. Currently list working on first-domain.org, trying to get it working on second-domain.org.
So yes, "Host name this list prefers for email" is correct as second-domain.org.
My mm_cfg.py looks like this:
from socket import * try: fqdn = getfqdn() except: fqdn = 'mm_cfg_has_unknown_host_domains'
DEFAULT_URL_HOST = fqdn DEFAULT_EMAIL_HOST = fqdn
# Because we've overriden the virtual hosts above add_virtualhost # MUST be called after they have been defined.
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) add_virtualhost('www.first-domain.org', 'first-domain.org') add_virtualhost('www.second-domain.org', 'second-domain.org')
############################################################## # Put YOUR site-specific configuration below, in mm_cfg.py . # # See Defaults.py for explanations of the values. #
# Note - if you're looking for something that is imported from mm_cfg, but you # didn't find it above, it's probably in Defaults.py.
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['second-domain.org']
MTA = 'Postfix'
So, I might be getting somewhere now...so I have a virtual-mailman file now, it's in /etc/mailman.
I don't recall your telling us that this was a RedHat package. These things make a difference.
It has the following entries:
# LOOP ADDRESSES START mailman-loop@second-domain.org mailman-loop # LOOP ADDRESSES END
# STANZA START: scott-test # CREATED: Fri Oct 31 15:44:28 2008 scott-test@second-domain.org scott-test scott-test-admin@second-domain.org scott-test-admin scott-test-bounces@second-domain.org scott-test-bounces scott-test-confirm@second-domain.org scott-test-confirm scott-test-join@second-domain.org scott-test-join scott-test-leave@second-domain.org scott-test-leave scott-test-owner@second-domain.org scott-test-owner scott-test-request@second-domain.org scott-test-request scott-test-subscribe@second-domain.org scott-test-subscribe scott-test-unsubscribe@second-domain.org scott-test-unsubscribe # STANZA END: scott-test
And the virtual-mailman.db is present and current (same date and time
as
the virtual-mailman file).
That's good.
So, getting closer, but a test to the list still bounces: The following recipient(s) could not be reached:
scott-test@second-domain.org on 10/31/2008 1:47 PM There was a SMTP communication problem with the recipient's
email server. Please contact your system administrator. <jdaarch.com #5.5.0 smtp;550 <scott-test@second-domain.org>: Recipient address rejected: User unknown in virtual alias table>
At this point I'm wondering if since I'm using a second domain, I need to include the first domain in the virtual domain config? Right now it seems like only my second-domain is in the virtual config.
That's probably not a problem.
Does your main.cf virtual_alias_maps point to /etc/mailman/virtual-mailman where it is or does it point somewhere else. How about alias_maps?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Scott Race wrote:
Now just hit one more slight snag, can no longer create new lists on the second-domain.org.
Fails with the Bug in Mailman version 2.1.5 - We're sorry, we hit a bug! Error.
/var/log/mailman error shows:
admin(14722): RuntimeError: command failed: /usr/sbin/postmap /etc/mailman/virtual-mailman (status: 1, Operation not permitted)
I noticed that apache is now trying to own the virtual-mailman file in /etc/mailman, didn't notice that before. Changing the ownership to root:mailman doesn't work, when trying to create a list it fails and apache takes ownership back.
The owner doesn't matter except the owner of aliases.db probably needs to be 'mailman'. the other owners (aliases, virtual-mailman and virtual-mailman.db don't matter.
What does matter is /etc/mailman needs to be group mailman and g+rws and all four of aliases, aliases.db, virtual-mailman and virtual-mailman.db need to be group mailman and g+rw.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Checked the permissions:
Mailman directory: drwxrwsr-x 2 root mailman 4096 Oct 31 16:41 mailman
Alias files: -rw-rw-rw- 1 root mailman 12582 Oct 31 16:41 aliases -rw-rw-rw- 1 root mailman 24576 Oct 31 16:41 aliases.db -rw-rw---- 1 apache mailman 3689 Oct 31 16:41 virtual-mailman -rw-r----- 1 root mailman 12288 Oct 31 15:44 virtual-mailman.db
Changed the file permissions to 660 on virtual-mailman.db and posts now working!
Thanks a million.
Scott Race
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 3:11 PM To: Scott Race Cc: mailman-users@python.org Subject: RE: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
Now just hit one more slight snag, can no longer create new lists on the second-domain.org.
Fails with the Bug in Mailman version 2.1.5 - We're sorry, we hit a bug! Error.
/var/log/mailman error shows:
admin(14722): RuntimeError: command failed: /usr/sbin/postmap /etc/mailman/virtual-mailman (status: 1, Operation not permitted)
I noticed that apache is now trying to own the virtual-mailman file in /etc/mailman, didn't notice that before. Changing the ownership to root:mailman doesn't work, when trying to create a list it fails and apache takes ownership back.
The owner doesn't matter except the owner of aliases.db probably needs to be 'mailman'. the other owners (aliases, virtual-mailman and virtual-mailman.db don't matter.
What does matter is /etc/mailman needs to be group mailman and g+rws and all four of aliases, aliases.db, virtual-mailman and virtual-mailman.db need to be group mailman and g+rw.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I'm running MM 2.1.11 on Debian Etch4.0r3 with Postfix 2.3.8. I hesitate to explain how I made this work... In fact perhaps I shouldn't. It could jinx me. But in our case, I've got the individual LOCAL virtual email addresses for each domain defined in the /etc/postfix/virtual file and I've allowed mailman to define the local virtual email addresses IT needs for the same domain in the /usr/local/mailman/data/virtual-mailman file. These lists are mapped to postfix ".db" files /etc/postfix/virtual.db and /usr/local/mailman/data/virtual-mailman.db
These files are defined this way in /etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual hash:/usr/local/mailman/data/virtual-mailman
and in /usr/local/mailman/Mailman/mm_cfg.py they're defined this way:
##### # Virtual domains #####
# Set up your virtual host mappings here. This is primarily used for the # thru-the-web list creation, so its effects are currently fairly limited. # Use add_virtualhost() call to add new mappings. The keys are strings as # determined by Utils.get_domain(), the values are as appropriate for # DEFAULT_HOST_NAME. # VIRTUAL_HOSTS = {'lists.example.com':'example.com', # 'lists.somethingelse.com':'somethingelse.com'}
VIRTUAL_HOSTS = {'firstdomain.net':'firstdomain.net', 'seconddomain.com':'seconddomain.com', 'thirddomain.com':'thirddomain.com'}
IMAGE_LOGOS = '/icons/'
MTA = 'Postfix'
# # added this line to enable POSTFIX_STYLE_VIRTUAL_DOMAINS # details see: www.gnu.org/software/mailman/mailman-install/postfix-virtual.html # also: www.howtoforge.com/forums/showthread.php?t=5311 # POSTFIX_STYLE_VIRTUAL_DOMAINS = ['',]
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['firstdomain.net', 'seconddomain.com', 'thirddomain.com']
# Are archives public or private by default? # 0=public, 1=private DEFAULT_ARCHIVE_PRIVATE = 1
# ARCHIVE_TO_MBOX #-1 - do not do any archiving # 0 - do not archive to mbox, use builtin mailman html archiving only # 1 - do not use builtin mailman html archiving, archive to mbox only # 2 - archive to both mbox and builtin mailman html archiving. # See the settings below for PUBLIC_EXTERNAL_ARCHIVER and # PRIVATE_EXTERNAL_ARCHIVER which can be used to replace mailman's # builtin html archiving with an external archiver. The flat mail # mbox file can be useful for searching, and is another way to # interface external archivers, etc. ARCHIVE_TO_MBOX = 2
At this point I only have the mailman list for one of these domains working. If I understand the requirements correctly, I will eventually need to add "add_virtualhost" lines for
add_virtualhost('www.seconddomain.com', 'seconddomain.com') add_virtualhost('www.thirddomain.com','thirddomain.com')
Other than those changes which I expect to need to make, the way I have it configured now seems to be working.
There were also setup requirements in Apache's virtualhost definition files too. But the way this is setup is unique on Debian. So I won't try to explain it except to say Apache's VirtualHost definition files need these lines included:
## Mailman Setup ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/ <Directory "/usr/local/mailman/archives/private/"> # AddDefaultCharset Off </Directory>
I HOPE I've got this right. Most of all, I hope this helps you, Scott.
Good Luck!
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 2:13 PM To: Scott Race Cc: mailman-users@python.org Subject: Re: [Mailman-Users] Mailman on multiple domains
Scott Race wrote:
Thanks, fixed the domain name in the mm_cfg.py to read
['second-domain.com'].
Running the /bin/genaliases doesn't return an error, but doesn't generate the /data/virtual-mailman file. The mailman error logs don't show anything (no errors since Oct 22).
Sounds like the virtual-mailman file missing is my main problem, huh?
Yes.
Go to the list's General Options page and look near the bottom at "Host name this list prefers for email.". Does this match second-domain.com?
What you ultimately need to do to configure all this depends on whether or not you will have multiple Mailman domains or a single Mailman domain.
If there is only a single mailman domain = second-domain.com you want something like
DEFAULT_URL_HOST = 'www.second-domain.com' DEFAULT_EMAIL_HOST = 'second-domain.com' add_virtual_hosts(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
in mm_cfg.py
and then run
bin/withlist -l -a -r fix_url
to fix the web_page_url and host_name attributes of all the lists.
If you have more Mailman domains, it's more complex, but until you have the proper host_name for your lists, genaliases won't create/update virtual-mailman.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
TGPlatt, WebMaster wrote:
VIRTUAL_HOSTS = {'firstdomain.net':'firstdomain.net', 'seconddomain.com':'seconddomain.com', 'thirddomain.com':'thirddomain.com'}
Just FYI the abbove is EXACTLY eqiivalent to
VIRTUAL_HOSTS = {} add_virtualhost('firstdomain.net', 'firstdomain.net') add_virtualhost('seconddomain.com', 'seconddomain.com') add_virtualhost('thirddomain.com', 'thirddomain.com')
I.e. all add_virtualhost() does is add an entry to the VIRTUAL_HOSTS dictionary with key = the first arg and value = the second arg.
At this point I only have the mailman list for one of these domains working. If I understand the requirements correctly, I will eventually need to add "add_virtualhost" lines for
add_virtualhost('www.seconddomain.com', 'seconddomain.com') add_virtualhost('www.thirddomain.com','thirddomain.com')
Actually, these conflict mildly with what you have. The issue is how you want to access the web interface for these domains. http://seconddomain.com/mailman/... or http://www.seconddomain.com/mailman/... . If the former, you want what you have now or what I indicated was equivalent. If the latter, you want what you have immediately above, but you probably don't want both.
Other than those changes which I expect to need to make, the way I have it configured now seems to be working.
There were also setup requirements in Apache's virtualhost definition files too. But the way this is setup is unique on Debian. So I won't try to explain it except to say Apache's VirtualHost definition files need these lines included:
## Mailman Setup ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
Yes, you need the above, but not necessarily in each <VirtualHost> section. You can have it just once outside of the <VirtualHost> sections.
<Directory "/usr/local/mailman/archives/private/">
# AddDefaultCharset Off </Directory>
The above 3 lines appear to do nothing.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for the clarifications, Mark. I had actually forgotten that the way I formatted the Virtual_Hosts line was equivalent to providing individual add_virtualhost lines. So, you undoubtedly saved me some grief there.
Those few lines you see in my apache-postfix-mailman setup files only took me a week to figure out through web research and trial and error without pestering you for help. You were so helpful and generous with your support in June and July, I didn't want to show up at your door with hat in hand expecting you to lead me by the nose through this setup as well.
As far as the apache config goes, I deliberately opted to put the mailman commands in individual virtual host files because I don't necessarily plan to make mailman available to every domain on my server until I've learned more about how its setup needs to work. For that reason (and since the Debian definition readily supports it, I chose to install the mailman definitions domain-by-domain rather than place them at a higher level in the Apache Definitions and grant them automatically to ALL domains.
And yes, for the record, you're right. I realize these lines:
<Directory "/usr/local/mailman/archives/private/">
# AddDefaultCharset Off </Directory>
do nothing at the moment. I included them as a reminder to myself that additional definitions that involve a single mailman domain CAN be included in Apache's VirtualHost definition files. I believe the post where I found those example lines recommended adding them as part of a solution designed to support multiple character sets and languages. As I recall, there may also need to be an appropriate character set defined for EACH language as well. In short I retained those lines as a form of reminder -- a "footprint in the sand" if you will.
As always, thanks for your thoughtful, wise and astute guidance, Mark. Please keep eating your wheaties, friend. I'm afraid mailman would soon be unusable without your amazing knowledge and insight at the support helm! :-)
Best Professional Regards, Greg
-----Original Message----- From: Mark Sapiro [mailto:mark@msapiro.net] Sent: Friday, October 31, 2008 11:27 PM To: webwitchcraft@webwitchcraft.com; 'Scott Race' Cc: mailman-users@python.org Subject: Re: [Mailman-Users] Mailman on multiple domains
TGPlatt, WebMaster wrote:
VIRTUAL_HOSTS = {'firstdomain.net':'firstdomain.net', 'seconddomain.com':'seconddomain.com', 'thirddomain.com':'thirddomain.com'}
Just FYI the abbove is EXACTLY eqiivalent to
VIRTUAL_HOSTS = {} add_virtualhost('firstdomain.net', 'firstdomain.net') add_virtualhost('seconddomain.com', 'seconddomain.com') add_virtualhost('thirddomain.com', 'thirddomain.com')
I.e. all add_virtualhost() does is add an entry to the VIRTUAL_HOSTS dictionary with key = the first arg and value = the second arg.
At this point I only have the mailman list for one of these domains working. If I understand the requirements correctly, I will eventually need to add "add_virtualhost" lines for
add_virtualhost('www.seconddomain.com', 'seconddomain.com') add_virtualhost('www.thirddomain.com','thirddomain.com')
Actually, these conflict mildly with what you have. The issue is how you want to access the web interface for these domains. http://seconddomain.com/mailman/... or http://www.seconddomain.com/mailman/... . If the former, you want what you have now or what I indicated was equivalent. If the latter, you want what you have immediately above, but you probably don't want both.
Other than those changes which I expect to need to make, the way I have it configured now seems to be working.
There were also setup requirements in Apache's virtualhost definition files too. But the way this is setup is unique on Debian. So I won't try to explain it except to say Apache's VirtualHost definition files need these lines included:
## Mailman Setup ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
Yes, you need the above, but not necessarily in each <VirtualHost> section. You can have it just once outside of the <VirtualHost> sections.
<Directory "/usr/local/mailman/archives/private/">
# AddDefaultCharset Off </Directory>
The above 3 lines appear to do nothing.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Mark Sapiro
-
Scott Race
-
TGPlatt, WebMaster