Postfix, questão Dovecot enviando e-mail do cliente

0

Eu configurei um servidor de e-mail com o ubuntu, o postfix, o dovecot e o mysql.

Tryng para enviar e-mails a partir da interface da web, o e-mail sai sem nenhum inconveniente. Tentando com um cliente de e-mail do meu laptop (usando a internet) eu não posso. Eu recebo este erro:

Feb 13 11:44:48 mail postfix/submission/smtpd[13066]: warning: unknown smtpd restriction: "permit_sasl_autenticated"

e a seguinte linha é:

Feb 13 11:44:48 mail postfix/submission/smtpd[13066]: NOQUEUE: reject: RCPT from unknown[37.176.162.9]: 451 4.3.5 Server configuration error; from= to= proto=ESMTP helo=<[192.168.0.100]>

Esta segunda linha é a minha mensagem sendo rejeitada pelo servidor.

Eu verifiquei em /etc/postfix/main.cf e minha configuração de TLS é a seguinte:

# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_tls_cert_file=/etc/dovecot/cert.pem smtpd_tls_key_file=/etc/dovecot/private/cert.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes

#Enabling SMTP for authenticated users, adn handing off autentication to Dovecot smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes

smtpd_recipient_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        reject_unauth_destination

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination

Como você pode ver, não há permit_sasl_autenticated em qualquer lugar (e não há no arquivo inteiro).

O que está acontecendo? Você pode me ajudar a resolver isso?

EDIT - adicionou uma seção mais completa do meu log:

Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/trivial-rewrite[12501]: warning: do not list domain montglane.it in BOTH mydestination and virtual_mailbox_domains
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: unknown smtpd restriction: "permit_sasl_autenticated"
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: NOQUEUE: reject: RCPT from unknown[217.221.73.77]: 451 4.3.5 Server configuration error; from=<[email protected]> to=<[email protected]$
Feb 13 11:27:23 mail postfix/cleanup[12503]: D9AF313ED0D: message-id=<[email protected]>
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:23 mail postfix/oqmgr[3096]: D9AF313ED0D: from=<[email protected]>, size=1329, nrcpt=1 (queue active)
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: warning: hostname 217-221-73-77-static.albacom.net does not resolve to address 217.221.73.77: Name or service not known
Feb 13 11:27:23 mail postfix/submission/smtpd[12499]: connect from unknown[217.221.73.77]
Feb 13 11:26:49 mail dovecot: message repeated 3 times: [ auth: Warning: auth client 0 disconnected with 1 pending requests: EOF]
Feb 13 11:27:23 mail dovecot: lmtp(12507): Connect from local
Feb 13 11:27:24 mail dovecot: lmtp(12507, [email protected]): eXI0OAuKoVjbMAAAiLNN4A: msgid=<[email protected]>: saved mail to INBOX
Feb 13 11:27:24 mail dovecot: lmtp(12507): Disconnect from local: Successful quit
Feb 13 11:27:24 mail postfix/lmtp[12506]: D9AF313ED0D: to=<[email protected]>, orig_to=<postmaster>, relay=mail.montglane.it[private/dovecot-lmtp], delay=0.15, delays=0.04/0.01/0.$
Feb 13 11:27:24 mail postfix/oqmgr[3096]: D9AF313ED0D: removed
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: warning: unknown smtpd restriction: "permit_sasl_autenticated"
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: NOQUEUE: reject: RCPT from unknown[217.221.73.77]: 451 4.3.5 Server configuration error; from=<[email protected]> to=<[email protected]$
Feb 13 11:27:24 mail postfix/cleanup[12503]: 2A96D13ED0D: message-id=<[email protected]>
Feb 13 11:27:24 mail postfix/oqmgr[3096]: 2A96D13ED0D: from=<[email protected]>, size=1329, nrcpt=1 (queue active)
Feb 13 11:27:24 mail postfix/submission/smtpd[12499]: disconnect from unknown[217.221.73.77]
Feb 13 11:27:24 mail dovecot: lmtp(12507): Connect from local
Feb 13 11:27:24 mail dovecot: lmtp(12507, [email protected]): fXI0OAuKoVjbMAAAiLNN4A: msgid=<[email protected]>: saved mail to INBOX
Feb 13 11:27:24 mail postfix/lmtp[12506]: 2A96D13ED0D: to=<[email protected]>, orig_to=<postmaster>, relay=mail.montglane.it[private/dovecot-lmtp], delay=0.09, delays=0.02/0/0/0.0$
Feb 13 11:27:24 mail dovecot: lmtp(12507): Disconnect from local: Successful quit
Feb 13 11:27:24 mail postfix/oqmgr[3096]: 2A96D13ED0D: removed
    
por Lelio Faieta 13.02.2017 / 11:57

1 resposta

1

Adicione o seu método autenticação ao seu arquivo /etc/master.cf . Procure uma entrada semelhante a esta:

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
-o content_filter=spamassassin
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

Depois de fazer alterações na sua configuração do Postfix, certifique-se de reiniciar o serviço.

    
por L. D. James 13.02.2017 / 12:58