![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
Hello,
I am trying to get postfix working with mailman and I just can’t seem to get it to work.
Essentially what I want is this:
My mailing domain is students.wesleyseminary.edu.
I want messages going to allstudents@students.wesleyseminary.edu to go to a mailman managed distribution list that sends to the other accounts on the system.
Any help on this? Thanks.
Here is what I have so far:
Postconf –n
alias_maps = hash:/var/lib/mailman/data/aliases,hash:/etc/mail/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib64/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 20
home_mailbox = .Maildir/
html_directory = /usr/share/doc/postfix-2.6.6/html
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
local_transport = virtual
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination =
mydomain = students.wesleyseminary.edu
myhostname = wts-zimbra.wesleysem.edu
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/readme
recipient_delimiter = +
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = students.wesleyseminary.edu ESMTP $mail_name ($mail_version)
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_key_file = /etc/postfix/newkey.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/old_students.cf
virtual_gid_maps = static:1000
virtual_mailbox_base = /
virtual_mailbox_domains = /etc/postfix/virtual_domains.cf
virtual_mailbox_maps = ldap:/etc/postfix/ldap-maps.cf
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
This is the mailmain’s alias file referenced in alias_maps:
/var/lib/mailman/data/aliases
# This file is generated by Mailman, and is kept in sync with the
# binary hash file aliases.db. YOU SHOULD NOT MANUALLY EDIT THIS FILE
# unless you know what you're doing, and can keep the two files properly
# in sync. If you screw it up, you're on your own.
# The ultimate loop stopper address
mailman-loop: /var/lib/mailman/data/owner-bounces.mbox
# STANZA START: mailman
# CREATED: Thu Sep 2 14:05:34 2010
mailman: "|/usr/lib64/mailman/mail/mailman post mailman"
mailman-admin: "|/usr/lib64/mailman/mail/mailman admin mailman"
mailman-bounces: "|/usr/lib64/mailman/mail/mailman bounces mailman"
mailman-confirm: "|/usr/lib64/mailman/mail/mailman confirm mailman"
mailman-join: "|/usr/lib64/mailman/mail/mailman join mailman"
mailman-leave: "|/usr/lib64/mailman/mail/mailman leave mailman"
mailman-owner: "|/usr/lib64/mailman/mail/mailman owner mailman"
mailman-request: "|/usr/lib64/mailman/mail/mailman request mailman"
mailman-subscribe: "|/usr/lib64/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/usr/lib64/mailman/mail/mailman unsubscribe mailman"
# STANZA END: mailman
# STANZA START: allstudents
# CREATED: Thu Sep 2 14:05:34 2010
allstudents: "|/usr/lib64/mailman/mail/mailman post allstudents"
allstudents-admin: "|/usr/lib64/mailman/mail/mailman admin allstudents"
allstudents-bounces: "|/usr/lib64/mailman/mail/mailman bounces allstudents"
allstudents-confirm: "|/usr/lib64/mailman/mail/mailman confirm allstudents"
allstudents-join: "|/usr/lib64/mailman/mail/mailman join allstudents"
allstudents-leave: "|/usr/lib64/mailman/mail/mailman leave allstudents"
allstudents-owner: "|/usr/lib64/mailman/mail/mailman owner allstudents"
allstudents-request: "|/usr/lib64/mailman/mail/mailman request allstudents"
allstudents-subscribe: "|/usr/lib64/mailman/mail/mailman subscribe allstudents"
allstudents-unsubscribe: "|/usr/lib64/mailman/mail/mailman unsubscribe allstudents"
# STANZA END: allstudents
And this is my mailman’s mm_cfg.py file:
/etcmainman/mm_cfg.py:
# -*- python -*-
# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""This module contains your site-specific settings.
From a brand new distribution it should be copied to mm_cfg.py. If you
already have an mm_cfg.py, be careful to add in only the new settings you
want. Mailman's installation procedure will never overwrite your mm_cfg.py
file.
The complete set of distributed defaults, with documentation, are in the file
Defaults.py. In mm_cfg.py, override only those you want to change, after the
from Defaults import *
line (see below).
Note that these are just default settings; many can be overridden via the
administrator and user interfaces on a per-list or per-user basis.
"""
###############################################
# Here's where we get the distributed defaults.
from Defaults import *
##################################################
# Put YOUR site-specific settings below this line.
DEFAULT_EMAIL_HOST = 'students.wesleyseminary.edu'
DEFAULT_URL_HOST = 'students.wesleyseminary.edu'
MTA = "Postfix"
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['wesleyministrynetwork.com', ' students.wesleyseminary.edu']
add_virtualhost('www.wesleyministrynetwork.com', 'wesleyministrynetwork.com ')
Regards, Christopher Koeber
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 9/29/2010 10:08 AM, Christopher Koeber wrote:
[...]
mydestination =
You may or may not want to specify mydestination in main.cf at all. It looks as if you specified it as empty. At a minimum you want
mydestination = $myhostname
but the default
mydestination = $myhostname, localhost.$mydomain, localhost
is probably better.
mydomain = students.wesleyseminary.edu
myhostname = wts-zimbra.wesleysem.edu
In any case you need to make a decision here. Is students.wesleyseminary.edu intended to be a local domain to Postfix or a virtual alias domain. If local, you need it to be included in $mtdestination, either by setting
myhostname = students.wesleyseminary.edu
or by including $mydomain (or students.wesleyseminary.edu) in the domain list for mydestination.
If students.wesleyseminary.edu is to be a virtual alias domain, see below.
[...]
virtual_alias_maps = hash:/etc/postfix/old_students.cf
If students.wesleyseminary.edu is to be a virtual alias domain, you need to add hash:/var/lib/mailman/data/virtual-mailman to the virtual_alias_maps list above.
Also it is good to add
virtual_alias_domains = students.wesleyseminary.edu
Note that students.wesleyseminary.edu should not be a virtual_mailbox_domain in any case.
[...]
OK
And this is my mailman’s mm_cfg.py file:
/etcmainman/mm_cfg.py:
[...]
The above says students.wesleyseminary.edu is a virtual alias domain for Postfix. If that is true, OK. If not, remove it from this list.
In either case, add
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
here since you've changed the values of DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST subsequent to the entry in Defaults.py.
add_virtualhost('www.wesleyministrynetwork.com', 'wesleyministrynetwork.com ')
After making the above changes, if students.wesleyseminary.edu is to be a virtual alias domain and if the file /var/lib/mailman/data/virtual-mailman already exists with entries like
allstudents@students.wesleyseminary.edu allstudents etc.
You should be OK. If not you may need to run Mailman's
bin/withlist -r -r fix_url allstudents
followed by Mailman's
bin/genaliases
to create the virtual-mailman file.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
OK, I tried much of the suggestions given before and I made progress!
When I actually send a message to the list I get this:
Oct 4 20:49:04 WTS-ZIMBRA postfix/virtual[9636]: 25656321552: to=< allstudents@wts-zimbra.wesleysem.edu>, orig_to=< allstudents@students.wesleyseminary.edu>, relay=virtual, delay=406, delays=0.36/405/0/0.12, dsn=4.2.0, status=deferred (delivery failed to mailbox //"|/usr/lib64/mailman/mail/mailman post allstudents": unable to create lock file //"|/usr/lib64/mailman/mail/mailman post allstudents".lock: No such file or directory) Oct 4 20:49:09 WTS-ZIMBRA postfix/virtual[9635]: 0635D321524: to=< allstudents@wts-zimbra.wesleysem.edu>, orig_to=< allstudents@students.wesleyseminary.edu>, relay=virtual, delay=566, delays=72/489/0/5, dsn=4.2.0, status=deferred (delivery failed to mailbox //"|/usr/lib64/mailman/mail/mailman post allstudents": unable to create lock file //"|/usr/lib64/mailman/mail/mailman post allstudents".lock: No such file or directory)
Notice that instead of piping to the mailman service I get this "unable to create lockfile" problem.
Shouldn't postfix actually pipe to the program mailman?
Anyone seen that before?
Thanks.
Regards, Christopher Koeber
On Wed, Sep 29, 2010 at 9:36 PM, Mark Sapiro <mark@msapiro.net> wrote:
[...]
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Koeber wrote:
The basic issue is you are delivering via relay=virtual rather than relay=local. Only the local LDA knows how to pipe to a command. The virtual LDA is trying to deliver to the mailbox named "|/usr/lib64/mailman/mail/mailman post allstudents" which clearly doesn't work.
I think the problem is students.wesleyseminary.edu is a virtual_mailbox_domain whereas it needs to be a virtual_alias_domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
See below.
[Christopher Kurtis Koeber]
Thanks. The problem is that using the virtual transport was the only way I could get the OpenLDAP setup I had to work with postfix. Is there a way to conditionally use transports? Say, if one email address is found via a rule to use a local transport versus the virtual one?
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
Also, in additional to my question on whether the transport can be rules based I am wondering if it is possible to switch everything to the local transport but still support virtual domains.
This is necessary for my setup.
Thank you for your time.
Regards,
Christopher Koeber On Oct 5, 2010 1:43 AM, "Christopher Kurtis Koeber" <ckoeber@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Koeber wrote:
You can support virtual domains with the local transport, but in general, they need to be virtual_alias_domains, not virtual_mailbox_domains. Whether that works in your case depends on your exact configuration/requirements and is probably beyond the scope of this list.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Kurtis Koeber wrote:
That's what transport_maps is for. See the FAQ at <http://wiki.list.org/x/ZoCj> for a way to automate this for Mailman lists.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
On Tue, Oct 5, 2010 at 10:38 AM, Mark Sapiro <mark@msapiro.net> wrote:
Thanks so much. I didn't see this in the link but will I need to switch the "local transport" piece in Postfix to local?
I am guessing not, as that is what transport_maps is doing for me, right?
Regards, Christopher Koeber
--
Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8381104a4d879780b22b7a0c595641c2.jpg?s=120&d=mm&r=g)
On Mon, 4 Oct 2010, Mark Sapiro wrote:
I think the problem is students.wesleyseminary.edu is a virtual_mailbox_domain whereas it needs to be a virtual_alias_domain.
Maybe I'm missing something, but I've never had trouble using virtual mailbox domains to host Mailman lists. In fact, I'm not sure that I've ever done anything else.
Geoff.
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
On Wed, Oct 6, 2010 at 2:45 PM, Geoff Shang <geoff@quitelikely.com> wrote:
I tried it and it never gets to the local pipes for the mailman processes. Essentially Postfix still believes that anything going to the mailman system is going to the setups for virtual_mailbox_domain.
So you end up needing to do a transport map, which is what I am experimenting with.
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 9/29/2010 10:08 AM, Christopher Koeber wrote:
[...]
mydestination =
You may or may not want to specify mydestination in main.cf at all. It looks as if you specified it as empty. At a minimum you want
mydestination = $myhostname
but the default
mydestination = $myhostname, localhost.$mydomain, localhost
is probably better.
mydomain = students.wesleyseminary.edu
myhostname = wts-zimbra.wesleysem.edu
In any case you need to make a decision here. Is students.wesleyseminary.edu intended to be a local domain to Postfix or a virtual alias domain. If local, you need it to be included in $mtdestination, either by setting
myhostname = students.wesleyseminary.edu
or by including $mydomain (or students.wesleyseminary.edu) in the domain list for mydestination.
If students.wesleyseminary.edu is to be a virtual alias domain, see below.
[...]
virtual_alias_maps = hash:/etc/postfix/old_students.cf
If students.wesleyseminary.edu is to be a virtual alias domain, you need to add hash:/var/lib/mailman/data/virtual-mailman to the virtual_alias_maps list above.
Also it is good to add
virtual_alias_domains = students.wesleyseminary.edu
Note that students.wesleyseminary.edu should not be a virtual_mailbox_domain in any case.
[...]
OK
And this is my mailman’s mm_cfg.py file:
/etcmainman/mm_cfg.py:
[...]
The above says students.wesleyseminary.edu is a virtual alias domain for Postfix. If that is true, OK. If not, remove it from this list.
In either case, add
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
here since you've changed the values of DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST subsequent to the entry in Defaults.py.
add_virtualhost('www.wesleyministrynetwork.com', 'wesleyministrynetwork.com ')
After making the above changes, if students.wesleyseminary.edu is to be a virtual alias domain and if the file /var/lib/mailman/data/virtual-mailman already exists with entries like
allstudents@students.wesleyseminary.edu allstudents etc.
You should be OK. If not you may need to run Mailman's
bin/withlist -r -r fix_url allstudents
followed by Mailman's
bin/genaliases
to create the virtual-mailman file.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
OK, I tried much of the suggestions given before and I made progress!
When I actually send a message to the list I get this:
Oct 4 20:49:04 WTS-ZIMBRA postfix/virtual[9636]: 25656321552: to=< allstudents@wts-zimbra.wesleysem.edu>, orig_to=< allstudents@students.wesleyseminary.edu>, relay=virtual, delay=406, delays=0.36/405/0/0.12, dsn=4.2.0, status=deferred (delivery failed to mailbox //"|/usr/lib64/mailman/mail/mailman post allstudents": unable to create lock file //"|/usr/lib64/mailman/mail/mailman post allstudents".lock: No such file or directory) Oct 4 20:49:09 WTS-ZIMBRA postfix/virtual[9635]: 0635D321524: to=< allstudents@wts-zimbra.wesleysem.edu>, orig_to=< allstudents@students.wesleyseminary.edu>, relay=virtual, delay=566, delays=72/489/0/5, dsn=4.2.0, status=deferred (delivery failed to mailbox //"|/usr/lib64/mailman/mail/mailman post allstudents": unable to create lock file //"|/usr/lib64/mailman/mail/mailman post allstudents".lock: No such file or directory)
Notice that instead of piping to the mailman service I get this "unable to create lockfile" problem.
Shouldn't postfix actually pipe to the program mailman?
Anyone seen that before?
Thanks.
Regards, Christopher Koeber
On Wed, Sep 29, 2010 at 9:36 PM, Mark Sapiro <mark@msapiro.net> wrote:
[...]
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Koeber wrote:
The basic issue is you are delivering via relay=virtual rather than relay=local. Only the local LDA knows how to pipe to a command. The virtual LDA is trying to deliver to the mailbox named "|/usr/lib64/mailman/mail/mailman post allstudents" which clearly doesn't work.
I think the problem is students.wesleyseminary.edu is a virtual_mailbox_domain whereas it needs to be a virtual_alias_domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
See below.
[Christopher Kurtis Koeber]
Thanks. The problem is that using the virtual transport was the only way I could get the OpenLDAP setup I had to work with postfix. Is there a way to conditionally use transports? Say, if one email address is found via a rule to use a local transport versus the virtual one?
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
Also, in additional to my question on whether the transport can be rules based I am wondering if it is possible to switch everything to the local transport but still support virtual domains.
This is necessary for my setup.
Thank you for your time.
Regards,
Christopher Koeber On Oct 5, 2010 1:43 AM, "Christopher Kurtis Koeber" <ckoeber@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Koeber wrote:
You can support virtual domains with the local transport, but in general, they need to be virtual_alias_domains, not virtual_mailbox_domains. Whether that works in your case depends on your exact configuration/requirements and is probably beyond the scope of this list.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
Christopher Kurtis Koeber wrote:
That's what transport_maps is for. See the FAQ at <http://wiki.list.org/x/ZoCj> for a way to automate this for Mailman lists.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
On Tue, Oct 5, 2010 at 10:38 AM, Mark Sapiro <mark@msapiro.net> wrote:
Thanks so much. I didn't see this in the link but will I need to switch the "local transport" piece in Postfix to local?
I am guessing not, as that is what transport_maps is doing for me, right?
Regards, Christopher Koeber
--
Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/8381104a4d879780b22b7a0c595641c2.jpg?s=120&d=mm&r=g)
On Mon, 4 Oct 2010, Mark Sapiro wrote:
I think the problem is students.wesleyseminary.edu is a virtual_mailbox_domain whereas it needs to be a virtual_alias_domain.
Maybe I'm missing something, but I've never had trouble using virtual mailbox domains to host Mailman lists. In fact, I'm not sure that I've ever done anything else.
Geoff.
![](https://secure.gravatar.com/avatar/8ede2b75936966e8012e9c53f5204c59.jpg?s=120&d=mm&r=g)
On Wed, Oct 6, 2010 at 2:45 PM, Geoff Shang <geoff@quitelikely.com> wrote:
I tried it and it never gets to the local pipes for the mailman processes. Essentially Postfix still believes that anything going to the mailman system is going to the setups for virtual_mailbox_domain.
So you end up needing to do a transport map, which is what I am experimenting with.
participants (4)
-
Christopher Koeber
-
Christopher Kurtis Koeber
-
Geoff Shang
-
Mark Sapiro