我已经在我的服务器中配置了Postfix和Dovecot(在这个服务器中我是我的网站和我的邮件服务器),但如果我发送电子邮件,它会被标记为垃圾邮件!我也配置了DKIM !!
所以,这里有一些信息:
$ host MYDOMAIN.COM
MYDOMAIN.COM has address 178.62.48.51
MYDOMAIN.COM mail is handled by 50 mail.MYDOMAIN.COM.
我的posfix main.cf:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/mailcert.pem
smtpd_tls_key_file=/etc/ssl/private/mail.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
smtpd_tls_security_level=may
smtpd_tls_protocols = !SSLv2, !SSLv3
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
myhostname = mail.MYDOMAIN.COM
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.MYDOMAIN.COM, MYDOMAIN.COM, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains = MYDOMAIN.COM
virtual_alias_maps = hash:/etc/postfix/virtual
milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301
我的postfix master.cf:
smtp inet n - - - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
submission inet n - - - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_wrappermode=no
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
-o smtpd_sasl_type=dovecot
-o smtpd_sasl_path=private/auth
我的/ etc / hosts:
127.0.0.1 localhost
127.0.1.1 MYDOMAIN MYDOMAIN
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
我的/ etc / hostname:
MYDOMAIN
我的/ etc / mailname:
MYDOMAIN.COM
我无法解释为什么电子邮件会收到垃圾邮件,有什么建议吗?
我强调在代码中我使用了我的真实域名。我还强调在某些文件(如主机名)中我使用了域名,但是我不知道它是否正确(例如:我使用DOMAIN而不是DOMAIN.COM)。
答案 0 :(得分:0)
您在评论中提供的IP地址,确实由DigitalOcean拥有,对我来说确实看起来很干净w.r.t. DNSBLs等SpamHaus和SenderBase等IP信誉网站。也就是说,DigitalOcean在控制其客户时肯定有bad reputation。对于广泛的DigitalOcean IP范围,出站垃圾邮件和某些过滤器可能过于激进。
我注意到您的IP rDNS中的域恰好缺少MX记录。在这种情况下,许多反垃圾邮件系统会拒绝您的邮件,特别是如果这是您实际发送的域名。您似乎覆盖了FCrDNS的其余部分,我认为这也是您的HELO所反映的。
(如果您想从您的问题中撤回IP,我已经省略了对您的实际IP或域的引用。)