Index: trunk/INSTALL/debian/squeeze/etc/postfix/main.cf
===================================================================
--- trunk/INSTALL/debian/squeeze/etc/postfix/main.cf	(revision 5871)
+++ trunk/INSTALL/debian/squeeze/etc/postfix/main.cf	(revision 5883)
@@ -1,3 +1,3 @@
-## Altere todos os expresso.pr.gov.br para seu dominio
+# Configuracoes para o Expresso
 myorigin = DOMAIN
 myhostname = DOMAIN
@@ -7,31 +7,29 @@
 append_dot_mydomain = no
 
-unknown_local_recipient_reject_code = 450 
-recipient_delimiter = + 
-smtpd_banner = SMTP
-mynetworks = 127.0.0.1/32
-
 # A lista de dominios que esta maquina considera seu destino final.
 mydestination = $myhostname, localhost.$mydomain, DOMAIN
 
+recipient_delimiter = + 
+smtpd_banner = $myhostname ESMTP Expresso Livre - (GNU/Linux)
+mynetworks = 127.0.0.1/32
+
 inet_interfaces = all
 disable_dns_lookups = no 
-mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
-#transport_maps = hash:/etc/postfix/transport
-
-
+# Faz a entrega dos e-mails para o cyrus
+transport_maps = hash:/etc/postfix/transport
+#mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp
 
 #smtpd_use_tls = no 
-alias_maps = 
+alias_maps = hash:/etc/aliases
+alias_database = hash:/etc/aliases
 
 virtual_alias_maps = ldap:aliases, ldap:mailboxes, ldap:grupos, ldap:listas, ldap:cxinstitucionais, ldap:cxcompartilhadas
 
-#SCL - Sender Control List
-smtpd_recipient_restrictions = check_recipient_access ldap:cra_maillists, reject_unauth_destination
-smtpd_restriction_classes = mailListRestriction
-mailListRestriction = check_sender_access ldap:csa_maillists, reject
+# Para facilitar a configuracao
+ldaphost = 127.0.0.1
+ldapbase = LDAP_DN
 
 #Caixas Postais
-mailboxes_server_host = 127.0.0.1
+mailboxes_server_host = $ldaphost
         # host do servidor LDAP.
 mailboxes_version = 3
@@ -41,5 +39,5 @@
 mailboxes_chase_referral = 0
 	# seguir referral? (false = 0 = nao)
-mailboxes_search_base = LDAP_DN
+mailboxes_search_base = $ldapbase
         #Base do servidor LDAP.
 mailboxes_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=posixAccount)(phpgwAccountType=u)(accountStatus=active))
@@ -53,9 +51,9 @@
 									
 #Aliases
-aliases_server_host = 127.0.0.1
+aliases_server_host = $ldaphost
 aliases_version = 3
 aliases_timeout = 10
 aliases_chase_referral = 0
-aliases_search_base = LDAP_DN
+aliases_search_base = $ldapbase
 aliases_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=posixAccount)(phpgwAccountType=u)(deliveryMode=forwardOnly)(accountStatus=active))
 aliases_domain = hash:/etc/postfix/expresso-dominios
@@ -63,9 +61,9 @@
 
 #Listas
-listas_server_host = 127.0.0.1
+listas_server_host = $ldaphost
 listas_version = 3
 listas_timeout = 10
 listas_chase_referral = 0
-listas_search_base = LDAP_DN
+listas_search_base = $ldapbase
 listas_query_filter = (&(mail=%s)(phpgwAccountType=l)(objectClass=posixAccount)(deliveryMode=forwardOnly)(accountStatus=active))
 listas_domain = hash:/etc/postfix/expresso-dominios
@@ -73,9 +71,9 @@
 
 #Grupos
-grupos_server_host = 127.0.0.1
+grupos_server_host = $ldaphost
 grupos_version = 3
 grupos_timeout = 10
 grupos_chase_referral = 0
-grupos_search_base = LDAP_DN
+grupos_search_base = $ldapbase
 grupos_query_filter = (&(cn=%u)(objectClass=posixGroup)(phpgwAccountType=g))
 grupos_bind = no
@@ -84,9 +82,9 @@
 
 #Contas institucionais
-cxinstitucionais_server_host = 127.0.0.1
+cxinstitucionais_server_host = $ldaphost
 cxinstitucionais_version = 3
 cxinstitucionais_timeout = 10
 cxinstitucionais_chase_referral = 0
-cxinstitucionais_search_base = LDAP_DN
+cxinstitucionais_search_base = $ldapbase
 cxinstitucionais_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=phpgwAccount)(phpgwAccountType=i)(accountStatus=active))
 cxinstitucionais_domain = hash:/etc/postfix/expresso-dominios
@@ -94,9 +92,9 @@
 
 #Contas compartilhadas
-cxcompartilhadas_server_host = 127.0.0.1
+cxcompartilhadas_server_host = $ldaphost
 cxcompartilhadas_version = 3
 cxcompartilhadas_timeout = 10
 cxcompartilhadas_chase_referral = 0
-cxcompartilhadas_search_base = LDAP_DN
+cxcompartilhadas_search_base = $ldapbase
 cxcompartilhadas_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(objectClass=phpgwAccount)(phpgwAccountType=s)(accountStatus=active))
 cxcompartilhadas_domain = hash:/etc/postfix/expresso-dominios
@@ -104,9 +102,9 @@
 
 # SCL ## cra_maillists (check_recipient_access_maillists)
-cra_maillists_server_host = 127.0.0.1
+cra_maillists_server_host = $ldaphost
 cra_maillists_version = 3
 cra_maillists_timeout = 10
 cra_maillists_chase_referral = 0
-cra_maillists_search_base = LDAP_DN
+cra_maillists_search_base = $ldapbase
 cra_maillists_query_filter = (&(mail=%s)(phpgwAccountType=l)(accountRestrictive=mailListRestriction))
 cra_maillists_result_attribute = accountRestrictive
@@ -115,17 +113,17 @@
 
 # SCL ## csa_maillists (check_sender_access_maillists)
-csa_maillists_server_host = 127.0.0.1
+csa_maillists_server_host = $ldaphost
 csa_maillists_version = 3
 csa_maillists_timeout = 10
 csa_maillists_chase_referral = 0
-csa_maillists_search_base = LDAP_DN
+csa_maillists_search_base = $ldapbase
 csa_maillists_query_filter = (|(&(mailSenderAddress=%s)(phpgwAccountType=l))(&(participantCanSendMail=TRUE)(mailForwardingAddress=%s)))
 csa_maillists_result_attribute = accountDeliveryMessage
 csa_maillists_domain = hash:/etc/postfix/expresso-dominios
 
-
 #####################################################################
 # CONTROLE DE FALHA DE ENTREGA.
 
+unknown_local_recipient_reject_code = 450 
 # O tempo entre as tentativas de entrega da fila.
 # The time between deferred queue scans by the queue manager.
@@ -151,4 +149,22 @@
 # Tamanho maximo para envio (20Mb)
 message_size_limit = 20971520
-# Tamanho maximo para recebimento (100Mb)
-mailbox_size_limit = 104857600
+
+# Controle de restricoes
+smtpd_recipient_restrictions = 
+	# Restringe acesso, a remententes nao autorizados, as listas do Expresso
+	check_recipient_access ldap:cra_maillists,
+	# o IP do remetente esta na lista de permitidos
+	permit_mynetworks,
+	permit_sasl_authenticated,
+	# Fecha o relay do servidor
+	reject_unauth_destination,
+	# o endereco do destinatario existe ou e alcancavel
+	reject_unverified_recipient,
+	permit
+
+#SCL - Sender Control List - Restricoes para envio nas listas
+smtpd_restriction_classes = mailListRestriction
+mailListRestriction = check_sender_access ldap:csa_maillists,
+			reject
+
+
