for teratail questions 320475 / 2021/02/08 Local domain port test


以下、SSL/TLS等のセッティングを終えたローカルドメイン環境でのポートテスト結果
----
#echo -en '\0mainfoo\0mainfoo_password' | base64
****BASE64_ID&PASSWORD****

# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
auth plain ****BASE64_ID&PASSWORD****
+OK Logged in.
quit
+OK Logging out.
Connection closed by foreign host.



# openssl s_client -connect localhost:995
CONNECTED(00000003)

(snip)

+OK Dovecot ready.
auth plain ****BASE64_ID&PASSWORD****
+OK Logged in.
quit
+OK Logging out.
closed


# openssl s_client -connect localhost:587 -starttls smtp
CONNECTED(00000003)

(snip)

250 DSN
auth plain AGhhbGNvbQBoYWxjb20yMA==
235 2.7.0 Authentication successful
quit
221 2.0.0 Bye
closed
#



以下、/var/log/maillog
----
Feb 8 17:11:37 example dovecot: pop3-login: Login: user=<mainfoo>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=10740, secured, session=<jA8NuM66RrR/AAAB>
Feb 8 17:11:39 example dovecot: pop3(mainfoo): Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=103900
Feb 8 17:11:54 example dovecot: pop3-login: Login: user=<mainfoo>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=10812, TLS, session=<dXcKuc66WMB/AAAB>
Feb 8 17:11:55 example dovecot: pop3(mainfoo): Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=103900
Feb 8 17:12:03 example postfix/smtpd[10030]: connect from localhost.localdomain[127.0.0.1]
Feb 8 17:12:03 example postfix/smtpd[10030]: Anonymous TLS connection established from localhost.localdomain[127.0.0.1]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Feb 8 17:12:13 example postfix/smtpd[10030]: disconnect from localhost.localdomain[127.0.0.1]


以下、postconf -nの結果
----
# postconf -n
alias_database = hash:/etc/postfix/aliases, hash:/etc/mailman/aliases
alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases
allow_mail_to_commands = alias,forward,include
allow_percent_hack = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = yes
home_mailbox = Maildir/
inet_interfaces = all
mail_owner = postfix
message_size_limit = 40960000
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.1/32, 192.168.0.0/24
mynetworks_style = host
myorigin = $mydomain
owner_request_special = no
queue_directory = /var/spool/postfix
recipient_delimiter = +
smtpd_banner = ESMTP unknown
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.example.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.example.com/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
swap_bangpath = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
お知らせ
実務でも趣味でも役に立つ多機能Webツールサイト【無限ツールズ】で、日常をちょっと便利にしちゃいましょう!
無限ツールズ

 
writening