为了在我的Postfix服务器上使用TLS,我直接使用了来自其他服务器的nginx ssl文件,这也使用了我想用于postfix的域。
我已经以下面的方式将这些文件整合到main.cf中:
smtpd_tls_cert_file = /etc/ssl/subdomain.example.com.crt smtpd_tls_key_file = /etc/ssl/subdomain.example.com.key smtpd_tls_CAfile = /etc/ssl/subdomain.example.com.pem
我没有做任何openssl或东西,我只是用我在nginx我的另一台服务器的文件。 但是,我猜这不应该是一个问题,因为邮件服务器也使用与nginx相同的域名。
通过shell( mail ) mail是不是一个问题,但是当我想使用我的postfix服务器作为中继服务器,我得到以下错误(sceanrio:我想在我的smtp服务器在PHP-CMS ):
cannot enable STARTTLS, though 'subdomain.example.com:25' advertised it: 4.7.0 TLS not available due to local problem (454)
mail.log:
Feb 5 15:40:09 koto postfix/smtpd[8911]: warning: TLS library problem: error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:172: Feb 5 15:40:09 koto postfix/smtpd[8911]: warning: TLS library problem: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:by_file.c:274:
我的main.cf:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_tls_cert_file = /etc/ssl/subdomain.example.com.crt smtpd_tls_key_file = /etc/ssl/subdomain.example.com.key smtpd_tls_CAfile = /etc/ssl/subdomain.example.com.pem smtpd_tls_auth_only = yes smtpd_tls_session_cache_timeout = 3600s smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 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 # TLS parameters smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache # 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 myhostname = debian-512mb-fra1-01 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = **domain**, debian-512mb-fra1-01, localhost.localdomain, localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" recipient_delimiter = + inet_interfaces = all inet_protocols = all mime_header_checks = regexp:/etc/postfix/header_checks header_checks = regexp:/etc/postfix/header_checks smtp_sasl_auth_enable = yes smtp_sasl_password_maps = ***** smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt header_size_limit = 4096000 relayhost = [smtp.sendgrid.net]:587
==>这里有什么问题?