[Mailman-Users] mailman postfix ldap virtual user

Gökhan Alkan cigalkan at gmail.com
Sun Dec 9 21:32:03 CET 2012


At first thanks for the quick reply.

I see why mailman send mail to "|/usr/lib/mailman/mail/mailman post
test at example.com".

Imagine that two domains named example.com and example.org are hosted by
the postfix and i want to create email list named test at example.com.

# postconf -n

alias_maps = hash:/etc/mail/aliases,hash:/usr/local/mailman/data/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_size_limit = 1024000000
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 33554432
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8, 192.168.1.0/24
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
recipient_delimiter = +
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = Email Server
smtpd_client_restrictions = permit_mynetworks, reject
smtpd_delay_reject = yes
smtpd_helo_required = no
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/postfix/ssl/certs/ca-bundle.crt
smtpd_tls_CApath = /etc/postfix/ssl/certs/
smtpd_tls_cert_file = /etc/postfix/ssl/certs/server.cer
smtpd_tls_key_file = /etc/postfix/ssl/private/server.key
smtpd_use_tls = yes
syslog_facility = local5
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/usr/local/mailman/data/virtual-mailman
virtual_gid_maps = static:501
virtual_mailbox_base = /home/
virtual_mailbox_domains = $mydomain, example.org
virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
virtual_transport = dovecot
virtual_uid_maps = static:502

-- /usr/local/mailman/data/virtual-mailman file content is below. I'm not
sure what it should be

test at example.com        test


-- Mailman mm_cfg.py is below

MTA = 'Postfix'

DEFAULT_EMAIL_HOST = 'example.com'
DEFAULT_URL_HOST = 'mail.example.com'

VIRTUAL_HOSTS.clear()
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com', 'example.org']

-- /usr/local/mailman/data/aliases file content is below

## test mailing list
test:              "|/usr/lib/mailman/mail/mailman post test"
test-admin:        "|/usr/lib/mailman/mail/mailman admin test"
test-bounces:      "|/usr/lib/mailman/mail/mailman bounces test"
test-confirm:      "|/usr/lib/mailman/mail/mailman confirm test"
test-join:         "|/usr/lib/mailman/mail/mailman join test"
test-leave:        "|/usr/lib/mailman/mail/mailman leave test"
test-owner:        "|/usr/lib/mailman/mail/mailman owner test"
test-request:      "|/usr/lib/mailman/mail/mailman request test"
test-subscribe:    "|/usr/lib/mailman/mail/mailman subscribe test"
test-unsubscribe:  "|/usr/lib/mailman/mail/mailman unsubscribe test"


I think configurations parameters for postfix and mailman are true
but /usr/local/mailman/data/virtual-mailman content is wrong or anything
else. But i dont know what it should be.

Best regards






On Sun, Dec 9, 2012 at 7:27 PM, Mark Sapiro <mark at msapiro.net> wrote:

> On 12/9/2012 3:14 AM, Gökhan Alkan wrote:
> >
> > I have searched the list archives but i can't send email to the any mail
> > list which handled by mailman. User backend is ldap and there is no local
> > user on the server and there are 4 virtual domains. Postfix
> > main.cfconfiguration is below and also hostname ise
> > mail.example.com.
> >
> > # vi /etc/postfix/main.cf
> > ...
> > ...
> > mydestination = $myhostname, localhost.$mydomain, localhost
> > mydomain = example.com
> > myhostname = mail.example.com
> >
> > virtual_alias_maps = hash:/etc/mail/aliases,
> > hash:/usr/local/mailman/data/aliases
> > virtual_gid_maps = static:501
> > virtual_mailbox_base = /home/
> > virtual_mailbox_domains = example.com, example.org
> > virtual_mailbox_maps = ldap:/etc/postfix/ldap-users.cf
> > virtual_transport = dovecot
> > ...
> > ...
>
>
> The output from 'postconf -n' is generally much more useful than
> something like the above, however, the above
>
> virtual_alias_maps = hash:/etc/mail/aliases,
>   hash:/usr/local/mailman/data/aliases
>
> is wrong. /usr/local/mailman/data/aliases is an alias mapping, not a
> virtual_alias mapping. It maps addresses to a pipe which only works with
> Postfix's local delivery module.
>
>
> > Mailman mm_cfg.py is below
> >
> > MTA = 'Postfix'
> >
> > DEFAULT_EMAIL_HOST = 'example.com'
> > DEFAULT_URL_HOST = 'mail.example.com'
> >
> > VIRTUAL_HOSTS.clear()
> > add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
> >
> > POSTFIX_STYLE_VIRTUAL_DOMAINS = ['example.com']
>
>
> The above is good, but you should have something like
>
> alias_maps = hash:/etc/mail/aliases,
>   hash:/usr/local/mailman/data/aliases
>
> and
>
> virtual_alias_maps = hash:/usr/local/mailman/data/virtual-mailman
>
> in main.cf. See <http://www.list.org/mailman-install/postfix-virtual.html
> >.
>
>
> > But when i send to the test at example.com mail list adresses , postfix
> > returns to me  "unknown user"  and when i look at the postfix log deeper,
> > it seems
> >
> > # tail -f /var/log/postfix.log
> > ...
> > status=bounced (unknown user: "|/usr/lib/mailman/mail/mailman post
> > test at example.com")
> > ...
>
>
> Because the mapping in /usr/local/mailman/data/aliases when applied as a
> virtual_alias mapping says map the virtual address test at example.com to
> the local user "|/usr/lib/mailman/mail/mailman post test at example.com"
> because virtual_alias_maps doesn't understand pipes.
>
> --
> Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan
>
>


-- 
Gökhan ALKAN
------------------------------------------
http://www.linuxakademi.org/
http://www.agguvenligi.net/


More information about the Mailman-Users mailing list