New Mailman Installation - Can't Send Email to a New List
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Greetings,
We've recently installed Mailman 2.1.9 on our server. We have installed and configured Mailman in a postfix environment that is using mysql (See our server configuration at the bottom of this email). We can create a new list, log onto the admin and user web interface. However, we are unable to send email to a newly created list. When we try to send an email, the send process hangs with the following message:
Alert
An error occurred while sending mail. The mail server responded:
<testlist@ourserver.com>: Recipient address rejected: User unknown
in the local recipient table. Please verify that your email address
is correct in your Mail preference and try again.
We've followed the instructions in the pages below and still been unable to fix the problem:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.007.htp
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq03.014.htp
We've noticed that the .../data/virtual-mailman.db does not populate.
Running genaliases populates the .../data/aliases and
...../data/aliases.db. Adding a new list updates the aliases.db, but in
either case, the virtual-mailman and virtual-mailman.db files have no data.
Questions:
- Is our inability to send email to the lists due to the fact that the virtual db files aren't being populated?
- If so, how do we fix this for our already created lists?
- If so, how do we fix things so that lists we create from now on don't have this problem?
Regards, Jeff
Server Configuration
Linux version 2.6.15-gentoo-r1
Postfix mail_version = 2.2.5 -2 virtual domains -multiple aliases for each virtual domain
phpMyAdmin 2.7.0-pl1 -MySQL 4.1.14-log
SquirrelMail version 1.4.5
Mailman version: 2.1.9 (not fully functional at this point)
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
Maybe. Have you set up POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py per <http://www.list.org/mailman-install/postfix-virtual.html>
If the problem is that you havent set POSTFIX_STYLE_VIRTUAL_DOMAINS, fix it and then run bin/genaliases.
Assuming you have set "MTA = 'Postfix'" and properly set POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py, list creation should update data/aliases* and data/virtual-mailman* automatically.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark (and anyone else who wants to jump in), my comments and questions are below in *bolded blue.*
Mark Sapiro wrote:
*Here is the text from the web-page that you reference (below) My comments and questions will be interspersed in bolded blue.*
6.1.2 Virtual domains
Postfix 2.0 supports virtual alias domains'', essentially what used to be called
Postfix-style virtual domains'' in earlier Postfix versions.
To make virtual alias domains work with Mailman, you need to do some
setup in both Postfix and Mailman. Mailman will write all virtual alias
mappings to a file called, by default,
/usr/local/mailman/data/virtual-mailman. It will also use *postmap* to
create the *virtual-mailman.db* file that Postfix will actually use.
First, you need to set up the Postfix virtual alias domains as described in the Postfix documentation (see Postfix's |virtual(5)| manpage). Note that it's your responsibility to include the |virtual-alias.domain anything| line as described manpage; Mailman will not include this line in virtual-mailman. You are highly encouraged to make sure your virtual alias domains are working properly before integrating with Mailman.
*I stepped through http://www.postfix.org/virtual.5.html and we seem to have everything setup properly. As a practical observation, we have 2 virtual domain aliases each with multiple aliased and email from both internal and external addresses seem to be delivered without problem.*
Next, add a path to Postfix's virtual_alias_maps variable, pointing to the virtual-mailman file, e.g.:
virtual_alias_maps = <your normal virtual alias files>,
hash:/usr/local/mailman/data/virtual-mailman
assuming you've installed Mailman in the default location. If you're using an older version of Postfix which doesn't have the virtual_alias_maps variable, use the virtual_maps variable instead.
*From our Postfix main.cf file I checked the virtual_alias_maps entry.
Here is our actual entry:
*
*virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
*
*The mysql-virtual.cf file contains (among other entries): *
*table = virtual
select_field = destination
where_field = email
*
*The virtual-mailman file exists but is completely empty (zero bytes).
In the same directory, there is also a file named virtual-mailman.db.
Using the command "**db4.2_dump virtual-mailman.db", the contents on the
db file is:*
*VERSION=3
format=bytevalue
type=hash
db_pagesize=4096
HEADER=END
DATA=END*
Next, in your mm_cfg.py file, you will want to set the variable POSTFIX_STYLE_VIRTUAL_DOMAINS to the list of virtual domains that Mailman should update. This may not be all of the virtual alias domains that your Postfix installation supports! The values in this list will be matched against the host_name attribute of mailing lists objects, and must be an exact match.
Here's an example. Say that Postfix is configured to handle the virtual domains |dom1.ain|, |dom2.ain|, and |dom3.ain|, and further that in your main.cf file you've got the following settings:
myhostname = mail.dom1.ain
mydomain = dom1.ain
mydestination = $myhostname, localhost.$mydomain
virtual_alias_maps =
hash:/some/path/to/virtual-dom1,
hash:/some/path/to/virtual-dom2,
hash:/some/path/to/virtual-dom2
*Here is our setup: *
*myhostname = mail.domain1.net
mydomain = domain1.net
mydestination = $myhostname $mydomain
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
*
*Again, the **mysql-virtual.cf file seems to be properly setup because email sent to the virtual and aliased domains seems to work fine. Also again, however, the virtual-mailman and virtual-mailman.db files are empty. *
If in your virtual-dom1 file, you've got the following lines:
dom1.ain IGNORE
@dom1.ain @mail.dom1.ain
this tells Postfix to deliver anything addressed to |dom1.ain| to the same mailbox at |mail.dom1.com|, its default destination. * This is where I get a bit lost, but I'll try to muddle through. We don't actually have the virtual-domain1 file since we've implemented Postfix using mySQL. Here are some possibly relevant entries from the database: *
*From the table "alias" we have these entries: *
*alias (column title)
* *destination (column title)
*
*postmaster
* *postmaster@domain1.net
*
*root
* *postmaster@domain1.net
*
*
*
*From the table "transport" we have these entries: *
*domain (column title)* *destination (column title)*
*domain1.net
* *virtual:
*
*domain2.net* *virtual:*
*domain3.com* *virtual:*
*From the table "virtual" we have these entries: *
*email (column title)* *destination (column title)*
*domain1.net * *virtual:*
*@alias1.com* *@domain2.net*
*@alias2.com* *@domain2.net*
*@alias3.com * *@domain2.net*
*@alias4.info* *@domain2.ne*
In this case you would not include |dom1.ain| in POSTFIX_STYLE_VIRTUAL_DOMAINS because otherwise Mailman will write entries for mailing lists in the dom1.ain domain as
mylist@dom1.ain mylist
mylist-request@dom1.ain mylist-request
# and so on...
The more specific entries trump your more general entries, thus breaking the delivery of any |dom1.ain| mailing list.
*I'm completely lost here.*
However, you would include |dom2.ain| and |dom3.ain| in mm_cfg.py:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain']
Now, any list that Mailman creates in either of those two domains, will have the correct entries written to /usr/local/mailman/data/virtual-mailman.
*Here are the entries from our mm_cfg.py file: *
*from Defaults import *
POSTFIX_STYLE_VIRTUAL_DOMAINS=['domain1.net', 'domain2.net']
MTA='Postfix'
add_virtualhost('mail.domain1.net', 'domain1.net')
MAILMAN_SITE_LIST='mailman'*
As above with the data/aliases* files, you want to make sure that both data/virtual-mailman and data/virtual-mailman.db are user and group owned by |mailman|.
*Here are the permissions of all files in the mailman/data/ directory: *
*-rw-r----- 1 root mailman 41 Oct 18 16:20 adm.pw
-rw-rw---- 1 mailman mailman 3438 Nov 9 13:53 aliases
-rw-rw---- 1 mailman mailman 12288 Nov 9 13:53 aliases.db
-rw-r----- 1 root mailman 41 Oct 18 16:20 creator.pw
-rw-r--r-- 1 root mailman 10 Oct 18 15:05 last_mailman_version
-rw-rw---- 1 mailman mailman 6 Oct 18 16:14 master-qrunner.pid
-rw-r--r-- 1 root mailman 14114 Nov 3 00:44 sitelist.cfg
-rw-rw-r-- 1 mailman mailman 0 Nov 9 13:53 virtual-mailman
-rw-rw-r-- 1 mailman mailman 12288 Nov 9 13:53 virtual-mailman.db
*
*Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
Regards, Jeff*
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
At 12:59 PM -0700 11/11/06, McJathan wrote:
Mark (and anyone else who wants to jump in), my comments and questions are below in *bolded blue.*
As you've found out, colors and styling don't survive well in Internet e-mail.
-- Brad Knowles, <brad@shub-internet.org>
Trend Micro has announced that they will cancel the stop.mail-abuse.org mail forwarding service as of 15 November 2006. If you have an old e-mail account for me at this domain, please make sure you correct that with the current address.
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark (and anyone else who wants to jump in), my comments and questions are below interspersed with the quotations. My previous email with HTML formatting was stripped of most of the formatting. Hopefully this email is better.
Mark Sapiro wrote:
I've quoted the entire web-page that you cite. My comments and questions are interspersed.
I stepped through http://www.postfix.org/virtual.5.html and we seem to have everything setup properly. As a practical observation, we have 2 virtual domain aliases each with multiple aliases, and email from both internal and external addresses seem to be delivered without problem to all virtual and aliased domains.
From our Postfix main.cf file I checked the virtual_alias_maps entry. Here is our actual entry:
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
The mysql-virtual.cf file contains (among other entries):
table = virtual
select_field = destination
where_field = email
The virtual-mailman file exists but is completely empty (zero bytes). In the same directory, there is also a file named virtual-mailman.db. Using the command "db4.2_dump virtual-mailman.db", the contents on the db file are:
VERSION=3
format=bytevalue
type=hash
db_pagesize=4096
HEADER=END
DATA=END
Here is our setup:
myhostname = mail.domain1.net
mydomain = domain1.net
mydestination = $myhostname $mydomain
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
Again, the mysql-virtual.cf file seems to be properly setup because email sent to the virtual and aliased domains seems to work fine. Also again, however, the virtual-mailman and virtual-mailman.db files are empty.
This is where I get a bit lost, but I'll try to muddle through. We don't actually have the virtual-domain1 file since we've implemented Postfix using mySQL. Here are some possibly relevant entries from the database:
From the table "alias" we have these entries:
alias (column title) destination (column title)
postmaster postmaster@domain1.net
root postmaster@domain1.net
From the table "transport" we have these entries:
domain (column title) destination (column title)*
domain1.net virtual:
domain2.net virtual:
domain3.com virtual:
From the table "virtual" we have these entries:
email (column title) destination (column title)
*domain1.net virtual:
*@alias1.com @domain2.net
*@alias2.com @domain2.net
*@alias3.com @domain2.net
*@alias4.info @domain2.net
I'm completely lost here.
Here are the entries from our mm_cfg.py file:
from Defaults import
POSTFIX_STYLE_VIRTUAL_DOMAINS=['domain1.net', 'domain2.net']
MTA='Postfix'
add_virtualhost('mail.domain1.net', 'domain1.net')
MAILMAN_SITE_LIST='mailman'*
Here are the permissions of all files in the mailman/data/ directory:
-rw-r----- 1 root mailman 41 Oct 18 16:20 adm.pw -rw-rw---- 1 mailman mailman 3438 Nov 9 13:53 aliases -rw-rw---- 1 mailman mailman 12288 Nov 9 13:53 aliases.db -rw-r----- 1 root mailman 41 Oct 18 16:20 creator.pw -rw-r--r-- 1 root mailman 10 Oct 18 15:05 last_mailman_version -rw-rw---- 1 mailman mailman 6 Oct 18 16:14 master-qrunner.pid -rw-r--r-- 1 root mailman 14114 Nov 3 00:44 sitelist.cfg -rw-rw-r-- 1 mailman mailman 0 Nov 9 13:53 virtual-mailman -rw-rw-r-- 1 mailman mailman 12288 Nov 9 13:53 virtual-mailman.db
Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
Regards, Jeff
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
At 2:13 PM -0700 11/11/06, McJathan wrote:
I've read through your entire message, and your questions seem to be more related to how to get virtual domains working correctly in postfix using MySQL, and don't seem to have much to do with using Mailman in that context.
Have you tried asking your questions on the postfix-users list?
Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
I certainly don't have any suggestions for you, other than to make use of the various postfix-related resources to try to make sure that you do not have any disconnects between postfix and MySQL, and once you can confirm that all those non-Mailman problems have been resolved, we might be able to help you fix the remaining Mailman-specific issues.
-- Brad Knowles, <brad@shub-internet.org>
Trend Micro has announced that they will cancel the stop.mail-abuse.org mail forwarding service as of 15 November 2006. If you have an old e-mail account for me at this domain, please make sure you correct that with the current address.
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Brad Knowles wrote:
Hi Brad, The virtual domains in Postfix seem to be working just fine. We don't have any problems at all both sending and receiving regular email. I set out all our Postscript configuration mainly as background. Our problem is with Mailman. We can setup a Mailman list, add subscribers, but when we send a message to the list we encounter an error. Please review again my very first message in this thread...
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
McJathan wrote:
Are the values for DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST from Defaults.py those for the domain2.net domain? If not, you need to set them in mm_cfg.py and clear the VIRTUAL_HOSTS dictionary of the entry from Defaults.py and have add_virtualhost() lines for the default domain and each additional domain. See, e.g., the beginning of <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.029.htp>.
Also, it looks like
add_virtualhost('mail.domain1.net', 'domain1.net')
may be backwards - the web domain is first and the email domain is second.
If you need to make changes to these in mm_cfg.py, you probably also need to run fix_url as described later in FAQ 4.29 or in <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.069.htp>.
The fact that you have nothing in virtual-mailman after running bin/genaliases and/or creating lists indicates you have no lists whose host_name attribute is in the POSTFIX_STYLE_VIRTUAL_DOMAINS list.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Hi Mark,
In reading your instructions through what I discovered was that POSTFIX_STYLE_VIRTUAL_DOMAINS was set to false like this:
POSTFIX_STYLE_VIRTUAL_DOMAINS = []
I'm assuming this may be the entire problem. Should this be set thusly?:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain1.net', 'domain2.net']
If so, once I make the change, what do I need to do to properly populate virtual-mailman and generally re-initialize everything?
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
Probably yes, but that's what you said you had in mm_cfg.py in the OP.
If so, once I make the change, what do I need to do to properly populate virtual-mailman and generally re-initialize everything?
Run Mailman's 'bin/genaliases'.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/85e516d12e7b6c3f7b0dba64b53b17ba.jpg?s=120&d=mm&r=g)
On 11/27/06, mcjathan <mcjathan1@xmission.com> wrote:
Any settings in mm_cfg.py override the identical setting in Defaults.py. So, if POSTFIX_STYLE_VIRTUAL_DOMAINS is unset in Defaults.py (or even set to 'foobarmonkey', for whatever reason), any setting (correct, valid, or otherwise) of POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py will be used, instead.
The rule of thumb is that you should never alter Defaults.py, since this file can (and probably will) be overwritten during an upgrade of Mailman. mm_cfg.py, however, will NOT be overwritten by Mailman's installation scripts, so it's safe to put configuration data there.
--
- Patrick Bogen
![](https://secure.gravatar.com/avatar/358f04f5f993066da926a0892f774c83.jpg?s=120&d=mm&r=g)
mcjathan sent the message below at 04:16 11/27/2006:
There is a comment right at the top of Defaults.py that says "don't edit this file".
Anything you want to change goes into mm_cfg.py and will override values in Defaults.py
The reason for this is that Defaults.py gets rebuilt and overwritten when you do make install. mm_cfg.py does not get overwritten so it is the place your overrides for site specific options are supposed to go.
Dragon
Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
You should not make any changes in Defaults.py (see <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.021.htp> and other replies in this thread)
Your setting in mm_cfg.py overrides the default in Defaults.py, and that's the way it should be.
So we're back to the original question. Please go back to <http://mail.python.org/pipermail/mailman-users/2006-November/054347.html> and try to understand what I wrote there. As I said there, "The fact that you have nothing in virtual-mailman after running bin/genaliases and/or creating lists indicates you have no lists whose host_name attribute is in the POSTFIX_STYLE_VIRTUAL_DOMAINS list".
Since POSTFIX_STYLE_VIRTUAL_DOMAINS is apparently correct, the problem is with the lists. This is because the various DEFAULT_*_HOST settings and add_virtualhost directives are not correct in mm_cfg.py or weren't when the lists were created. The post referenced above says more about this.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Mark, Ok, I added these lines at the end of the mm_cfg.py file:
DEFAULT_URL_HOST = 'www.domain1.net'
DEFAULT_EMAIL_HOST = 'mail.domain1.net'
VIRTUAL_HOSTS.clear()
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
add_virtualhost(DEFAULT_URL_HOST, 'mail.domain2.net')
Then, I ran the command below that refresh the mailman system:
bin/withlist -l -a -r fix_url --
Then, I verified that the file virtual-mailman had been populated. Looks good so far...
Now, how do I restart or "refresh" the Postfix system?
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
It seems the above was originally posted from another address and the original didn't reach (or hasn't yet reached) the list. Anyway, it is answered at <http://mail.python.org/pipermail/mailman-users/2006-December/054773.html>.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
Maybe. Have you set up POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py per <http://www.list.org/mailman-install/postfix-virtual.html>
If the problem is that you havent set POSTFIX_STYLE_VIRTUAL_DOMAINS, fix it and then run bin/genaliases.
Assuming you have set "MTA = 'Postfix'" and properly set POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py, list creation should update data/aliases* and data/virtual-mailman* automatically.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark (and anyone else who wants to jump in), my comments and questions are below in *bolded blue.*
Mark Sapiro wrote:
*Here is the text from the web-page that you reference (below) My comments and questions will be interspersed in bolded blue.*
6.1.2 Virtual domains
Postfix 2.0 supports virtual alias domains'', essentially what used to be called
Postfix-style virtual domains'' in earlier Postfix versions.
To make virtual alias domains work with Mailman, you need to do some
setup in both Postfix and Mailman. Mailman will write all virtual alias
mappings to a file called, by default,
/usr/local/mailman/data/virtual-mailman. It will also use *postmap* to
create the *virtual-mailman.db* file that Postfix will actually use.
First, you need to set up the Postfix virtual alias domains as described in the Postfix documentation (see Postfix's |virtual(5)| manpage). Note that it's your responsibility to include the |virtual-alias.domain anything| line as described manpage; Mailman will not include this line in virtual-mailman. You are highly encouraged to make sure your virtual alias domains are working properly before integrating with Mailman.
*I stepped through http://www.postfix.org/virtual.5.html and we seem to have everything setup properly. As a practical observation, we have 2 virtual domain aliases each with multiple aliased and email from both internal and external addresses seem to be delivered without problem.*
Next, add a path to Postfix's virtual_alias_maps variable, pointing to the virtual-mailman file, e.g.:
virtual_alias_maps = <your normal virtual alias files>,
hash:/usr/local/mailman/data/virtual-mailman
assuming you've installed Mailman in the default location. If you're using an older version of Postfix which doesn't have the virtual_alias_maps variable, use the virtual_maps variable instead.
*From our Postfix main.cf file I checked the virtual_alias_maps entry.
Here is our actual entry:
*
*virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
*
*The mysql-virtual.cf file contains (among other entries): *
*table = virtual
select_field = destination
where_field = email
*
*The virtual-mailman file exists but is completely empty (zero bytes).
In the same directory, there is also a file named virtual-mailman.db.
Using the command "**db4.2_dump virtual-mailman.db", the contents on the
db file is:*
*VERSION=3
format=bytevalue
type=hash
db_pagesize=4096
HEADER=END
DATA=END*
Next, in your mm_cfg.py file, you will want to set the variable POSTFIX_STYLE_VIRTUAL_DOMAINS to the list of virtual domains that Mailman should update. This may not be all of the virtual alias domains that your Postfix installation supports! The values in this list will be matched against the host_name attribute of mailing lists objects, and must be an exact match.
Here's an example. Say that Postfix is configured to handle the virtual domains |dom1.ain|, |dom2.ain|, and |dom3.ain|, and further that in your main.cf file you've got the following settings:
myhostname = mail.dom1.ain
mydomain = dom1.ain
mydestination = $myhostname, localhost.$mydomain
virtual_alias_maps =
hash:/some/path/to/virtual-dom1,
hash:/some/path/to/virtual-dom2,
hash:/some/path/to/virtual-dom2
*Here is our setup: *
*myhostname = mail.domain1.net
mydomain = domain1.net
mydestination = $myhostname $mydomain
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
*
*Again, the **mysql-virtual.cf file seems to be properly setup because email sent to the virtual and aliased domains seems to work fine. Also again, however, the virtual-mailman and virtual-mailman.db files are empty. *
If in your virtual-dom1 file, you've got the following lines:
dom1.ain IGNORE
@dom1.ain @mail.dom1.ain
this tells Postfix to deliver anything addressed to |dom1.ain| to the same mailbox at |mail.dom1.com|, its default destination. * This is where I get a bit lost, but I'll try to muddle through. We don't actually have the virtual-domain1 file since we've implemented Postfix using mySQL. Here are some possibly relevant entries from the database: *
*From the table "alias" we have these entries: *
*alias (column title)
* *destination (column title)
*
*postmaster
* *postmaster@domain1.net
*
*root
* *postmaster@domain1.net
*
*
*
*From the table "transport" we have these entries: *
*domain (column title)* *destination (column title)*
*domain1.net
* *virtual:
*
*domain2.net* *virtual:*
*domain3.com* *virtual:*
*From the table "virtual" we have these entries: *
*email (column title)* *destination (column title)*
*domain1.net * *virtual:*
*@alias1.com* *@domain2.net*
*@alias2.com* *@domain2.net*
*@alias3.com * *@domain2.net*
*@alias4.info* *@domain2.ne*
In this case you would not include |dom1.ain| in POSTFIX_STYLE_VIRTUAL_DOMAINS because otherwise Mailman will write entries for mailing lists in the dom1.ain domain as
mylist@dom1.ain mylist
mylist-request@dom1.ain mylist-request
# and so on...
The more specific entries trump your more general entries, thus breaking the delivery of any |dom1.ain| mailing list.
*I'm completely lost here.*
However, you would include |dom2.ain| and |dom3.ain| in mm_cfg.py:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain']
Now, any list that Mailman creates in either of those two domains, will have the correct entries written to /usr/local/mailman/data/virtual-mailman.
*Here are the entries from our mm_cfg.py file: *
*from Defaults import *
POSTFIX_STYLE_VIRTUAL_DOMAINS=['domain1.net', 'domain2.net']
MTA='Postfix'
add_virtualhost('mail.domain1.net', 'domain1.net')
MAILMAN_SITE_LIST='mailman'*
As above with the data/aliases* files, you want to make sure that both data/virtual-mailman and data/virtual-mailman.db are user and group owned by |mailman|.
*Here are the permissions of all files in the mailman/data/ directory: *
*-rw-r----- 1 root mailman 41 Oct 18 16:20 adm.pw
-rw-rw---- 1 mailman mailman 3438 Nov 9 13:53 aliases
-rw-rw---- 1 mailman mailman 12288 Nov 9 13:53 aliases.db
-rw-r----- 1 root mailman 41 Oct 18 16:20 creator.pw
-rw-r--r-- 1 root mailman 10 Oct 18 15:05 last_mailman_version
-rw-rw---- 1 mailman mailman 6 Oct 18 16:14 master-qrunner.pid
-rw-r--r-- 1 root mailman 14114 Nov 3 00:44 sitelist.cfg
-rw-rw-r-- 1 mailman mailman 0 Nov 9 13:53 virtual-mailman
-rw-rw-r-- 1 mailman mailman 12288 Nov 9 13:53 virtual-mailman.db
*
*Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
Regards, Jeff*
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
At 12:59 PM -0700 11/11/06, McJathan wrote:
Mark (and anyone else who wants to jump in), my comments and questions are below in *bolded blue.*
As you've found out, colors and styling don't survive well in Internet e-mail.
-- Brad Knowles, <brad@shub-internet.org>
Trend Micro has announced that they will cancel the stop.mail-abuse.org mail forwarding service as of 15 November 2006. If you have an old e-mail account for me at this domain, please make sure you correct that with the current address.
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark (and anyone else who wants to jump in), my comments and questions are below interspersed with the quotations. My previous email with HTML formatting was stripped of most of the formatting. Hopefully this email is better.
Mark Sapiro wrote:
I've quoted the entire web-page that you cite. My comments and questions are interspersed.
I stepped through http://www.postfix.org/virtual.5.html and we seem to have everything setup properly. As a practical observation, we have 2 virtual domain aliases each with multiple aliases, and email from both internal and external addresses seem to be delivered without problem to all virtual and aliased domains.
From our Postfix main.cf file I checked the virtual_alias_maps entry. Here is our actual entry:
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
The mysql-virtual.cf file contains (among other entries):
table = virtual
select_field = destination
where_field = email
The virtual-mailman file exists but is completely empty (zero bytes). In the same directory, there is also a file named virtual-mailman.db. Using the command "db4.2_dump virtual-mailman.db", the contents on the db file are:
VERSION=3
format=bytevalue
type=hash
db_pagesize=4096
HEADER=END
DATA=END
Here is our setup:
myhostname = mail.domain1.net
mydomain = domain1.net
mydestination = $myhostname $mydomain
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf,
hash:/usr/home/mailman/data/virtual-mailman
Again, the mysql-virtual.cf file seems to be properly setup because email sent to the virtual and aliased domains seems to work fine. Also again, however, the virtual-mailman and virtual-mailman.db files are empty.
This is where I get a bit lost, but I'll try to muddle through. We don't actually have the virtual-domain1 file since we've implemented Postfix using mySQL. Here are some possibly relevant entries from the database:
From the table "alias" we have these entries:
alias (column title) destination (column title)
postmaster postmaster@domain1.net
root postmaster@domain1.net
From the table "transport" we have these entries:
domain (column title) destination (column title)*
domain1.net virtual:
domain2.net virtual:
domain3.com virtual:
From the table "virtual" we have these entries:
email (column title) destination (column title)
*domain1.net virtual:
*@alias1.com @domain2.net
*@alias2.com @domain2.net
*@alias3.com @domain2.net
*@alias4.info @domain2.net
I'm completely lost here.
Here are the entries from our mm_cfg.py file:
from Defaults import
POSTFIX_STYLE_VIRTUAL_DOMAINS=['domain1.net', 'domain2.net']
MTA='Postfix'
add_virtualhost('mail.domain1.net', 'domain1.net')
MAILMAN_SITE_LIST='mailman'*
Here are the permissions of all files in the mailman/data/ directory:
-rw-r----- 1 root mailman 41 Oct 18 16:20 adm.pw -rw-rw---- 1 mailman mailman 3438 Nov 9 13:53 aliases -rw-rw---- 1 mailman mailman 12288 Nov 9 13:53 aliases.db -rw-r----- 1 root mailman 41 Oct 18 16:20 creator.pw -rw-r--r-- 1 root mailman 10 Oct 18 15:05 last_mailman_version -rw-rw---- 1 mailman mailman 6 Oct 18 16:14 master-qrunner.pid -rw-r--r-- 1 root mailman 14114 Nov 3 00:44 sitelist.cfg -rw-rw-r-- 1 mailman mailman 0 Nov 9 13:53 virtual-mailman -rw-rw-r-- 1 mailman mailman 12288 Nov 9 13:53 virtual-mailman.db
Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
Regards, Jeff
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
At 2:13 PM -0700 11/11/06, McJathan wrote:
I've read through your entire message, and your questions seem to be more related to how to get virtual domains working correctly in postfix using MySQL, and don't seem to have much to do with using Mailman in that context.
Have you tried asking your questions on the postfix-users list?
Whew! That's a lot of information. Is any of it useful? Can you suggest some corrections to our configuration?
I certainly don't have any suggestions for you, other than to make use of the various postfix-related resources to try to make sure that you do not have any disconnects between postfix and MySQL, and once you can confirm that all those non-Mailman problems have been resolved, we might be able to help you fix the remaining Mailman-specific issues.
-- Brad Knowles, <brad@shub-internet.org>
Trend Micro has announced that they will cancel the stop.mail-abuse.org mail forwarding service as of 15 November 2006. If you have an old e-mail account for me at this domain, please make sure you correct that with the current address.
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Brad Knowles wrote:
Hi Brad, The virtual domains in Postfix seem to be working just fine. We don't have any problems at all both sending and receiving regular email. I set out all our Postscript configuration mainly as background. Our problem is with Mailman. We can setup a Mailman list, add subscribers, but when we send a message to the list we encounter an error. Please review again my very first message in this thread...
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
McJathan wrote:
Are the values for DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST from Defaults.py those for the domain2.net domain? If not, you need to set them in mm_cfg.py and clear the VIRTUAL_HOSTS dictionary of the entry from Defaults.py and have add_virtualhost() lines for the default domain and each additional domain. See, e.g., the beginning of <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.029.htp>.
Also, it looks like
add_virtualhost('mail.domain1.net', 'domain1.net')
may be backwards - the web domain is first and the email domain is second.
If you need to make changes to these in mm_cfg.py, you probably also need to run fix_url as described later in FAQ 4.29 or in <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.069.htp>.
The fact that you have nothing in virtual-mailman after running bin/genaliases and/or creating lists indicates you have no lists whose host_name attribute is in the POSTFIX_STYLE_VIRTUAL_DOMAINS list.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Hi Mark,
In reading your instructions through what I discovered was that POSTFIX_STYLE_VIRTUAL_DOMAINS was set to false like this:
POSTFIX_STYLE_VIRTUAL_DOMAINS = []
I'm assuming this may be the entire problem. Should this be set thusly?:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['domain1.net', 'domain2.net']
If so, once I make the change, what do I need to do to properly populate virtual-mailman and generally re-initialize everything?
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
Probably yes, but that's what you said you had in mm_cfg.py in the OP.
If so, once I make the change, what do I need to do to properly populate virtual-mailman and generally re-initialize everything?
Run Mailman's 'bin/genaliases'.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/85e516d12e7b6c3f7b0dba64b53b17ba.jpg?s=120&d=mm&r=g)
On 11/27/06, mcjathan <mcjathan1@xmission.com> wrote:
Any settings in mm_cfg.py override the identical setting in Defaults.py. So, if POSTFIX_STYLE_VIRTUAL_DOMAINS is unset in Defaults.py (or even set to 'foobarmonkey', for whatever reason), any setting (correct, valid, or otherwise) of POSTFIX_STYLE_VIRTUAL_DOMAINS in mm_cfg.py will be used, instead.
The rule of thumb is that you should never alter Defaults.py, since this file can (and probably will) be overwritten during an upgrade of Mailman. mm_cfg.py, however, will NOT be overwritten by Mailman's installation scripts, so it's safe to put configuration data there.
--
- Patrick Bogen
![](https://secure.gravatar.com/avatar/358f04f5f993066da926a0892f774c83.jpg?s=120&d=mm&r=g)
mcjathan sent the message below at 04:16 11/27/2006:
There is a comment right at the top of Defaults.py that says "don't edit this file".
Anything you want to change goes into mm_cfg.py and will override values in Defaults.py
The reason for this is that Defaults.py gets rebuilt and overwritten when you do make install. mm_cfg.py does not get overwritten so it is the place your overrides for site specific options are supposed to go.
Dragon
Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
You should not make any changes in Defaults.py (see <http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.021.htp> and other replies in this thread)
Your setting in mm_cfg.py overrides the default in Defaults.py, and that's the way it should be.
So we're back to the original question. Please go back to <http://mail.python.org/pipermail/mailman-users/2006-November/054347.html> and try to understand what I wrote there. As I said there, "The fact that you have nothing in virtual-mailman after running bin/genaliases and/or creating lists indicates you have no lists whose host_name attribute is in the POSTFIX_STYLE_VIRTUAL_DOMAINS list".
Since POSTFIX_STYLE_VIRTUAL_DOMAINS is apparently correct, the problem is with the lists. This is because the various DEFAULT_*_HOST settings and add_virtualhost directives are not correct in mm_cfg.py or weren't when the lists were created. The post referenced above says more about this.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/e10d4ca5f0b1e8bd15edb5c7c0076009.jpg?s=120&d=mm&r=g)
Mark Sapiro wrote:
Mark, Ok, I added these lines at the end of the mm_cfg.py file:
DEFAULT_URL_HOST = 'www.domain1.net'
DEFAULT_EMAIL_HOST = 'mail.domain1.net'
VIRTUAL_HOSTS.clear()
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
add_virtualhost(DEFAULT_URL_HOST, 'mail.domain2.net')
Then, I ran the command below that refresh the mailman system:
bin/withlist -l -a -r fix_url --
Then, I verified that the file virtual-mailman had been populated. Looks good so far...
Now, how do I restart or "refresh" the Postfix system?
Regards, Jeff
![](https://secure.gravatar.com/avatar/746f7519ba02fb0d815e59f305c53fa2.jpg?s=120&d=mm&r=g)
mcjathan wrote:
It seems the above was originally posted from another address and the original didn't reach (or hasn't yet reached) the list. Anyway, it is answered at <http://mail.python.org/pipermail/mailman-users/2006-December/054773.html>.
-- Mark Sapiro <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (6)
-
Brad Knowles
-
Dragon
-
Mark Sapiro
-
mcjathan
-
McJathan
-
Patrick Bogen