Ohhh por fin una soluci'on, socio yo soy windero, no uso mucho Linux dime los pasos de lo que hay que hacer y disculpa las molestias
Lic. Yordanis Mantilla Iglesias Esp. "B" en Ciencias Informáticas UEB DIVEP CIEGO DE ÁVILA ymanti...@divepcav.co.cu Jabber: ymanti...@divepcav.co.cu http://www.divepcav.co.cu (33) 214472 ó 213049 -----Mensaje original----- De: gutl-l-boun...@jovenclub.cu [mailto:gutl-l-boun...@jovenclub.cu] En nombre de Carlos R Laguna Enviado el: jueves, 11 de julio de 2013 2:16 PM Para: gutl-l@jovenclub.cu Asunto: Re: [Gutl-l] ZENTYAL COMO PONES LAS RESTRICCIONES A LOS CORREOS SOLUCION El 11/07/13 13:46, låzaro escribió: > mira que se pasa trabajo con el zentyal ese... > > > Thread name: "Re: [Gutl-l] ZENTYAL COMO PONES LAS RESTRICCIONES A LOS CORREOS?SOLUCION" > Mail number: 4 > Date: Thu, Jul 11, 2013 > In reply to: Yordanis Mantilla Iglesias >> Ok socio así es, como mismo explicas ojala encuentres una solución y >> nos puedas ayudar. >> >> Saludos >> >> Lic. Yordanis Mantilla Iglesias >> >> Esp. "B" en Ciencias Informáticas >> UEB DIVEP CIEGO DE ÁVILA >> >> ymanti...@divepcav.co.cu >> Jabber: ymanti...@divepcav.co.cu >> http://www.divepcav.co.cu >> (33) 214472 ó 213049 >> >> >> -----Mensaje original----- >> De: gutl-l-boun...@jovenclub.cu [mailto:gutl-l-boun...@jovenclub.cu] >> En nombre de Barceló Enviado el: jueves, 11 de julio de 2013 11:43 AM >> Para: Lista cubana de soporte técnico en Tecnologias Libres >> Asunto: Re: [Gutl-l] ZENTYAL COMO PONES LAS RESTRICCIONES A LOS >> CORREOS SOLUCION >> >> El 10/07/13 18:58, Yordanis Mantilla Iglesias escribió: >>> Saludos colega nuevamente yo con zentyal >>> >>> Miren me dieron esta solución: >>> >>> Primero que nada, debo especificar que uso Zentyal como servidor de >>> correo y directorio LDAP. En Zentyal cree el grupo CorreoInt al cual >>> pertenecen todos los usuarios que tienen acceso a la mensajería >>> internacional. Ahora, lo que necesitamos para que funcione el filtro >>> es lo >> siguiente: >>> Code: [Select] >>> # Main.cf >>> >>> # Grupos de Usuarios >>> internacional_server_host = 127.0.0.1 internacional_server_port = >>> 389 internacional_bind = no internacional_timeout = 5 >>> internacional_search_base = >>> ou=Groups,dc=exia,dc=ipichcb,dc=rimed,dc=cu >>> internacional_query_filter = (&(|(cn=CorreoInt))(memberUid=%u)) >>> internacional_result_attribute = cn >>> >>> ## Reglas >>> >>> # Verifico enviador >>> smtpd_sender_login_maps = ldap:ldapvirtualmap >>> >>> # Dominio de Reenvio >>> relay_domains = ipichcb.rimed.cu >>> >>> # Clases de Restricciones >>> smtpd_restriction_classes = CorreoInt, Internacional, >>> InternacionalSalida >>> >>> # Clases >>> CorreoInt = permit >>> >>> Internacional = >>> check_recipient_access ldap:internacional, >>> check_sender_access regexp:/etc/postfix/internacional.cf >>> >>> InternacionalSalida = >>> check_sender_access ldap:internacional, >>> check_recipient_access regexp:/etc/postfix/internacional.cf >>> >>> # Reglas >>> smtpd_helo_restrictions = >>> permit_mynetworks, >>> permit_sasl_authenticated, >>> reject_invalid_helo_hostname >>> >>> smtpd_sender_restrictions = >>> reject_non_fqdn_sender, >>> permit_mynetworks, >>> permit_sasl_authenticated, >>> check_relay_domains >>> >>> >>> smtpd_recipient_restrictions = >>> reject_non_fqdn_recipient, >>> check_sender_access regexp:/etc/postfix/acceso.cf, >>> permit_sasl_authenticated, >>> reject_unauth_destination, >>> reject_unlisted_recipient, >>> permit >>> >>> smtpd_data_restrictions = >>> reject_multi_recipient_bounce, >>> reject_unauth_pipelining >>> >>> Ahora, el fichero Internacional.cf >>> >>> Code: [Select] >>> # Internacional.cf >>> >>> /\@*\.cu/ permit >>> /\@*/ REJECT 554 Este usuario no tiene acceso a la mensajeria >>> internacional. >>> >>> Ahora, el fichero Acceso.cf >>> >>> Code: [Select] >>> # Acceso.cf >>> >>> /.*\@notice.org/ REJECT 554 Spam no permitido >>> /mercadolibrecu.*\@googlegroups.com/ REJECT 554 Servicios no >>> permitidos en la Red /faithb...@hotmail.com/ REJECT 554 Spam no >>> permitido /\@.*\.mailengine1.com/ REJECT 554 Servicios no >>> permitidos en la Red >>> /icess...@yahoo.com/ REJECT 554 Servicios no permitidos en la Red >>> /rom...@hotmail.com/ REJECT 554 Servicios no permitidos en la Red >>> /\@Camagueycuba.es/ REJECT 554 Servicios no permitidos en la Red >>> /camagueyc...@camagueycuba.es/ REJECT 554 Servicios no permitidos en la >>> Red >>> /\@habanadeleste.es/ REJECT 554 Servicios no permitidos en la Red >>> /\@mail.vresp.com/ REJECT 554 Servicios no permitidos en la Red >>> /\lionra...@yahoo.com/ REJECT 554 Spam no permitido >>> /\@ipichcb.rimed.cu/ InternacionalSalida >>> /\@*\.cu/ permit >>> /\@*/ Internacional >>> >>> >>> Des pues de pasarla para main.cf.ma me quedaría así: >>> >>> # Generated by Zentyal >>> # See /usr/share/postfix/main.cf.dist for a commented, more complete >>> version <%args> >>> $hostname >>> $mailname >>> $bindDN >>> $bindPW >>> >>> $vdomainDN >>> >>> $relay >>> $relayAuth >>> >>> $allowed >>> $maxmsgsize >>> $aliasDN >>> $vmaildir >>> $usersDN >>> $uidvmail >>> $gidvmail >>> >>> $ldap >>> $filter >>> $ipfilter >>> $portfilter >>> >>> $zarafa >>> >>> $bccMaps >>> >>> $greylist >>> $greylistAddr >>> $greylistPort >>> </%args> >>> <%init> >>> use EBox::Gettext; >>> >>> my $smtpRecipientRestrictions; >>> $smtpRecipientRestrictions .= 'permit_sasl_authenticated, '; >>> $smtpRecipientRestrictions .= 'permit_mynetworks, '; #at his point >>> all mail for whom the server isn't the final point or the #forwarder >>> has been rejected so the next restrictions only applies in this two >>> cases $smtpRecipientRestrictions .= 'reject_unauth_destination, '; >>> >>> $smtpRecipientRestrictions .= 'reject_non_fqdn_sender, '; >>> $smtpRecipientRestrictions .= 'reject_unknown_sender_domain, '; >>> >>> $smtpRecipientRestrictions .= 'reject_invalid_helo_hostname, '; >>> $smtpRecipientRestrictions .= 'reject_non_fqdn_helo_hostname, '; >>> $smtpRecipientRestrictions .= 'check_helo_access >>> pcre:/etc/postfix/helo_checks.pcre'; >>> if ($greylist) { >>> my $greylistRecipientRestriction = "check_policy_service inet:" . >>> $greylistAddr . ':' . >>> $greylistPort ; >>> $smtpRecipientRestrictions .= ", >>> $greylistRecipientRestriction"; } >>> >>> # submission is only for local domain users and objects with relay # >>> no need to greylist or to do more checks my >>> $submissionRecipientRestrictions = 'reject_non_fqdn_sender, >>> reject_non_fqdn_recipient, '; $submissionRecipientRestrictions .= >>> 'permit_sasl_authenticated, permit_mynetworks, reject'; >>> >>> my $certFile = '/etc/postfix/sasl/postfix.pem'; my $keyFile = >>> '/etc/postfix/sasl/postfix.pem'; >>> >>> my $ldapServer = 'localhost:' . $ldap->{port}; </%init> >>> >>> # require helo >>> smtpd_delay_reject = yes >>> smtpd_helo_required = yes >>> >>> strict_rfc821_envelopes = yes >>> disable_vrfy_command = yes >>> >>> smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no >>> >>> # appending .domain is the MUAs job. >>> append_dot_mydomain = no >>> >>> # Uncomment the next line to generate "delayed mail" warnings >>> #delay_warning_time = 4h >>> >>> myorigin = /etc/mailname >>> myhostname = <% $hostname %> >>> mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain >>> smtp_helo_name = <% $mailname %> >>> alias_maps = hash:/etc/aliases >>> >>> alias_database = hash:/etc/aliases >>> local_recipient_maps = proxy:unix:passwd.byname $alias_maps >>> >>> relayhost = <% $relay %> >>> >>> % if ($zarafa) { >>> transport_maps = hash:/etc/postfix/transport >>> zarafa_destination_recipient_limit = 1 % } >>> >>> % if ($relay) { >>> smtp_tls_security_level = may >>> smtp_tls_key_file = <% $keyFile %> smtp_tls_cert_file = <% >>> $certFile %> % } >>> >>> % if ($relayAuth) { >>> smtp_sasl_auth_enable = yes >>> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd >>> smtp_sasl_security_options = noanonymous >>> % if ($relayAuth->{auth} eq 'LOGIN') { >>> smtp_sasl_mechanism_filter = login >>> % } >>> % } >>> >>> mynetworks = <% $allowed %> >>> >>> message_size_limit = <% $maxmsgsize %> mailbox_size_limit = 0 >>> virtual_mailbox_limit = 0 recipient_delimiter = + inet_interfaces = >>> all >>> >>> # Virtual Aliases >>> virtual_alias_domains = $virtual_alias_maps virtual_alias_maps = >>> ldap:valiases valiases_server_host = <% $ldapServer %> >>> valiases_version = 3 valiases_search_base = <% $aliasDN %> >>> valiases_query_filter = >>> (&(|(mail=%s)(mail=@%s))(objectClass=CourierMailAlias)) >>> valiases_result_attribute = maildrop valiases_bind = yes >>> valiases_bind_dn = <% $bindDN %> valiases_bind_pw = <% $bindPW %> >>> >>> # Virtual Domains >>> dovecot_destination_recipient_limit = 1 virtual_transport = dovecot >>> virtual_mailbox_base = <% $vmaildir %> virtual_mailbox_maps= >>> ldap:ldapvirtualmap ldapvirtualmap_server_host = <% $ldapServer %> >>> ldapvirtualmap_version = 3 ldapvirtualmap_search_base = <% $usersDN >>> %> ldapvirtualmap_query_filter = >>> (&(mail=%s)(!(quota=-1))(objectClass=CourierMailAccount)) >>> ldapvirtualmap_result_attribute = mailbox ldapvirtualmap_bind = yes >>> ldapvirtualmap_bind_dn = <% $bindDN %> ldapvirtualmap_bind_pw = <% >>> $bindPW %> >>> >>> virtual_mailbox_domains = ldap:vmaildomains vmaildomains_server_host >>> = <% $ldapServer %> vmaildomains_version = 3 >>> vmaildomains_search_base = <% $vdomainDN %> >>> vmaildomains_query_filter = >>> (&(objectclass=domain)(dc=%s)) vmaildomains_result_attribute = dc, >>> maildrop vmaildomains_bind = yes vmaildomains_bind_dn = <% $bindDN >>> %> vmaildomains_bind_pw = <% $bindPW %> >>> >>> virtual_minimum_uid = 100 >>> virtual_uid_maps = static:<% $uidvmail %> virtual_gid_maps = >>> static:<% $gidvmail %> >>> >>> # TLS/SSL >>> smtpd_use_tls = yes >>> smtpd_tls_key_file = <% $keyFile %> smtpd_tls_cert_file = <% >>> $certFile %> smtpd_tls_loglevel = 0 >>> >>> >>> # Grupos de Usuarios >>> internacional_server_host = 127.0.0.1:390 internacional_bind = yes >>> internacional_timeout = 5 internacional_search_base = >>> ou=Groups,dc=webmail,dc=divepcav,dc=co,dc=cu >>> internacional_query_filter = (&(|(cn=CorreoInt))(memberUid=%u)) >>> internacional_result_attribute = cn >>> internacional_bind_dn = cn=zentyalro,dc=divepcav,dc=co,dc=cu >>> internacional_bind_pw = GJrB@qGVz@PrdlzOIqEp >>> >>> # Dominio de Reenvio >>> relay_domains = divepcav.co.cu >>> >>> # Clases >>> CorreoInt = permit >>> >>> Internacional = >>> check_recipient_access ldap:internacional, >>> check_sender_access regexp:/etc/postfix/internacional.cf >>> >>> InternacionalSalida = >>> check_sender_access ldap:internacional, >>> check_recipient_access regexp:/etc/postfix/internacional.cf >>> >>> >>> smtpd_helo_restrictions = permit_mynetworks, >>> permit_sasl_authenticated, reject_invalid_helo_hostname >>> >>> # recipient restrictions >>> smtpd_recipient_restrictions = permit_sasl_authenticated, >>> check_sender_access regexp:/etc/postfix/acceso.cf, >>> permit_mynetworks, reject_unauth_destination, >>> reject_non_fqdn_sender,reject_unknown_sender_domain, >>> reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, >>> check_helo_access pcre:/etc/postfix/helo_checks.pcre >>> >>> >>> submission_recipient_restrictions = reject_non_fqdn_recipient, >>> check_sender_access regexp:/etc/postfix/acceso.cf, >>> permit_sasl_authenticated, reject_unauth_destination, >>> reject_unlisted_recipient, permit, <% >>> $submissionRecipientRestrictions %> smtpd_restriction_classes = >>> CorreoInt, Internacional, InternacionalSalida, >>> submission_recipient_restrictions >>> >>> #SASL authentication >>> smtpd_sasl_auth_enable = yes >>> smtpd_sasl_security_options = noanonymous smtpd_sasl_local_domain = >>> broken_sasl_auth_clients = yes smtpd_tls_auth_only = yes >>> smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth >>> smtpd_sasl_local_domain = $myorigin >>> >>> smtpd_sender_restrictions= reject_non_fqdn_sender, >>> permit_mynetworks, permit_sasl_authenticated, check_relay_domains >>> smtpd_sender_login_maps = ldap:ldapvirtualmap >>> senderlogin_server_host = <% $ldapServer %> senderlogin_version = 3 >>> senderlogin_search_base = <% $usersDN %> senderlogin_query_filter = >>> (&(mail=%s)(objectClass=CourierMailAccount)) >>> senderlogin_result_attribute = mail >>> senderlogin_bind = yes >>> senderlogin_bind_dn = <% $bindDN %> >>> senderlogin_bind_pw = <% $bindPW %> >>> >>> >>> smtpd_data_restrictions = reject_multi_recipient_bounce, >>> reject_unauth_pipelining >>> >>> % if ($filter) { >>> content_filter=smtp-amavis:<% $ipfilter %>:<% $portfilter %> % } >>> >>> % if ($bccMaps) { >>> sender_bcc_maps = <% $bccMaps %> >>> recipient_bcc_maps = <% $bccMaps %> >>> % } >>> >>> >>> Pero nada no me pincha, por favor si encuentran algún error decirme >>> es que lo necesito de verdad Creo que todo el problema está en la >>> restricción recipient y en coger el grupo por LDAP yo uso Zentyal >>> 3.0.2 >>> >>> Saludos y en espera de su cooperación >>> >>> >>> >>> >>> >> Voy a buscar a ver que se puede hacer, también comenzaré a probar >> zentyal y seguro necesitare una solución para este tema cuando >> termine de montar mi server mail. >> >> Pues en teoría la cosa sería más o menos así. >> - Crear un grupo para los user con acceso internacional. >> - Hacer que postfix detecte el grupo al que pertenece cada usuario. >> - Fijar las restriciones. >> >> Por defecto cada usuario que NO pertenezca al grupo mencionado, solo >> podría enviar mail a .cu. >> >> En fin, hay que revizar un poco ldap y la conf de postfix, en la >> lista seguro hay muchas personas que pueden echarnos una mano. >> >> Le sugerí también a la gente de Nova-Servidor que traten de >> ofrecernos está opción desde la interfaz web; que la gente de zentyal >> lo haga es más complicado porque ellos no necesitan este tipo de >> restricciones. :D >> >> PD: Un poco regada y fea esa conf que envías no? :) >> >> saludos... >> >> >> >> >> -- >> Este mensaje ha sido analizado por MailScanner en busca de virus y >> otros contenidos peligrosos, y se considera que está limpio. >> >> _____________________________________________________________________ >> _ Lista de correos del Grupo de Usuarios de Tecnologías Libres de >> Cuba. >> Gutl-l@jovenclub.cu >> https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l >> >> >> -- >> Este mensaje ha sido analizado por MailScanner en busca de virus y >> otros contenidos peligrosos, y se considera que está limpio. >> >> _____________________________________________________________________ >> _ Lista de correos del Grupo de Usuarios de Tecnologías Libres de >> Cuba. >> Gutl-l@jovenclub.cu >> https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l > > > ______________________________________________________________________ > Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba. > Gutl-l@jovenclub.cu > https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l Colega después de ver zentyal 3 en una maquina con virtualbox vi cual es la situación y es que en la versión 3 el arbol de ldap ya no utiliza x defecto memberUId para definir que usuario pertenecen al grupo por eso lo que te di no funciona, una solucion seria instalar ldap account manager (LAM que es como un phpmyadmin) agregar esa classe al grupo y luego añadir el uid de los ususrio en ese objeto, entonces si funciona como ya probé aquí. Saludos Carlos R Laguna NDC REDTINO ------------ próxima parte ------------ Se ha borrado un adjunto en formato HTML... URL: <http://listas.jovenclub.cu/pipermail/gutl-l/attachments/20130711/463682bf/a ttachment.html> ______________________________________________________________________ Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba. Gutl-l@jovenclub.cu https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. ______________________________________________________________________ Lista de correos del Grupo de Usuarios de Tecnologías Libres de Cuba. Gutl-l@jovenclub.cu https://listas.jovenclub.cu/cgi-bin/mailman/listinfo/gutl-l