[Mailman-Users] mailman postfix ldap virtual user

Mark Sapiro mark at msapiro.net
Sun Dec 9 18:27:58 CET 2012


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



More information about the Mailman-Users mailing list