设置新服务器,但遇到了一些 postfix 问题。使用与我拥有的另一台服务器相同的配置进行设置,运行良好。
无论如何,当我尝试发送到某个域名时,我总是收到
Feb 14 10:28:55 web postfix/smtp[6276]: B9056A041A: to=<[email protected]>, relay=mailserver.innovative-payroll.com[213.171.216.114]:25, delay=0.29, delays=0.06/0.01/0.01/0.21, dsn=5.0.0, status=bounced (host mailserver.innovative-payroll.com[213.171.216.114] said: 550 <[email protected]>: Sender address rejected: Domain not found (in reply to MAIL FROM command))
innovative-payroll.com 域名的 MX 记录似乎设置正确
在域上使用 dig 我得到以下内容。
; <<>> DiG 9.6-ESV-R4-P3 <<>> mailserver.innovative-payroll.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32030
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;mailserver.innovative-payroll.com. IN A
;; ANSWER SECTION:
mailserver.innovative-payroll.com. 3600 IN A 213.171.216.114
;; Query time: 36 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Thu Feb 14 10:37:50 2013
;; MSG SIZE rcvd: 67
我的 postfix 配置(postconf -n)
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = web.hoodoowebdesign.co.uk, localhost.hoodoowebdesign.co.uk, localhost
myhostname = web.hoodoowebdesign.co.uk
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
- - 解决方案 - -
编辑文件 /etc/mailname 并将其设置为服务器的域 (hoodoowebdesign.co.uk),现在它可以正确发送。我假设它已经自动填充了
kickseed.vpstest.local
当我使用其中一个快捷方式在服务器上安装 LAMP 环境时。
答案1
确保您的机器配置为响应主机名 web.hoodoowebdesign.co.uk,并确保主机名在 DNS 中正确配置。显然,主机名目前有所不同,因此来自您的邮件最终来自 kickseed.vpstest.local。