我一直试图在Ubuntu 16.04上设置一个只发送邮件的SMTP服务器,后缀和dovecot。 我遇到的问题是,当试图发送电子邮件时,我收到消息。
4.7.0由于本地问题,TLS不可用
所以我猜测问题在于我的后缀TLS设置。 如果我正在检查后缀服务的状态
Sep 19 15:03:15 mail.example.org postfix [3571]:/ usr / sbin / postconf:warning:/etc/postfix/main.cf:unused parameter:smtpd_tls_session_cache_header = yes Sep 19 15:03:15 mail。 example.org postfix [3571]:/ usr / sbin / postconf:warning:/etc/postfix/main.cf:unused parameter:smtpd_tls_note_starttls_offer = yes Sep 19 15:03:15 mail.example.org postfix [3571]:/ usr / sbin / postconf:warning:/etc/postfix/main.cf:未使用的参数:smtpd_tls_recieved_header = yes
所以我猜这是与这些设置有关。 但是我不明白他们有什么问题,我尝试删除这些行,并且错误仍然存在。
后缀configuration:
mydomain = branelmail.dk myhostname = mail.branelmail.dk myorigin = $mydomain mydestination = $myhostname, localhost.$mydomain, localhost unknown_local_recipient_reject_code = 550 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases home_mailbox = /dev/null smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no debug_peer_level = 2 # TLS parameters smtpd_use_tls = yes smtpd_tls_cert_file=/etc/ssl/certs/mail.branelmail.dk.pem smtpd_tls_key_file=/etc/ssl/private/mail.branelmail.dk.key smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # You can use log level 3 or 4 for more advanced troubleshooting smtpd_tls_loglevel = 4 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination relayhost = mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_auth_enable = yes smtpd_tls_security_level = may smtpd_tls_auth_only = no #smtpd_tls_note_starttls_offer = yes #smtpd_tls_recieved_header = yes #smtpd_tls_session_cache_header = yes tls_random_source = dev:/dev/urandom
好吧,所以我find了一个解决scheme,似乎在我们生成的证书出现问题后,在网上购买证书后,工作起来没有任何问题。 所以,如果任何人有同样的问题,只要确保您使用的证书,设置正确。