我需要在LDAP中符合特定条件的用户将其邮件redirect到子域中的同一电子邮件前缀。
例如,如果收到邮件到[email protected],ldap查找显示这个用户已经迁移到gmail,所以邮件需要被转发到[email protected]。
我会很感激任何人都可以提供的帮助。
非常感谢迈克迪克森
好吧,开始工作吧,我从一个错误的angular度接近了它。 这是获胜的configuration:
/etc/postfix/main.cf中
relay_domains = $mydestination, student.domain.ac.uk virtual_alias_maps = hash:/etc/postfix/virtual.map, ldap:/etc/postfix/vstudent.map
/etc/postfix/vstudent.map
# postmap /etc/postfix/vstudent.map server_host = ldap.domain.ac.uk server_port = 389 bind = no search_base = dc=domain,dc=ac,dc=uk query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(businessCategory=student)(eduPersonEntitlement=http://entitlement.domain.ac.uk/gmail)) result_filter = %[email protected] result_attribute = mail
我希望能帮助他人解决同样的问题。
感谢Mike Dixson