Supondo que você esteja tentando direcionar e-mails para uma lista de carteiros, aqui estão algumas peças que você pode encaixar no quebra-cabeça. Primeiro, alguns LDAP:
# mailroute, system, mydomain.net
dn: ou=mailroute,ou=system,dc=mydomain,dc=net
objectClass: top
objectClass: organizationalUnit
ou: mailroute
# forward0, mailroute, system, mydomain.net
dn: cn=forward0,ou=mailroute,ou=system,dc=mydomain,dc=net
objectClass: top
objectClass: MailForwardOnly
cn: forward0
MailAlternateAddress: [email protected]
MailAlternateAddress: [email protected]
MailAlternateAddress: [email protected]
MailForwardingAddress: [email protected]
displayName: RFC emails to system administrator
Em seguida, algumas configurações do Postfix:
/etc/postfix/main.cf:
relay_domains = lists.mydomain.net
virtual_mailbox_domains = mydomain.net
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap/virtual_mailbox_maps.cf
/etc/postfix/transport:
lists.mydomain.net mailman:
/etc/postfix/ldap/virtual_mailbox_maps.cf:
version = 3
server_host = ldaps://a.mydomain.net:636
search_base = ou=people,dc=mydomain,dc=net
query_filter = (&(objectClass=*)(mail=%s))
result_attribute = uid
bind = yes
bind_dn = cn=postfix,ou=applications,ou=system,dc=mydomain,dc=net
bind_pw = czczczcz