Назад | Перейти на главную страницу

отправка postfix smtp с использованием tls не работает

Я безуспешно пытаюсь настроить почтовый сервер с dovecot, postfix и sasl, используя dovecot. Мой хост - centos 8. Отправка SMTP на порт 587 не работает. Imapsecure работает.

Если я попытаюсь проверить свое SMTP-соединение с сервером с помощью Outlook, я получу следующий журнал:

May 20 18:17:02 level dovecot[95077]: imap(ubi): Connection closed (IDLE running for 0.001 + waiting input for 0.001 secs, 2 B in + 10+10 B out, state=wait-input) in=11 out=380
May 20 18:17:02 level postfix/submission/smtpd[96042]: connect from unknown[78.97.96.194]
May 20 18:17:03 level postfix/submission/smtpd[96042]: NOQUEUE: reject: RCPT from unknown[78.97.96.194]: 554 5.7.1 <unknown[78.97.96.194]>: Client host rejected: Access denied; from=<ubi@mydomain.com> to=<ubi@mydomain.com> proto=ESMTP helo=<DESKTOPQ697FV9>
May 20 18:17:03 level postfix/submission/smtpd[96042]: lost connection after RCPT from unknown[78.97.96.194]
May 20 18:17:03 level postfix/submission/smtpd[96042]: disconnect from unknown[78.97.96.194] helo=1 ehlo=1 starttls=1 mail=1 rcpt=0/1 commands=4/5

Мои конфиги:

-Postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 4
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /home/part2/Maildir/
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = mydomain.com,$myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix/README_FILES
sample_directory = /usr/share/doc/postfix/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject
smtpd_relay_restrictions = permit_mynetworks, reject_unauth_destination, permit_sasl_authenticated, reject
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/letsencrypt/live/mydomain.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mydomain.com/privkey.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550

-The master.conf:

 submission inet n       -       n       -       -       smtpd
 -o syslog_name=postfix/submission
 -o smtpd_tls_security_level=encrypt
 -o smtpd_sasl_auth_enable=yes
 -o smtpd_sasl_type=dovecot
 -o smtpd_sasl_path=private/auth
 -o smtpd_sasl_security_options=noanonymous
 -o smtpd_sasl_local_domain=mydomain.com
 -o smtpd_client_restrictions=permit_sasl_authenticated,reject
 -o smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject
#628       inet  n       -       n       -       -       qmqpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
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
-o syslog_name=postfix/$service_name
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
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

соответствующий подробный журнал будет выглядеть так:

May 20 18:26:46 level postfix/submission/smtpd[96320]: >>> START Client host RESTRICTIONS <<<
May 20 18:26:46 level postfix/submission/smtpd[96320]: generic_checks: name=permit_sasl_authenticated
May 20 18:26:46 level postfix/submission/smtpd[96320]: generic_checks: name=permit_sasl_authenticated status=0
May 20 18:26:46 level postfix/submission/smtpd[96320]: generic_checks: name=reject
May 20 18:26:46 level postfix/submission/smtpd[96320]: NOQUEUE: reject: RCPT from unknown[78.97.96.194]: 554 5.7.1 <unknown[78.97.196.194]>: Client host rejected: Access denied; from=<ubi@mydomain.com to=<ubi@mydomain.com> proto=ESMTP helo=<DESKTOPQ697FV9>
May 20 18:26:46 level postfix/submission/smtpd[96320]: generic_checks: name=reject status=2
May 20 18:26:46 level postfix/submission/smtpd[96320]: >>> END Client host RESTRICTIONS <<<
May 20 18:26:46 level postfix/submission/smtpd[96320]: > unknown[78.97.96.194]: 554 5.7.1 <unknown[78.97.96.194]>: Client host rejected: Access denied
May 20 18:26:46 level postfix/submission/smtpd[96320]: smtp_get: EOF
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 127.0.0.1/32
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_hostaddr: smtpd_client_event_limit_exceptions: 78.97.96.194 ~? 127.0.0.1/32
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_hostname: smtpd_client_event_limit_exceptions: unknown ~? 10.0.100.10/32
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_hostaddr: smtpd_client_event_limit_exceptions: 78.97.96.194 ~? 10.0.100.10/32
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_list_match: unknown: no match
May 20 18:26:46 level postfix/submission/smtpd[96320]: match_list_match: 78.97.96.194: no match

Любое понимание будет оценено.