Magnus Bäck wrote:
Set up an alias on the following form:
[EMAIL PROTECTED] [EMAIL PROTECTED],[EMAIL PROTECTED]
In your LDAP map configuration this could translate to something like:
query_filter = mail=%s
result_attribute = mail, mailForwardingAddress
Does that go in $alias_maps or $virtual_alias_maps?
I have three ldap maps working:
ldap-localonly.cf
ldap-forwardonly.cf
ldap-forwardkeep.cf
When I query them with postmap -q [EMAIL PROTECTED], I get the right thing:
if the user is set up just to get their local mail, I get:
[EMAIL PROTECTED] as a result from ldap-localonly.cf and nothing from the
other
if they are set to forward their mail and keep it locally, I get:
[EMAIL PROTECTED],[EMAIL PROTECTED]
if they are set to just forward and not keep it, I get: [EMAIL PROTECTED]
however, it's not forwarding, it's just doing local delivery
[EMAIL PROTECTED] postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases,
proxy:ldap:/etc/postfix/ldap-forwardonly.cf,
proxy:ldap:/etc/postfix/ldap-forwardkeep.cf,
proxy:ldap:/etc/postfix/ldap-localonly.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 1
default_destination_concurrency_limit = 50
default_process_limit = 500
home_mailbox =
html_directory = no
inet_interfaces = all
local_recipient_maps = $alias_maps
mail_owner = postfix
mail_spool_directory = /export/maildirs/
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
depot.bwh.harvard.edu, maildrop.bwh.harvard.edu, bwh.harvard.edu,
spl.harvard.edu
mynetworks = 134.174.8.0/24, 134.174.9.0/24, 134.174.54.0/24,
170.223.221.0/24, 155.52.0.0/16
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_connection_count_limit = 500
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks, reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_tls_CAfile = /etc/pki/smtp.bwh.harvard.edu.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/smtp.bwh.harvard.edu.pem
smtpd_tls_key_file = /etc/pki/smtp.bwh.harvard.edu.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550