mail ISPConfig: acesso de retransmissão negado

1

Estou executando o CentOS 7 com o ISPConfig 3. O Mail estava funcionando perfeitamente, mas agora (provavelmente devido a alguma atualização) não está funcionando. Eu estava tentando reinstalar o postfix, o amavis e atualizar o ISPConfig, mas não consigo fazê-lo funcionar.

No estado atual, meu / var / log / maillog tem esta aparência:

May 28 18:24:41 server postfix/smtpd[5799]: warning: regexp map /etc/postfix/helo_access, line 19: Invalid preceding regular expression
May 28 18:24:41 server postfix/smtpd[5799]: connect from server.miegl.cz[37.120.189.53]
May 28 18:24:41 server dovecot: doveconf: Warning: /etc/dovecot/dovecot.conf line 64: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 50 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 50)
May 28 18:24:41 server dovecot: config: Warning: /etc/dovecot/dovecot.conf line 64: Global setting mail_plugins won't change the setting inside an earlier filter at /etc/dovecot/dovecot.conf line 50 (if this is intentional, avoid this warning by moving the global setting before /etc/dovecot/dovecot.conf line 50)
May 28 18:24:41 server postfix/smtpd[5799]: NOQUEUE: filter: RCPT from server.miegl.cz[37.120.189.53]: <[email protected]>: Sender address triggers FILTER amavis:[127.0.0.1]:10026; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost>
May 28 18:24:41 server postfix/cleanup[5816]: error: open /etc/postfix/mysql-virtual_outgoing_bcc.cf: No such file or directory
May 28 18:24:41 server postfix/smtpd[5799]: F38091DFB26: client=server.miegl.cz[37.120.189.53], sasl_method=LOGIN, [email protected]
May 28 18:24:42 server postfix/cleanup[5816]: F38091DFB26: message-id=<[email protected]>
May 28 18:24:42 server postfix/smtpd[5799]: disconnect from server.miegl.cz[37.120.189.53]
May 28 18:24:42 server postfix/qmgr[24699]: F38091DFB26: from=<[email protected]>, size=1043, nrcpt=1 (queue active)
May 28 18:24:42 server postfix/smtpd[5821]: connect from server.miegl.cz[37.120.189.53]
May 28 18:24:42 server postfix/smtpd[5821]: NOQUEUE: reject: RCPT from server.miegl.cz[37.120.189.53]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost>
May 28 18:24:42 server amavis[17224]: (17224-11) Negative SMTP resp. to DATA: 554 5.5.1 Error: no valid recipients
May 28 18:24:42 server postfix/smtpd[5821]: disconnect from server.miegl.cz[37.120.189.53]
May 28 18:24:42 server amavis[17224]: (17224-11) (!)p-qrjBqImksF FWD from <[email protected]> -> <[email protected]>, BODY=7BIT 454 4.7.1 from MTA(smtp:[127.0.0.1]:10027): 454 4.7.1 <[email protected]>: Relay access denied
May 28 18:24:42 server amavis[17224]: (17224-11) Blocked MTA-BLOCKED {TempFailedOutbound}, ORIGINATING LOCAL [37.120.189.53]:47002 [37.120.189.53] <[email protected]> -> <[email protected]>, Queue-ID: F38091DFB26, Message-ID: <[email protected]>, mail_id: p-qrjBqImksF, Hits: -1, size: 1069, 598 ms
May 28 18:24:42 server postfix/smtp[5817]: F38091DFB26: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.67, delays=0.06/0.01/0.01/0.59, dsn=4.7.1, status=deferred (host 127.0.0.1[127.0.0.1] said: 454 4.7.1 id=17224-11 - Temporary MTA failure on relaying, from MTA(smtp:[127.0.0.1]:10027): 454 4.7.1 <[email protected]>: Relay access denied (in reply to end of DATA command))

Aqui está o meu /etc/postfix/main.cf:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8 37.120.189.53
mydomain = miegl.cz
relay_domains = $mydomain
relayhost = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
virtual_alias_domains = 
virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual_uids.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual_gids.cf
sender_bcc_maps = mysql:/etc/postfix/mysql-virtual_outgoing_bcc.cf
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_restriction_classes = greylisting
greylisting = check_policy_service inet:127.0.0.1:10023
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
smtpd_use_tls = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/ssl/certs/server.miegl.cz.crt
smtpd_tls_key_file = /etc/ssl/private/server.miegl.cz.key
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
tls_random_source = dev:/dev/urandom
myhostname = server.miegl.cz
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
smtpd_sender_login_maps = mysql:/etc/postfix/mysql-virtual_sender_login_maps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, check_helo_access regexp:/etc/postfix/helo_access, reject_invalid_hostname, reject_non_fqdn_hostname, check_helo_access regexp:/etc/postfix/blacklist_helo
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/tag_as_originating.re , permit_mynetworks, permit_sasl_authenticated, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf, check_sender_access regexp:/etc/postfix/tag_as_foreign.re
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
smtp_tls_security_level = may
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_protocols = !SSLv2,!SSLv3
smtp_tls_protocols = !SSLv2,!SSLv3
smtpd_tls_exclude_ciphers = RC4, aNULL
smtp_tls_exclude_ciphers = RC4, aNULL
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

E aqui está o /etc/postfix/master.cf:

smtp      inet  n       -       n       -       -       smtpd
smtpd     pass  -       -       n       -       -       smtpd
tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

amavis unix - - - - 2 smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes


127.0.0.1:10025 inet n - - - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks

127.0.0.1:10027 inet n - n - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtp_send_xforward_command=yes
        -o milter_default_action=accept
        -o milter_macro_daemon_name=ORIGINATING
        -o disable_dns_lookups=yes

Aqui está um dos arquivos postfix de conexão ISPConfig MySQL:

cat mysql-virtual_client.cf
user = ispconfig
password = ispconfigdbpassword
dbname = dbispconfig
table        = mail_access
select_field = access
where_field  = source
additional_conditions = and type = 'client' and active = 'y'
hosts = 127.0.0.1

Note que antes havia um problema com a leitura do MySQL, então criei uma cópia do usuário com acesso concedido a partir do 127.0.0.1 no phpMyAdmin. É claro que essa configuração tem alguns ajustes para fazer com que coisas como o amavis e o certificado funcionem.

    
por PepinCZ 28.05.2016 / 19:00

0 respostas