私の postfix メール設定は正しいですか? (メールが受信されません)

私の postfix メール設定は正しいですか? (メールが受信されません)

私は Linux の初心者なので、皆さんが提供してくださるあらゆる助けと忍耐に大変感謝しています。

私はUbuntu 21.04を使用しています

ウェブホストからの電子メール設定手順:

postfix 経由でメールを送信するように設定しようとしています。

これは私の設定です:

nano /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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 to 2 on
# fresh installs.
compatibility_level = 2


smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = <mydomain>.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, mail.<mydomain>.com, <computer name>, localhost.localdomain, localhost
relayhost = [mail.<mydomain>.com]:465
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


# Enable SASL authentication
smtp_sasl_auth_enable = yes
# Disallow methods that allow anonymous authentication
smtp_sasl_security_options = noanonymous
# Location of sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# Enable STARTTLS encryption
smtp_use_tls = yes

# where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

smtp_tls_wrappermode = yes

smtp_tls_security_level = encrypt

次のコマンドを実行してテストメールを送信します。

echo "Test Mail" | mail -s "Test Email" <[email protected]>

しかし、メールが届きません(スパムフォルダを確認しました)。

出力は次のようになります

nano /var/log/mail.log
Aug 22 01:01:13 <computername> postfix/pickup[1396540]: 1F77980FA1: uid=1000 from=<<user>@<computername>>
Aug 22 01:01:13 <computername> postfix/cleanup[1396964]: 1F77980FA1: message-id=<20210822050113.1F77980FA1@<mydomain>.com
Aug 22 01:01:13 <computername> postfix/qmgr[1396541]: 1F77980FA1: from=<user>@<computername>, size=347, nrcpt=1 (queue active)
Aug 22 01:01:13 <computername> postfix/smtp[1396966]: warning: database /etc/postfix/sasl_passwd.db is older than source file /etc/postfix/sasl_passwd
Aug 22 01:01:14 <computername> postfix/smtp[1396966]: 1F77980FA1: to=<[email protected]>, relay=mail.<mydomain>.com[<ip address>]:465, delay=1.2, delays=0.07/0.08/0.74/0.27, dsn=2.0.0, status=sent (250 OK id=1mHfbe-001L4X-3a)
Aug 22 01:01:14 <computername> postfix/qmgr[1396541]: 1F77980FA1: removed

ご協力いただける場合は、事前に感謝いたします。

答え1

はい、この構成は正しいです。

関連情報