postfix는 systemctl이 postfix를 다시 시작할 때까지 이메일을 보내지 않습니다.

postfix는 systemctl이 postfix를 다시 시작할 때까지 이메일을 보내지 않습니다.

Ubuntu 18.04에서 smtp postfix를 설정하려고했습니다. 마침내 Gmail 수신자가 SPF 및 DKIM이 전송되는 것을 볼 수 있게 되었습니다(비록 여전히 스팸 폴더에 남아 있지만 이유는 확실하지 않습니까?).

그러나 이메일을 보낼 때 를 사용하여 프로세스를 다시 시작할 때까지 대부분의 경우 이메일이 전송되지 않습니다 sudo systemctl restart postfix.

내가 이것을 할 때 systemctl status postfix, 그것은 말한다 active (exited).

왜 그런지 잘 모르겠습니다. 어떤 아이디어가 있습니까? 이렇게 다시 시작할 필요 없이 이메일이 즉시 전송되기를 원합니다.

제가 제공해야 할 추가 정보/문서가 있으면 알려 주시기 바랍니다.

/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more compl$


# 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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default$
# fresh installs.
compatibility_level = 2

# 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_$
smtp_tls_session_cache_database = btree:${data_directory}/smtp_sc$

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc pac$
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenti$
myhostname = [removed].com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost.learn$
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all


# Milter configuration
milter_default_action = accept
milter_protocol = 6
smtpd_milters = local:opendkim/opendkim.sock
non_smtpd_milters = $smtpd_milters

회의 후-n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
inet_interfaces = loopback-only
inet_protocols = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname, localhost.$mydomain, localhost.[removed].com, [removed].com, [removed].local, localhost.local, localhost
myhostname = [removed].com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = $smtpd_milters
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_milters = local:opendkim/opendkim.sock
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
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

/var/log/mail.log

Apr 28 10:18:25 [removed] postfix/postfix-script[1679]: starting the Postfix mail system
Apr 28 10:18:25 [removed] postfix/master[1681]: daemon started -- version 3.3.0, configuration /etc/postfix
Apr 28 10:18:25 [removed] postfix/pickup[1682]: E88CD81E22: uid=0 from=<no-reply@[removed].com>
Apr 28 10:18:25 [removed] opendkim[1456]: OpenDKIM Filter: mi_stop=1
Apr 28 10:18:25 [removed] opendkim[1456]: OpenDKIM Filter v2.11.0 terminating with status 0, errno = 0
Apr 28 10:18:25 [removed] postfix/cleanup[1685]: warning: milter local:opendkim/opendkim.sock: can't read SMFIC_OPTNEG reply packet header: Connection reset by peer
Apr 28 10:18:25 [removed] postfix/cleanup[1685]: warning: milter local:opendkim/opendkim.sock: read error in initial handshake
Apr 28 10:18:25 [removed] postfix/cleanup[1685]: E88CD81E22: message-id=<222b02b2-6a3c-3e6f-5083-b9889f5be672@[removed].com>
Apr 28 10:18:25 [removed] postfix/qmgr[1683]: E88CD81E22: from=<no-reply@[removed].com>, size=1357, nrcpt=1 (queue active)
Apr 28 10:18:25 [removed] opendkim[1692]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf)
Apr 28 10:18:28 [removed] postfix/smtp[1690]: E88CD81E22: to=<[removed]@gmail.com>, relay=gmail-smtp-in.l.google.com[2404:6800:4003:c06::1b]:25, delay=545, delays=542/0.01/1.4/1.5, dsn=2.0.0, stat$
Apr 28 10:18:28 [removed] postfix/qmgr[1683]: E88CD81E22: removed
Apr 28 10:19:13 [removed] postfix/pickup[1682]: A30DB81E22: uid=0 from=<no-reply@[removed].com>
Apr 28 10:19:13 [removed] postfix/cleanup[1685]: A30DB81E22: message-id=<2e5c7f36-b481-4815-e666-3f057951f498@[removed].com>
Apr 28 10:19:13 [removed] opendkim[1692]: KeyTable entry for 'default._domainkey.[removed].com' corrupt
Apr 28 10:19:13 [removed] opendkim[1692]: A30DB81E22: error loading key 'default._domainkey.[removed].com'
Apr 28 10:19:13 [removed] postfix/cleanup[1685]: A30DB81E22: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<no-reply@[removed]$
Apr 28 10:19:25 [removed] postfix/pickup[1682]: A71D981E22: uid=0 from=<no-reply@[removed].com>
Apr 28 10:19:25 [removed] postfix/cleanup[1685]: A71D981E22: message-id=<2e5c7f36-b481-4815-e666-3f057951f498@[removed].com>
Apr 28 10:19:25 [removed] opendkim[1692]: KeyTable entry for 'default._domainkey.[removed].com' corrupt
Apr 28 10:19:25 [removed] opendkim[1692]: A71D981E22: error loading key 'default._domainkey.[removed].com'
Apr 28 10:19:25 [removed] postfix/cleanup[1685]: A71D981E22: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 4.7.1 Service unavailable - try again later; from=<no-reply@[removed]$

답변1

다들 댓글 감사합니다 드디어 찾았네요이것이는 다음 줄 중 일부를 주석 처리하도록 지시합니다 /etc/opendkim.conf.

KeyFile /etc/opendkim/keys/mail.private
#KeyTable /etc/opendkim/KeyTable
#SigningTable /etc/opendkim/SigningTable

그런 다음 PTR 레코드를 사용하여 rDNS를 설정했습니다. 이제 이메일은 다시 시작하지 않고도 즉시 전송되며 메일 테스터에서 10/10 만점을 받았습니다.

관련 정보