我有一个 Debian VPS,上面有一个 Postfix 服务器,我想传递连接的摄像头发送的本地邮件。这是我的 postfix main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = yes
append_dot_mydomain = no
readme_directory = no
compatibility_level = 3.6
# TLS parameters
smtpd_tls_cert_file=/etc/letsencrypt/live/geolithe.duckdns.org/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/geolithe.duckdns.org/privkey.pem
smtpd_tls_security_level=may
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_cache
smtp_tls_security_level=may
smtp_tls_loglevel = 1
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_unknown_reverse_client_hostname
myhostname = vps-aab534d9
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = vps-aab534d9.vps.ovh.net, localhost.vps.ovh.net, localhost, $myhostname, localhost.$myhostname
relayhost =
relay_domains = $mydestination
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_minimum_uid = 100
virtual_mailbox_limit = 0
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtp_generic_maps = hash:/etc/postfix/generic
local_recipient_maps =
message_size_limit = 52428800
我编写了一个脚本来测试我的服务器配置,我可以使用它通过端口 587 发送电子邮件。但是,当我尝试用相机发送照片时,它不起作用。这是我获得的日志:
2024-06-10T13:57:32.021209+00:00 geolithe postfix/submission/smtpd[123209]: warning: hostname 81.128.252.185.rev.airmob.eu does not resolve to address 185.252.128.81: Name or service not known
2024-06-10T13:57:32.021506+00:00 geolithe postfix/submission/smtpd[123209]: connect from unknown[185.252.128.81]
2024-06-10T13:57:32.021707+00:00 geolithe postfix/submission/smtpd[123209]: improper command pipelining after CONNECT from unknown[185.252.128.81]: \026\003\003\001u\001\000\001q\003\003S\221\310\312T\027\262h\003\234`\241\331\330\201m2\325\207\232\001\222\360?S\240\255\211\214\374\277\312\000\001\000\314\250\314\251\314\252\300,\3000\000\237\300\255\300\237\300$\300(\000k\300\n\300\024\0009\300\257\300\243\300\207\300\213\300}\300s\300w\000\304\000\210\300+\300/\000\236\300\254
2024-06-10T13:57:32.070553+00:00 geolithe postfix/submission/smtpd[123209]: lost connection after CONNECT from unknown[185.252.128.81]
2024-06-10T13:57:32.070682+00:00 geolithe postfix/submission/smtpd[123209]: disconnect from unknown[185.252.128.81] commands=0/0
我在本论坛上看到,这可能是由于发送电子邮件的代码所致。问题是我无法控制它,相机是与私人源代码一起出售的。使用 google smtp 或其他 smtp 服务器通过我的相机发送电子邮件没有问题。有人知道如何配置 postfix 来接受这些邮件吗?