|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
handling program delivery with LDAP maps
From: Andrea Rota (silver.wolf+postfix-users+AT+postfix.org
heimat.it)
Date: Sun Nov 02 2003 - 17:04:48 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I've been using Postfix with LDAP maps for some time, with LDAP lookups
for virtual tables and maildir delivery to virtual users (all sharing a
single uid and gid).
Now I'm dealing with quite a different setup: users are still defined in
an LDAP database, but they are also system users (via nss_ldap and
pam_ldap), so I added another Postfix map (virtual_uid_maps) to the
setup; what I still can't work out is a way to deliver mail to programs
(for mailing lists management, autoreply etc.).
I'm using system users (although defined in an LDAP database) because I
would like to have fs-enforced quotas on maildirs.
Below you can find my postconf -n and the LDAP maps definitions; here's
what I would like to achieve:
- receive mail for several domains
- be able to handle several email aliases for each user (possibly with
different domain parts: e.g. user1
domain1.com, user2
domainX.com should
go to a single maildir)
- be able to forward email to several other email addresses
- be able to forward email to other addresses without delivering to
local mailbox (qmail-ldap's forwardonly behaviour)
- email aliases and forward addresses must also be stored in the LDAP
database
- have Postfix deliver mail to programs (e.g. mailing list managers and
so on), with program name and options (the .forward "|/bin/something
blah blah blah" part) stored in an LDAP field (e.g. deliveryProgramPath)
With the current setup I can do all of this, except for the last item: I
can't figure how to "escape" from the virtual delivery agent, which of
course cannot deliver to programs as stated in the man page.
Actually, I also did not succeed in emulating the "forwardonly"
behaviour: when mail is forwarded (either to local or remote email
addresses), it also gets delivered to the local user whose LDAP record
has the mailAlternateAddresses defined.
TIA
Regards,
Andrea Rota
postconf -n + LDAP maps definitions (Postfix 1.1.11 on Debian 3.0)
alias_database = hash:/etc/aliases
append_at_myorigin = yes
append_dot_mydomain = no
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
mailbox_command =
mailbox_size_limit = 0
mailbox_transport = virtual
mydestination = $myhostname, localhost.$mydomain, $mydomain,
/etc/postfix/locals
myhostname = mail.intranet.glock.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
program_directory = /usr/lib/postfix
recipient_delimiter = +
relayhost =
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
virtual_gid_maps = static:8
virtual_mailbox_base = /
virtual_mailbox_maps = ldap:addr2maildir
virtual_maps = ldap:addr2addrs
virtual_minimum_uid = 1000
virtual_uid_maps = ldap:ldapuid
addr2maildir_server_host = 127.0.0.1
addr2maildir_server_port = 389
addr2maildir_search_base = ou=users,dc=glock,dc=com
addr2maildir_timeout = 10
addr2maildir_query_filter = (|(mail=%s)(mailAlternateAddress=%s))
addr2maildir_result_attribute = homeDirectory
addr2maildir_bind = no
addr2addrs_server_host = 127.0.0.1
addr2addrs_server_port = 389
addr2addrs_search_base = ou=users,dc=glock,dc=com
addr2addrs_timeout = 10
addr2addrs_query_filter = (|(mail=%s)(mailAlternateAddress=%s))
addr2addrs_result_attribute = mail, mailForwardingAddress
addr2addrs_bind = no
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]