[Mailman-Users] {Disarmed} Re: mailman postfix ldap virtual user

Gökhan Alkan cigalkan at gmail.com
Mon Dec 10 08:03:01 CET 2012


hostname is mail.example.com

-- main.cf

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
relay_domains = $mydestination
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
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
unknown_local_recipient_reject_code = 550

alias_maps = hash:/etc/mail/aliases, hash:/usr/local/mailman/data/aliases
alias_database = hash:/etc/mail/aliases,
hash:/usr/local/mailman/data/aliases

virtual_alias_maps = hash:/usr/local/mailman/data/virtual-mailman
recipient_delimiter = +

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

-- master.cf

smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
-o smtp_fallback_relay=
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
dovecot   unix  -       n       n       -       -       pipe
flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -d ${user}


-- /usr/local/mailman/data/aliases

test at example.com test
test-admin at example.com    test-admin
test-bounces at example.com    test-bounces
test-confirm at example.com    test-confirm
test-join at example.com    test-join
test-leave at example.com    test-leave
test-owner at example.com    test-owner
test-request at example.com    test-request
test-subscribe at example.com    test-subscribe
test-unsubscribe at example.com    test-unsubscribe



-- /usr/local/mailman/data/virtual-mailman

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"
-- /usr/lib/mailman/Mailman/mm_cfg.py

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']

DEFAULT_URL_PATTERN = 'http://%s/'
PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/archives/%(listname)s'

But when i sent to email to the test at example.com, postfix returns "unkonown
user"

...
Dec 10 08:33:51 mail postfix/pipe[19870]: 9BD343FEC3: to=<test at example.com>,
relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=5.1.1, status=bounced
(user unknown)
...


Why postfix doesn't use alias_maps when virtual_alias_maps directive is
used ? I dont exactly what the problem is.

Best regards


More information about the Mailman-Users mailing list