mailman postfix ldap virtual user

Hi all
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 ... ...
Mailman mm_cfg.py is below
# vi /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']
DEFAULT_URL_PATTERN = 'http://%s/' PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/archives/%(listname)s'
But when i send to the test@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@example.com") ...
Best Regards

On 12/9/2012 3:14 AM, Gökhan Alkan wrote:
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.
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>.
Because the mapping in /usr/local/mailman/data/aliases when applied as a virtual_alias mapping says map the virtual address test@example.com to the local user "|/usr/lib/mailman/mail/mailman post test@example.com" because virtual_alias_maps doesn't understand pipes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

At first thanks for the quick reply.
I see why mailman send mail to "|/usr/lib/mailman/mail/mailman post test@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@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@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@msapiro.net> wrote:
-- Gökhan ALKAN

On 12/9/2012 12:32 PM, Gökhan Alkan wrote:
Imagine that two domains named example.com and example.org are hosted by the postfix and i want to create email list named test@example.com.
That's fine as long as list names are globally unique. I.e., you can't have two different lists named 'test' even if they are in different domains.
That's right. It should map the virtual domain address test@example.com to the local address 'test' which is then aliased to "|/usr/lib/mailman/mail/mailman post test".
There should also be 9 more entries like
test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@example.com test-unsubscribe
You also want
add_virtualhost('web.domain.for.example.org', 'example.org')
web.domain.for.example.org must be different from mail.example.com
OK
Why do you think it's wrong? Do you have a problem with mail delivery to test@example.com? If so, what is the problem and what are the Postfix log messages?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi
Now /usr/local/mailman/data/virtual-mailman file content is below.
test@example.com test test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@example.com test-unsubscribe
But when i want to send email to test@example.com, postfix returns "tatus=bounced (unknown user: "test@example.com")"
Actually, i expect postfix to send mail to mailman because of the " test: "|/usr/lib/mailman/mail/mailman post test" " line in the /usr/local/mailman/data/aliases file . And also main.cf file contains the line "alias_maps = hash:/etc/mail/aliases,hash:/usr/local/mailman/data/aliases". But it doesnt run and returns "unknwon user".
Best regards
On Sun, Dec 9, 2012 at 11:00 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Gökhan ALKAN

On 12/9/2012 1:12 PM, Gökhan Alkan wrote:
But when i want to send email to test@example.com, postfix returns "tatus=bounced (unknown user: "test@example.com")"
What is the full log message?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Here is the postfix log .
Dec 10 08:33:51 mail postfix/cleanup[19869]: 9BD343FEC3: message-id=< c5fda5032ab9f35756783b6fd9095dd5@webmail.example.com> Dec 10 08:33:51 mail postfix/smtpd[19865]: disconnect from unknown[192.168.1.2] Dec 10 08:33:51 mail postfix/qmgr[19850]: 9BD343FEC3: from=< deneme@example.com>, size=1376, nrcpt=1 (queue active) Dec 10 08:33:51 mail postfix/pipe[19870]: 9BD343FEC3: to=<test@example.com>, relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=5.1.1, status=bounced (user unknown) Dec 10 08:33:51 mail postfix/cleanup[19869]: A533040B47: message-id=< 20121210063351.A533040B47@mail.example.com> Dec 10 08:33:51 mail postfix/bounce[19878]: 9BD343FEC3: sender non-delivery notification: A533040B47 Dec 10 08:33:51 mail postfix/qmgr[19850]: A533040B47: from=<>, size=3204, nrcpt=1 (queue active) Dec 10 08:33:51 mail postfix/qmgr[19850]: 9BD343FEC3: removed Dec 10 08:33:51 mail postfix/pipe[19870]: A533040B47: to=<deneme@example.com>, relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service) Dec 10 08:33:51 mail postfix/qmgr[19850]: A533040B47: removed
Best regards

Gökhan Alkan writes:
As a wild guess, I bet Postfix also wants to be informed about virtual users with a line like:
virtual_maps = hash:/usr/local/mailman/data/virtual-mailman
How is Postfix told to look in that file for virtual users? If you haven't configured that, I expect your problem and solution is somewhere in that neighborhood.
Warning: I'm a postfix user, but a very happy one -- I never have such problems. So I'm just guessing.<wink/>

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@example.com test test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@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@example.com, postfix returns "unkonown user"
... Dec 10 08:33:51 mail postfix/pipe[19870]: 9BD343FEC3: to=<test@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

Hi
Actually, there is no configuration for mailman in dovecot.conf. But how can dovecot handle mailman alias?
Best regards
On Mon, Dec 10, 2012 at 10:54 AM, Stephen J. Turnbull <stephen@xemacs.org>wrote:
-- Gökhan ALKAN

Hi
I uncomment the dovecot line in master.cf and virtual_transport = dovecot. But it doesn't work, Why postfix doesn't handle alias_maps when the email is delivered to virtual domains ?
Best regards
On Mon, Dec 10, 2012 at 11:00 AM, Gökhan Alkan <cigalkan@gmail.com> wrote:
-- Gökhan ALKAN

On Mon, 10 Dec 2012, Gökhan Alkan wrote:
Do you have your domain in either virtual_alias_domains or virtual_mailbox_domains, or mentioned in a file/resource pointed at by either virtual_alias_maps or virtual_mailbox_maps?
If Postfix doesn't think your domain is virtual, it won't look in virtual_alias_maps for the address.
The config you recently posted seemed a bit mixed up, with hosts/domains mentioned in multiple configuration variables. As a general rule, a domain should only be mentioned once in any of mydestinations (locally-deliverable mail), virtual_*_domains (other hosted domains that are not local) and relay_domains (domains you relay somewhere else).
I think that perhaps you don't have a clear understanding of Postfix address classes and what each is used for. I recommend reading http://www.postfix.org/ADDRESS_CLASS_README.html
If your Mailman domain has no mailboxes, you can put it in either virtual_alias_domains or in a virtual_alias_maps file. If you want mailboxes too, use the virtual_mailbox_* equivalents (I use this for everything personally).
HTH, Geoff.

On 12/9/2012 11:03 PM, Gökhan Alkan wrote: [...]
virtual_transport = dovecot
You have defined the virtual_transport to be dovecot. Dovecot doesn't recognize alias_maps. To use alias_maps you have to deliver via the 'local' transport.
If you are using dovecot as your LDA for some purpose, then the best option is to have a dedicated domain for Mailman lists and use transport_maps to specify 'local' as the transport for that domain.
If you don't need the dovecot LDA, just remove
virtual_transport = dovecot
If you need the dovecot LDA for non-list addresses in the list's domain(s), you can use the ideas in the FAQ at <http://wiki.list.org/x/ZoCj> to automatically generate transport mappings to 'local' for just the list addresses.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 12/9/2012 3:14 AM, Gökhan Alkan wrote:
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.
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>.
Because the mapping in /usr/local/mailman/data/aliases when applied as a virtual_alias mapping says map the virtual address test@example.com to the local user "|/usr/lib/mailman/mail/mailman post test@example.com" because virtual_alias_maps doesn't understand pipes.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

At first thanks for the quick reply.
I see why mailman send mail to "|/usr/lib/mailman/mail/mailman post test@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@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@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@msapiro.net> wrote:
-- Gökhan ALKAN

On 12/9/2012 12:32 PM, Gökhan Alkan wrote:
Imagine that two domains named example.com and example.org are hosted by the postfix and i want to create email list named test@example.com.
That's fine as long as list names are globally unique. I.e., you can't have two different lists named 'test' even if they are in different domains.
That's right. It should map the virtual domain address test@example.com to the local address 'test' which is then aliased to "|/usr/lib/mailman/mail/mailman post test".
There should also be 9 more entries like
test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@example.com test-unsubscribe
You also want
add_virtualhost('web.domain.for.example.org', 'example.org')
web.domain.for.example.org must be different from mail.example.com
OK
Why do you think it's wrong? Do you have a problem with mail delivery to test@example.com? If so, what is the problem and what are the Postfix log messages?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Hi
Now /usr/local/mailman/data/virtual-mailman file content is below.
test@example.com test test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@example.com test-unsubscribe
But when i want to send email to test@example.com, postfix returns "tatus=bounced (unknown user: "test@example.com")"
Actually, i expect postfix to send mail to mailman because of the " test: "|/usr/lib/mailman/mail/mailman post test" " line in the /usr/local/mailman/data/aliases file . And also main.cf file contains the line "alias_maps = hash:/etc/mail/aliases,hash:/usr/local/mailman/data/aliases". But it doesnt run and returns "unknwon user".
Best regards
On Sun, Dec 9, 2012 at 11:00 PM, Mark Sapiro <mark@msapiro.net> wrote:
-- Gökhan ALKAN

On 12/9/2012 1:12 PM, Gökhan Alkan wrote:
But when i want to send email to test@example.com, postfix returns "tatus=bounced (unknown user: "test@example.com")"
What is the full log message?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Here is the postfix log .
Dec 10 08:33:51 mail postfix/cleanup[19869]: 9BD343FEC3: message-id=< c5fda5032ab9f35756783b6fd9095dd5@webmail.example.com> Dec 10 08:33:51 mail postfix/smtpd[19865]: disconnect from unknown[192.168.1.2] Dec 10 08:33:51 mail postfix/qmgr[19850]: 9BD343FEC3: from=< deneme@example.com>, size=1376, nrcpt=1 (queue active) Dec 10 08:33:51 mail postfix/pipe[19870]: 9BD343FEC3: to=<test@example.com>, relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=5.1.1, status=bounced (user unknown) Dec 10 08:33:51 mail postfix/cleanup[19869]: A533040B47: message-id=< 20121210063351.A533040B47@mail.example.com> Dec 10 08:33:51 mail postfix/bounce[19878]: 9BD343FEC3: sender non-delivery notification: A533040B47 Dec 10 08:33:51 mail postfix/qmgr[19850]: A533040B47: from=<>, size=3204, nrcpt=1 (queue active) Dec 10 08:33:51 mail postfix/qmgr[19850]: 9BD343FEC3: removed Dec 10 08:33:51 mail postfix/pipe[19870]: A533040B47: to=<deneme@example.com>, relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=2.0.0, status=sent (delivered via dovecot service) Dec 10 08:33:51 mail postfix/qmgr[19850]: A533040B47: removed
Best regards

Gökhan Alkan writes:
As a wild guess, I bet Postfix also wants to be informed about virtual users with a line like:
virtual_maps = hash:/usr/local/mailman/data/virtual-mailman
How is Postfix told to look in that file for virtual users? If you haven't configured that, I expect your problem and solution is somewhere in that neighborhood.
Warning: I'm a postfix user, but a very happy one -- I never have such problems. So I'm just guessing.<wink/>

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@example.com test test-admin@example.com test-admin test-bounces@example.com test-bounces test-confirm@example.com test-confirm test-join@example.com test-join test-leave@example.com test-leave test-owner@example.com test-owner test-request@example.com test-request test-subscribe@example.com test-subscribe test-unsubscribe@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@example.com, postfix returns "unkonown user"
... Dec 10 08:33:51 mail postfix/pipe[19870]: 9BD343FEC3: to=<test@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

Hi
Actually, there is no configuration for mailman in dovecot.conf. But how can dovecot handle mailman alias?
Best regards
On Mon, Dec 10, 2012 at 10:54 AM, Stephen J. Turnbull <stephen@xemacs.org>wrote:
-- Gökhan ALKAN

Hi
I uncomment the dovecot line in master.cf and virtual_transport = dovecot. But it doesn't work, Why postfix doesn't handle alias_maps when the email is delivered to virtual domains ?
Best regards
On Mon, Dec 10, 2012 at 11:00 AM, Gökhan Alkan <cigalkan@gmail.com> wrote:
-- Gökhan ALKAN

On Mon, 10 Dec 2012, Gökhan Alkan wrote:
Do you have your domain in either virtual_alias_domains or virtual_mailbox_domains, or mentioned in a file/resource pointed at by either virtual_alias_maps or virtual_mailbox_maps?
If Postfix doesn't think your domain is virtual, it won't look in virtual_alias_maps for the address.
The config you recently posted seemed a bit mixed up, with hosts/domains mentioned in multiple configuration variables. As a general rule, a domain should only be mentioned once in any of mydestinations (locally-deliverable mail), virtual_*_domains (other hosted domains that are not local) and relay_domains (domains you relay somewhere else).
I think that perhaps you don't have a clear understanding of Postfix address classes and what each is used for. I recommend reading http://www.postfix.org/ADDRESS_CLASS_README.html
If your Mailman domain has no mailboxes, you can put it in either virtual_alias_domains or in a virtual_alias_maps file. If you want mailboxes too, use the virtual_mailbox_* equivalents (I use this for everything personally).
HTH, Geoff.

On 12/9/2012 11:03 PM, Gökhan Alkan wrote: [...]
virtual_transport = dovecot
You have defined the virtual_transport to be dovecot. Dovecot doesn't recognize alias_maps. To use alias_maps you have to deliver via the 'local' transport.
If you are using dovecot as your LDA for some purpose, then the best option is to have a dedicated domain for Mailman lists and use transport_maps to specify 'local' as the transport for that domain.
If you don't need the dovecot LDA, just remove
virtual_transport = dovecot
If you need the dovecot LDA for non-list addresses in the list's domain(s), you can use the ideas in the FAQ at <http://wiki.list.org/x/ZoCj> to automatically generate transport mappings to 'local' for just the list addresses.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Geoff Shang
-
Gökhan Alkan
-
Mark Sapiro
-
Stephen J. Turnbull