postfix+mailman - User unknown in virtual mailbox table

Dear list,
This is an operational mail server supporting multidomain and based on postfix+dovecot+mysql. The virtual domain related config at main.cf is as below
[....] alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
######################################### ## virtual domain setting ######################################### virtual_alias_domains = hash:/etc/postfix/virtual virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf virtual_gid_maps = static:5000 virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_transport = dovecot dovecot_destination_recipient_limit = 1 virtual_uid_maps = static:5000 [....]
I have installed mailman here and to support virtual domain also have
the following at /usr/lib/mailman/Mailman/mm_cfg.py
[....]
DEFAULT_URL_PATTERN = 'http://%s/mailman/'
DEFAULT_EMAIL_HOST = 'list.mydomain.com'
DEFAULT_URL_HOST = 'list.mydomain.com'
MTA = 'Postfix'
POSTFIX_ALIAS_CMD = '/usr/sbin/postalias'
POSTFIX_MAP_CMD = '/usr/sbin/postmap'
DELIVERY_MODULE = 'SMTPDirect'
SMTPPORT = '25'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['list.infoservices.in']
IMAGE_LOGOS = '/mailmanicons/'
[....]
and the master.cf has following
[....]
mailman unix - n n - - pipe
flags=FR user=list argv=/etc/mailman/postfix-to-mailman.py
${nexthop} ${user}
[....]
after reloading postfix and mailman I have created a list and also
copy paste the suggested aliases at /etc/aliases and executed "newalias"
command.
If I send a request to listname-request@list.mydomain.com I get an error from
postfix as
` ` ` `
Recipient address rejected: User unknown in virtual mailbox table
` ` ` `
Do I need to create all such an account required by mailman?
I am confused...... any clue is very much welcome.
TIA

J. Bakshi wrote:
You are mixing two different methods of delivering mail to Mailman. You want to use either aliases and virtual alias maps or postfix_to_mailman.py. These are separate methods and are not compatible with each other.
Aliases/virtual maps are appropriate in all cases and can generally be automated with settings such as you have above in mm_cfg.py, however, you are missing a reference to hash:/var/lib/mailman/data/virtual-mailman in virtual_alias_maps in main.cf.
On the other hand, to use postfix_to_mailman.py which works well only if you have a dedicated domain for Mailman lists with no non-list addresses, you put "MTA = None" in mm_cfg.py and remove all the other Postfix stuff from mm_cfg.py. You also need something in transport_maps in Postfix to tell Postfix to use the 'mailman' transport for all mail to the 'list.mydomain.com' (or 'list.infoservices.in') domain. See the comments at the beginning of postfix_to_mailman.py for additional configuration information.
Note that postfix_to_mailman.py is a third party module officially unsupported by the GNU Mailman project. If you want to use it, you should go to whatever entity suggested it to you for support.
No. Mailman list addresses should never by local accounts/mailboxes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 06:56:28 -0700 Mark Sapiro <mark@msapiro.net> wrote:
Thanks for your great clarification. Please note I have some progress here meantime and also some new problem.
[1] I have dedicated domain for mailman, but I have removed the postfix_to_mailman.py related part from master.cf
[2] I have added the mailman domain at mydestination.
Now after restarting postfix I can send mail without any error. Though don't know how logiacl is to add the domain at mydestination. The mm_cfg.py is untouched
Please note there is no /var/lib/mailman/data/virtual-mailman here.
# rpm -qal mailman | grep vir /usr/share/doc/packages/mailman/contrib/virtusertable
Now the problem is I get email error as
Command died with status 2:
"/usr/lib/mailman/mail/mailman request typo3". Command output: Failure to
exec script. WANTED gid 67, GOT gid 65533.
````````````

J. Bakshi wrote:
It's fine to have the list domain in mydestination. It simplifies things and the only reason not to is if it is a virtual domain for non-Mailman reasons.
Please note there is no /var/lib/mailman/data/virtual-mailman here.
Then there are no lists with hostname 'list.infoservices.in' or you didn'r run Mailman's bin/genaliases after adding
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['list.infoservices.in']
to mm_cfg.py. However, you now don't want or need that anyway.
This is a group mismatch error. Postfix is invoking the /usr/lib/mailman/mail/mailman wrapper with GID 65533 and the wrapper is configured to expect GID 67.
First, the owner of the /var/lib/mailman/data/aliases.db file should be the Mailman user. Postfix will invoke the wrapper with user = the owner of the file (the .db file) in which it found the alias and group = that users primary group. This group must match what the wrapper is compiled or otherwize configured to expect. See the FAQ at <http://wiki.list.org/x/tYA9> for more on group mismatch errors.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 07:46:20 -0700 Mark Sapiro <mark@msapiro.net> wrote:
Again many many thanks for your cool clarification. I have executed now
/usr/lib/mailman/bin/genaliases and now I have
-rw-rw---- 1 root mailman 1762 Sep 2 16:57 /var/lib/mailman/data/virtual-mailman
hope the ownership is not an issue.
regarding /var/lib/mailman/data/aliases.db permission issue; it is already set to mailman
-rw-rw-r-- 1 mailman mailman 12288 Sep 2 16:57 /var/lib/mailman/data/aliases.db
Still group 65533 which is nobody group is called !!!

J. Bakshi wrote:
This is OK, but it is not needed and shouldn't be referenced because the list domain is now local (in mydestination). You can/should remove the POSTFIX_STYLE_VIRTUAL_DOMAINS entry from mm_cfg.py and the /var/lib/mailman/data/virtual-mailman* files. These should not be referenced in main.cf.
Then I suspect you have Mailman list aliases in some other file owned by root such as /etc/aliases. You need to remove any list aliases from all files except /var/lib/mailman/data/aliases*
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 08:20:31 -0700 Mark Sapiro <mark@msapiro.net> wrote:
<snip>
I like to know here, how can I still continue without using mydestination. So that minimum tweaking the main.cf to run mailman. I missed the /var/lib/mailman/data/virtual-mailman before.
I have already cleaned /etc/aliase to removed all the entries, I pasted there before. Now only /var/lib/mailman/data/aliases has the entries. Surely I can change the gid to 65533 and run the mailman; even I have already done that to check the functionality, but it is not a good practice as security issue is there. And this gid is the only and only one hitch to make it functional.

J. Bakshi wrote:
Actually, adding hash:/var/lib/mailman/data/aliases to alias_maps and adding list.infoservices.in to mydestination is the minimum tweaking required, except maybe for adding "recipient_delimiter = +" (see <http://www.list.org/mailman-install/node12.html>).
If you don't want to add list.infoservices.in to mydestination, you have to add it to virtual_alias_domains and add hash:/var/lib/mailman/data/virtual-mailman to virtual_alias_maps.
What do you get if you run
sudo -u mailman /usr/lib/mailman/mail/mailman post typo3 </dev/null
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

J. Bakshi wrote:
You are mixing two different methods of delivering mail to Mailman. You want to use either aliases and virtual alias maps or postfix_to_mailman.py. These are separate methods and are not compatible with each other.
Aliases/virtual maps are appropriate in all cases and can generally be automated with settings such as you have above in mm_cfg.py, however, you are missing a reference to hash:/var/lib/mailman/data/virtual-mailman in virtual_alias_maps in main.cf.
On the other hand, to use postfix_to_mailman.py which works well only if you have a dedicated domain for Mailman lists with no non-list addresses, you put "MTA = None" in mm_cfg.py and remove all the other Postfix stuff from mm_cfg.py. You also need something in transport_maps in Postfix to tell Postfix to use the 'mailman' transport for all mail to the 'list.mydomain.com' (or 'list.infoservices.in') domain. See the comments at the beginning of postfix_to_mailman.py for additional configuration information.
Note that postfix_to_mailman.py is a third party module officially unsupported by the GNU Mailman project. If you want to use it, you should go to whatever entity suggested it to you for support.
No. Mailman list addresses should never by local accounts/mailboxes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 06:56:28 -0700 Mark Sapiro <mark@msapiro.net> wrote:
Thanks for your great clarification. Please note I have some progress here meantime and also some new problem.
[1] I have dedicated domain for mailman, but I have removed the postfix_to_mailman.py related part from master.cf
[2] I have added the mailman domain at mydestination.
Now after restarting postfix I can send mail without any error. Though don't know how logiacl is to add the domain at mydestination. The mm_cfg.py is untouched
Please note there is no /var/lib/mailman/data/virtual-mailman here.
# rpm -qal mailman | grep vir /usr/share/doc/packages/mailman/contrib/virtusertable
Now the problem is I get email error as
Command died with status 2:
"/usr/lib/mailman/mail/mailman request typo3". Command output: Failure to
exec script. WANTED gid 67, GOT gid 65533.
````````````

J. Bakshi wrote:
It's fine to have the list domain in mydestination. It simplifies things and the only reason not to is if it is a virtual domain for non-Mailman reasons.
Please note there is no /var/lib/mailman/data/virtual-mailman here.
Then there are no lists with hostname 'list.infoservices.in' or you didn'r run Mailman's bin/genaliases after adding
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['list.infoservices.in']
to mm_cfg.py. However, you now don't want or need that anyway.
This is a group mismatch error. Postfix is invoking the /usr/lib/mailman/mail/mailman wrapper with GID 65533 and the wrapper is configured to expect GID 67.
First, the owner of the /var/lib/mailman/data/aliases.db file should be the Mailman user. Postfix will invoke the wrapper with user = the owner of the file (the .db file) in which it found the alias and group = that users primary group. This group must match what the wrapper is compiled or otherwize configured to expect. See the FAQ at <http://wiki.list.org/x/tYA9> for more on group mismatch errors.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 07:46:20 -0700 Mark Sapiro <mark@msapiro.net> wrote:
Again many many thanks for your cool clarification. I have executed now
/usr/lib/mailman/bin/genaliases and now I have
-rw-rw---- 1 root mailman 1762 Sep 2 16:57 /var/lib/mailman/data/virtual-mailman
hope the ownership is not an issue.
regarding /var/lib/mailman/data/aliases.db permission issue; it is already set to mailman
-rw-rw-r-- 1 mailman mailman 12288 Sep 2 16:57 /var/lib/mailman/data/aliases.db
Still group 65533 which is nobody group is called !!!

J. Bakshi wrote:
This is OK, but it is not needed and shouldn't be referenced because the list domain is now local (in mydestination). You can/should remove the POSTFIX_STYLE_VIRTUAL_DOMAINS entry from mm_cfg.py and the /var/lib/mailman/data/virtual-mailman* files. These should not be referenced in main.cf.
Then I suspect you have Mailman list aliases in some other file owned by root such as /etc/aliases. You need to remove any list aliases from all files except /var/lib/mailman/data/aliases*
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Fri, 2 Sep 2011 08:20:31 -0700 Mark Sapiro <mark@msapiro.net> wrote:
<snip>
I like to know here, how can I still continue without using mydestination. So that minimum tweaking the main.cf to run mailman. I missed the /var/lib/mailman/data/virtual-mailman before.
I have already cleaned /etc/aliase to removed all the entries, I pasted there before. Now only /var/lib/mailman/data/aliases has the entries. Surely I can change the gid to 65533 and run the mailman; even I have already done that to check the functionality, but it is not a good practice as security issue is there. And this gid is the only and only one hitch to make it functional.

J. Bakshi wrote:
Actually, adding hash:/var/lib/mailman/data/aliases to alias_maps and adding list.infoservices.in to mydestination is the minimum tweaking required, except maybe for adding "recipient_delimiter = +" (see <http://www.list.org/mailman-install/node12.html>).
If you don't want to add list.infoservices.in to mydestination, you have to add it to virtual_alias_domains and add hash:/var/lib/mailman/data/virtual-mailman to virtual_alias_maps.
What do you get if you run
sudo -u mailman /usr/lib/mailman/mail/mailman post typo3 </dev/null
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
J. Bakshi
-
Mark Sapiro