最小后缀configuration发送邮件到smtps服务器

我试图用python发送邮件,所以我在本地configuration了一个postfix服务器。 python部分似乎工作,因为我的邮件到达smtpd服务器。 之后,后缀似乎正确地查询MXlogging,并尝试连接正确的DNS名称。

这里的问题似乎是,我的后缀服务器从不尝试端口465,只有25,端口closures时失败,然后放弃,直到重试计时器重置。

这是我的/etc/postfix/main.cf文件。 我完全知道我没有完全意识到我在做什么

 # 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_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 # 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 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. # Optional, if you want this postfix to use TLS when acting as a client smtp_use_tls=yes smtp_tls_security_level = may smtp_tls_note_starttls_offer = yes smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = yamatetsu alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = yamatetsu, localhost.localdomain, , localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = localhost 

再次,我想要的是让我的Python客户端发送邮件到任意的目的地,其中一些端口25closures。 python客户端似乎通过端口25连接,但我希望postfix找出如何到达远程服务器本身。 我不想接收邮件,而且我也不在乎安全性,因为所有的东西都在一台NAT后面的一台机器上。

我正在运行的Ubuntu 14.04,我安装apt-get。 我也尝试使用openssl自我生成的tls证书,但由于该行的前缀是smtpd,我不确定它是否是强制性的。 我甚至不知道如何查看它是否正确parsing。

看起来像configuration工程,但我的ISP阻止端口25.最好的部分是,他们似乎无法做任何事情,因为他们倒卖电缆中继线。