Hola he estado configurando el postfix para crear restricciones de envío y
recepcion por dominios nacionales e internacionales, pero cuando uso los
ejemplos que encuentro en internet, el servidor me da un error de
configuracion y no me deja enviar aqui tengo publicado el fichero
/usr/share/zentyal/stubs/mail/main.cf.mas
Si me pudieran ayudar les estaria agradecido
este es el contenido:

# 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
        $baseDN
        $uidvmail
        $gidvmail

        $ldap
        $filter
        $ipfilter
        $portfilter

        $zarafa

        $bccMaps

        $greylist
        $greylistAddr
        $greylistPort

        $openchangeProvisioned
</%args>
<%init>
use EBox::Gettext;

my $smtpRecipientRestrictions;
#$smtpRecipientRestrictions .= 'check_recipient_access hash:/etc/postfix/
entrada.cf, ';
$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, permit';



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 = <% $mailname %> ESMTP
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,ldap:groupaliases
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 %>

# Distribution Groups Aliases
groupaliases_server_host = <% $ldapServer %>
groupaliases_version = 3
groupaliases_search_base = <% $baseDN %>
groupaliases_query_filter =
(&(mail=%s)(objectClass=zentyalDistributionGroup))
groupaliases_leaf_result_attribute = mail
groupaliases_special_result_attribute = member
groupaliases_bind = yes
groupaliases_bind_dn = <% $bindDN %>
groupaliases_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 = <% $baseDN %>
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

# recipient restrictions
submission_recipient_restrictions = <% $submissionRecipientRestrictions %>
smtpd_restriction_classes = submission_recipient_restrictions, nacional,
internacional
nacional =
 check_recipient_access hash:/etc/postfix/nacional.cf

internacional = permit

smtpd_recipient_restrictions = <% $smtpRecipientRestrictions %>


#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_authenticated_sender_login_mismatch

smtpd_sender_login_maps = ldap:senderlogin
senderlogin_server_host = <% $ldapServer %>
senderlogin_version = 3
senderlogin_search_base = <% $baseDN %>
senderlogin_query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
senderlogin_result_attribute = mail
senderlogin_bind = yes
senderlogin_bind_dn = <% $bindDN %>
senderlogin_bind_pw = <% $bindPW %>


% if ($filter) {
content_filter=smtp-amavis:<% $ipfilter %>:<% $portfilter %>
% }

% if ($bccMaps) {
sender_bcc_maps = <% $bccMaps %>
recipient_bcc_maps = <% $bccMaps %>
% }

% if ($openchangeProvisioned) {
smtp_generic_maps = hash:/etc/postfix/generic
% }

-- 
Este mensaje ha sido analizado por MailScanner
en busca de virus y otros contenidos peligrosos,
y se considera que está limpio.

------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: 
<http://listas.jovenclub.cu/pipermail/gutl-l/attachments/20140603/8d86ad79/attachment.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

Reply via email to