<![CDATA[Latest posts for the topic "Vấn đề SSL cho mail sever sử dụng postfix, dovecot"]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net Vấn đề SSL cho mail sever sử dụng postfix, dovecot Code:
May 21 11:15:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:03 mail dovecot: auth: mysql: Connected to localhost (postfix)
May 21 11:15:03 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:04 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:04 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:04 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:05 mail dovecot: pop3-login: Disconnected (auth failed, 1 attempts): user=<admin>, method=DIGEST-MD5, rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:05 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:09 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:10 mail dovecot: pop3-login: Login: user=<admin@company.com>, method=DIGEST-MD5, rip=123.166.xx.xxx, lip=210.55.xx.xx, mpid=12529
May 21 11:15:10 mail dovecot: pop3(admin@company.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
May 21 11:15:10 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS handshaking: Disconnected
May 21 11:15:11 mail dovecot: pop3-login: Aborted login (auth failed, 1 attempts): user=<admin>, method=DIGEST-MD5, rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:11 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:12 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS: Disconnected
May 21 11:15:21 mail dovecot: imap-login: Login: user=<admin@company.com>, method=DIGEST-MD5, rip=123.166.xx.xxx, lip=210.55.xx.xx, mpid=12533
May 21 11:15:21 mail dovecot: imap(admin@company.com): Disconnected: Logged out bytes=11/335
May 21 11:15:21 mail dovecot: imap-login: Disconnected (disconnected while authenticating): method=DIGEST-MD5, rip=123.166.xx.xxx, lip=210.55.xx.xx
May 21 11:15:21 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS handshaking: Disconnected
May 21 11:15:48 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS handshaking: Disconnected
May 21 11:15:48 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.166.xx.xxx, lip=210.55.xx.xx, TLS handshaking: Disconnected
May 21 11:15:48 mail postfix/smtpd[12487]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:48 mail postfix/smtpd[12487]: connect from unknown[123.166.xx.xxx]
May 21 11:15:48 mail postfix/smtpd[12541]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:48 mail postfix/smtpd[12541]: connect from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12487]: lost connection after UNKNOWN from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12487]: disconnect from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12541]: lost connection after UNKNOWN from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12541]: disconnect from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12487]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:49 mail postfix/smtpd[12487]: connect from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12541]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:49 mail postfix/smtpd[12541]: connect from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12487]: setting up TLS connection from unknown[123.166.xx.xxx]
May 21 11:15:49 mail postfix/smtpd[12541]: setting up TLS connection from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12487]: Anonymous TLS connection established from unknown[123.166.xx.xxx]: TLSv1 with cipher AES128-SHA (128/128 bits)
May 21 11:15:50 mail postfix/smtpd[12541]: Anonymous TLS connection established from unknown[123.166.xx.xxx]: TLSv1 with cipher AES128-SHA (128/128 bits)
May 21 11:15:50 mail postfix/smtpd[12487]: lost connection after STARTTLS from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12487]: disconnect from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12541]: lost connection after STARTTLS from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12541]: disconnect from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12487]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:50 mail postfix/smtpd[12487]: connect from unknown[123.166.xx.xxx]
May 21 11:15:50 mail postfix/smtpd[12541]: warning: 123.166.xx.xxx: address not listed for hostname localhost
May 21 11:15:50 mail postfix/smtpd[12541]: connect from unknown[123.166.xx.xxx]
May 21 11:15:51 mail postfix/smtpd[12487]: lost connection after EHLO from unknown[123.166.xx.xxx]
May 21 11:15:51 mail postfix/smtpd[12487]: disconnect from unknown[123.166.xx.xxx]
May 21 11:15:51 mail postfix/smtpd[12541]: lost connection after EHLO from unknown[123.166.xx.xxx]
May 21 11:15:51 mail postfix/smtpd[12541]: disconnect from unknown[123.166.xx.xxx]
May 21 11:16:08 mail dovecot: auth: mysql: Connected to localhost (postfix)
cấu hình dovecot Code:
ssl = yes
ssl_cert = </path/ssl/cert.pem
ssl_key = </path/ssl/key.pem
Cấu hình postfix Code:
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_key_file = /path/ssl/key.pem
smtpd_tls_cert_file = /path/ssl/cert.pem
smtpd_tls_CAfile = /path/ssl/ca.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
Trong đó /path/ssl/key.pem, /path/ssl/cert.pem, /path/ssl/ca.pem tôi tạo ra bằng openssl! Nhờ mọi người tư vấn giúp, thank!>]]>
/hvaonline/posts/list/44749.html#275871 /hvaonline/posts/list/44749.html#275871 GMT
Vấn đề SSL cho mail sever sử dụng postfix, dovecot /hvaonline/posts/list/44749.html#275875 /hvaonline/posts/list/44749.html#275875 GMT Vấn đề SSL cho mail sever sử dụng postfix, dovecot Code:
auth_debug=yes
auth_debug_passwords=yes
Thì nhận được log như sau: Code:
May 21 22:03:02 mail dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
May 21 22:03:02 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
May 21 22:03:02 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
May 21 22:03:02 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
May 21 22:03:02 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15502)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15504)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15505)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15506)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15508)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15509)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15510)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15511)
May 21 22:03:02 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:02 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15512)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15513)
May 21 22:03:02 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15514)
May 21 22:03:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:02 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:02 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15515)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15516)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15517)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15518)
May 21 22:03:02 mail dovecot: auth: Debug: auth client connected (pid=15519)
May 21 22:03:03 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=pop3#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=110#011rport=35366
May 21 22:03:03 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9IjU3SC9qbTlvVmp2U09PY2VzTHhkM2c9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:03 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSIiLG5vbmNlPSI1N0gvam05b1ZqdlNPT2Nlc0x4ZDNnPT0iLGRpZ2VzdC11cmk9InBvcC92aWVsZG8uY29tIixjbm9uY2U9IjJlMDhlYTU5NmI5ODBmODBhNDA3ODYyMWI0YWM2ODFmIixuYz0wMDAwMDAwMSxyZXNwb25zZT1mOTJlN2YxMzQ5N2E3ZDYzMDkzYjhkZWViMTU2M2EwNCxxb3A9YXV0aCxjaGFyc2V0PXV0Zi04
May 21 22:03:03 mail dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
May 21 22:03:03 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
May 21 22:03:03 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so
May 21 22:03:03 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
May 21 22:03:03 mail dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
May 21 22:03:03 mail dovecot: auth: mysql: Connected to localhost (postfix)
May 21 22:03:03 mail dovecot: auth: Debug: sql(test,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test'
May 21 22:03:03 mail dovecot: auth: sql(test,123.161.xxx.xxx): unknown user
May 21 22:03:03 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=pop3#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=110#011rport=35365
May 21 22:03:04 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:04 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS: Disconnected
May 21 22:03:04 mail dovecot: auth: Debug: auth client connected (pid=15522)
May 21 22:03:04 mail dovecot: auth: Debug: auth client connected (pid=15523)
May 21 22:03:04 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=imap#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=143#011rport=35371
May 21 22:03:04 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=imap#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=143#011rport=35372
May 21 22:03:05 mail dovecot: auth: Debug: client out: FAIL#0111#011user=test
May 21 22:03:05 mail dovecot: pop3-login: Disconnected (auth failed, 1 attempts): user=<test>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:05 mail dovecot: auth: Debug: auth client connected (pid=15524)
May 21 22:03:06 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=pop3#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=110#011rport=35373
May 21 22:03:07 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9ImZ4eUpvQi9jdFA2dU1QV2JJbkxyalE9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:07 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSIiLG5vbmNlPSJmeHlKb0IvY3RQNnVNUFdiSW5McmpRPT0iLGRpZ2VzdC11cmk9InBvcC9tYWlsLnZpZWxkby5jb20iLGNub25jZT0iNjE4NzZmMTI0NmExNmE1YWVhN2ViZmE3NDIxODYzNTAiLG5jPTAwMDAwMDAxLHJlc3BvbnNlPWNjZGY1YWVkYTM2N2RmOTEyNjNmY2ZkNTRjMjAzOGQzLHFvcD1hdXRoLGNoYXJzZXQ9dXRmLTg=
May 21 22:03:07 mail dovecot: auth: Debug: sql(test,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test'
May 21 22:03:07 mail dovecot: auth: sql(test,123.161.xxx.xxx): unknown user
May 21 22:03:08 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9IkFRYlJtdTV6YjUySGNmT1IrdU1TQ3c9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:08 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9Ik5Gc2UvMFhJejRuRUVNZlZEWGtCcGc9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:09 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSIiLG5vbmNlPSJBUWJSbXU1emI1MkhjZk9SK3VNU0N3PT0iLGRpZ2VzdC11cmk9ImltYXAvbWFpbC52aWVsZG8uY29tIixjbm9uY2U9Ijk3YzlhZmFhYjA5MGM2OTBlOGQ0ZTBiNjU2Y2ExNDQyIixuYz0wMDAwMDAwMSxyZXNwb25zZT05ZGFkY2Y1ODliYWQzZGIzYjJjZTQyYTcwOGRjOWM0Myxxb3A9YXV0aCxjaGFyc2V0PXV0Zi04
May 21 22:03:09 mail dovecot: auth: Debug: sql(test,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test'
May 21 22:03:09 mail dovecot: auth: sql(test,123.161.xxx.xxx): unknown user
May 21 22:03:09 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSIiLG5vbmNlPSJORnNlLzBYSXo0bkVFTWZWRFhrQnBnPT0iLGRpZ2VzdC11cmk9ImltYXAvdmllbGRvLmNvbSIsY25vbmNlPSJhNzJjMDk5YTZjNWRhMWM2ZjVjN2JiODBjYjJjMjI1YyIsbmM9MDAwMDAwMDEscmVzcG9uc2U9ZTVkNmU3NTk4YjM3NmNmYmRiYTA3YTgyMGI1NjRiNjMscW9wPWF1dGgsY2hhcnNldD11dGYtOA==
May 21 22:03:09 mail dovecot: auth: Debug: sql(test,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test'
May 21 22:03:09 mail dovecot: auth: sql(test,123.161.xxx.xxx): unknown user
May 21 22:03:09 mail dovecot: auth: Debug: client out: FAIL#0111#011user=test
May 21 22:03:09 mail dovecot: pop3-login: Disconnected (auth failed, 1 attempts): user=<test>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx
May 21 22:03:09 mail dovecot: auth: Debug: auth client connected (pid=15525)
May 21 22:03:10 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9ImIyb0JZNHdMN1pFMnV1NFRpM0Jya0E9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:10 mail dovecot: auth: Debug: client in: AUTH#0111#011DIGEST-MD5#011service=pop3#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=110#011rport=35374
May 21 22:03:10 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJ2aWVsZG8uY29tIixub25jZT0iYjJvQlk0d0w3WkUydXU0VGkzQnJrQT09IixkaWdlc3QtdXJpPSJwb3AvdmllbGRvLmNvbSIsY25vbmNlPSI3N2I0Yjg4MjYxZjEyNTdhMDM2MDRkNzNiNjRjZjI3YiIsbmM9MDAwMDAwMDEscmVzcG9uc2U9NDE3M2EyZTI0MmE0NzAxMjkyNDRhMzI0MDFhODE3ZDIscW9wPWF1dGgsY2hhcnNldD11dGYtOA==
May 21 22:03:10 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test@company.com'
May 21 22:03:10 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Generating DIGEST-MD5 from user 'test@company.com', password 'test'
May 21 22:03:10 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Credentials: 078676e74589ee786bd9f1e722d3e6e0
May 21 22:03:10 mail dovecot: auth: Debug: client out: CONT#0111#011cnNwYXV0aD0zZGU5Mjg0ZTEzYTk2NTYyMWQxOGJkMjhlMTIyY2RiYg==
May 21 22:03:10 mail dovecot: auth: Debug: client in: CONT#0111#011
May 21 22:03:10 mail dovecot: auth: Debug: client out: OK#0111#011user=test@company.com
May 21 22:03:10 mail dovecot: auth: Debug: master in: REQUEST#0113941859329#01115524#0111#011f821ecc5df0d4f87c67bd59d1ce44d08
May 21 22:03:10 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username  = 'test@company.com'
May 21 22:03:10 mail dovecot: auth: Debug: master out: USER#0113941859329#011test@company.com#011maildir=test@company.com/#011uid=101#011gid=101
May 21 22:03:10 mail dovecot: pop3-login: Login: user=<test@company.com>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, mpid=15526
May 21 22:03:10 mail dovecot: pop3(test@company.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
May 21 22:03:11 mail dovecot: auth: Debug: client out: FAIL#0111#011user=test
May 21 22:03:11 mail dovecot: auth: Debug: client out: FAIL#0111#011user=test
May 21 22:03:11 mail dovecot: auth: Debug: client in: AUTH#0112#011DIGEST-MD5#011service=imap#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=143#011rport=35371
May 21 22:03:11 mail dovecot: auth: Debug: client out: CONT#0112#011cmVhbG09IiIsbm9uY2U9Ilc5VThmdmZxMi9jUEdTNENHNGtqU1E9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:11 mail dovecot: auth: Debug: client in: AUTH#0112#011DIGEST-MD5#011service=imap#011lip=210.55.xxx.xxx#011rip=123.161.xxx.xxx#011lport=143#011rport=35372
May 21 22:03:11 mail dovecot: auth: Debug: client out: CONT#0112#011cmVhbG09IiIsbm9uY2U9ImxOTUttYzRvTGRZNUwwYnVYTllBWmc9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:11 mail dovecot: auth: Debug: client in: CONT#0112#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJ2aWVsZG8uY29tIixub25jZT0iVzlVOGZ2ZnEyL2NQR1M0Q0c0a2pTUT09IixkaWdlc3QtdXJpPSJpbWFwL21haWwudmllbGRvLmNvbSIsY25vbmNlPSJkNjMwOTRlM2EwYWYyZmNjMjY5ZmRiOTQ0NWUxZjkyNCIsbmM9MDAwMDAwMDEscmVzcG9uc2U9OGQ4MDBiZTg1ZmE3YzQ2OWRkNzMyOGY4NjgzYzFkZDkscW9wPWF1dGgsY2hhcnNldD11dGYtOA==
May 21 22:03:11 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test@company.com'
May 21 22:03:11 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Generating DIGEST-MD5 from user 'test@company.com', password 'test'
May 21 22:03:11 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Credentials: 078676e74589ee786bd9f1e722d3e6e0
May 21 22:03:11 mail dovecot: auth: Debug: client out: CONT#0112#011cnNwYXV0aD1iYTZiZjk5YjQ0ZjgzYjI0OWZiZTFkZjZiYTZhZDMyMA==
May 21 22:03:11 mail dovecot: auth: Debug: client in: CONT#0112#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJ2aWVsZG8uY29tIixub25jZT0ibE5NS21jNG9MZFk1TDBidVhOWUFaZz09IixkaWdlc3QtdXJpPSJpbWFwL3ZpZWxkby5jb20iLGNub25jZT0iOGVjYzg5Zjg1MTI2Mzg5MzQxZTZkMTg3MzBkY2U0NTAiLG5jPTAwMDAwMDAxLHJlc3BvbnNlPTkwOGQ3YjA5YWRiZjdlNWU1MTVmNTA0MzJkZDBhZjFkLHFvcD1hdXRoLGNoYXJzZXQ9dXRmLTg=
May 21 22:03:11 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test@company.com'
May 21 22:03:11 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Generating DIGEST-MD5 from user 'test@company.com', password 'test'
May 21 22:03:11 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Credentials: 078676e74589ee786bd9f1e722d3e6e0
May 21 22:03:11 mail dovecot: auth: Debug: client out: CONT#0112#011cnNwYXV0aD02Y2M5OTU0OTM4NzQ1NWNjMjQzZDllN2MzYTA0YmVlOA==
May 21 22:03:12 mail dovecot: auth: Debug: client in: CONT#0112#011
May 21 22:03:12 mail dovecot: auth: Debug: client out: OK#0112#011user=test@company.com
May 21 22:03:12 mail dovecot: auth: Debug: client in: CONT#0112#011
May 21 22:03:12 mail dovecot: auth: Debug: client out: OK#0112#011user=test@company.com
May 21 22:03:12 mail dovecot: auth: Debug: master in: REQUEST#011713293825#01115522#0112#01104a5d78c9b0e7575bf2d912d5cfa095a
May 21 22:03:12 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username  = 'test@company.com'
May 21 22:03:12 mail dovecot: auth: Debug: master out: USER#011713293825#011test@company.com#011maildir=test@company.com/#011uid=101#011gid=101
May 21 22:03:12 mail dovecot: imap-login: Login: user=<test@company.com>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, mpid=15527
May 21 22:03:12 mail dovecot: auth: Debug: master in: REQUEST#0113351248897#01115523#0112#011b1cdf19fa283eb13d71698c00b757c67
May 21 22:03:12 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username  = 'test@company.com'
May 21 22:03:12 mail dovecot: auth: Debug: master out: USER#0113351248897#011test@company.com#011maildir=test@company.com/#011uid=101#011gid=101
May 21 22:03:12 mail dovecot: imap-login: Login: user=<test@company.com>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, mpid=15528
May 21 22:03:12 mail dovecot: imap(test@company.com): Disconnected: Logged out bytes=11/335
May 21 22:03:12 mail dovecot: imap(test@company.com): Disconnected: Logged out bytes=11/335
May 21 22:03:12 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS handshaking: Disconnected
May 21 22:03:18 mail dovecot: auth: Debug: client out: CONT#0111#011cmVhbG09IiIsbm9uY2U9ImRqZW9zSzdhZFJNMytjM0taazh1QXc9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI=
May 21 22:03:18 mail dovecot: auth: Debug: client in: CONT#0111#011dXNlcm5hbWU9InRlc3QiLHJlYWxtPSJ2aWVsZG8uY29tIixub25jZT0iZGplb3NLN2FkUk0zK2MzS1prOHVBdz09IixkaWdlc3QtdXJpPSJwb3AvbWFpbC52aWVsZG8uY29tIixjbm9uY2U9IjE5MzBiYzViNTU5MzgzMGY5ZjQ0NWE5N2E2NTdjOTMxIixuYz0wMDAwMDAwMSxyZXNwb25zZT03YTgyYzBjYzQzN2NlOTE5Y2ZhNzBjN2FhYzQ3OTM4YSxxb3A9YXV0aCxjaGFyc2V0PXV0Zi04
May 21 22:03:18 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test@company.com'
May 21 22:03:18 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Generating DIGEST-MD5 from user 'test@company.com', password 'test'
May 21 22:03:18 mail dovecot: auth: Debug: password(test@company.com,123.161.xxx.xxx): Credentials: 078676e74589ee786bd9f1e722d3e6e0
May 21 22:03:18 mail dovecot: auth: Debug: client out: CONT#0111#011cnNwYXV0aD0xZWIyMGQxYTAwOTc1Mzg1MDdjMGExNWI5N2UwYjlmMg==
May 21 22:03:18 mail dovecot: auth: Debug: client in: CONT#0111#011
May 21 22:03:18 mail dovecot: auth: Debug: client out: OK#0111#011user=test@company.com
May 21 22:03:18 mail dovecot: auth: Debug: master in: REQUEST#0113706978305#01115525#0111#011c8357c05f9fcb664df330e38863c6f19
May 21 22:03:18 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username  = 'test@company.com'
May 21 22:03:18 mail dovecot: auth: Debug: master out: USER#0113706978305#011test@company.com#011maildir=test@company.com/#011uid=101#011gid=101
May 21 22:03:18 mail dovecot: pop3-login: Login: user=<test@company.com>, method=DIGEST-MD5, rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, mpid=15529
May 21 22:03:18 mail dovecot: pop3(test@company.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
May 21 22:03:19 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS handshaking: Disconnected
May 21 22:03:48 mail dovecot: imap-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS handshaking: Disconnected
May 21 22:03:48 mail dovecot: pop3-login: Disconnected (no auth attempts): rip=123.161.xxx.xxx, lip=210.55.xxx.xxx, TLS handshaking: Disconnected
May 21 22:03:49 mail postfix/smtpd[15532]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:49 mail postfix/smtpd[15532]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15534]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:49 mail postfix/smtpd[15534]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15532]: lost connection after UNKNOWN from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15532]: disconnect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15534]: lost connection after UNKNOWN from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15534]: disconnect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15532]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:49 mail postfix/smtpd[15532]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15534]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:49 mail postfix/smtpd[15534]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15532]: setting up TLS connection from unknown[123.161.xxx.xxx]
May 21 22:03:49 mail postfix/smtpd[15534]: setting up TLS connection from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15532]: Anonymous TLS connection established from unknown[123.161.xxx.xxx]: TLSv1 with cipher AES128-SHA (128/128 bits)
May 21 22:03:50 mail postfix/smtpd[15534]: Anonymous TLS connection established from unknown[123.161.xxx.xxx]: TLSv1 with cipher AES128-SHA (128/128 bits)
May 21 22:03:50 mail postfix/smtpd[15532]: lost connection after STARTTLS from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15532]: disconnect from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15534]: lost connection after STARTTLS from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15534]: disconnect from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15532]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:50 mail postfix/smtpd[15532]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:50 mail postfix/smtpd[15534]: warning: 123.161.xxx.xxx: address not listed for hostname static.vdc.vn
May 21 22:03:50 mail postfix/smtpd[15534]: connect from unknown[123.161.xxx.xxx]
May 21 22:03:51 mail postfix/smtpd[15532]: lost connection after EHLO from unknown[123.161.xxx.xxx]
May 21 22:03:51 mail postfix/smtpd[15532]: disconnect from unknown[123.161.xxx.xxx]
May 21 22:03:51 mail postfix/smtpd[15534]: lost connection after EHLO from unknown[123.161.xxx.xxx]
May 21 22:03:51 mail postfix/smtpd[15534]: disconnect from unknown[123.161.xxx.xxx]
Khi auth có SSL thì query xuống MySQL là: Code:
May 21 22:03:03 mail dovecot: auth: Debug: sql(test,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test'
Đoạn query vào mysql này không đúng, đúng phải là Code:
May 21 22:03:10 mail dovecot: auth: Debug: sql(test@company.com,123.161.xxx.xxx): query: SELECT password FROM mailbox WHERE username = 'test@company.com'
Toàn bộ cấu hình dovecot của tôi như sau: Code:
ssl = yes
ssl_cert = </etc/postfix/ssl/cert.pem
ssl_key = </etc/postfix/ssl/key.pem

auth_debug=yes
auth_debug_passwords=yes

protocols = imap pop3
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/vmail/%n@%d
first_valid_uid = 101
first_valid_gid = 12
mail_gid = 12
mail_uid = 101
mail_privileged_group = 12

protocol imap {
}

protocol pop3 {

}

auth default {
  mechanisms = DIGEST-MD5 plain
  passdb sql {
    args = /path/dovecot-mysql.conf
  }
  userdb sql {
    args = /path/dovecot-mysql.conf
  }
  user = root
}
Nội dung dovecot-mysql.conf như sau: Code:
driver = mysql
connect = dbname=<dbname> user=<user> host=<host> password=<password>
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username  = '%u'
Tôi có thử chỉnh %u thành %n@%d nhưng kết quả debug query là: Code:
SELECT password FROM mailbox WHERE username = '@'
]]>
/hvaonline/posts/list/44749.html#275881 /hvaonline/posts/list/44749.html#275881 GMT
Vấn đề SSL cho mail sever sử dụng postfix, dovecot Code:
mysql> desc mailbox;
`auth_username_format` bạn đang để là gì nhỉ? Thử sửa câu query trên thành `username = '%n' AND domain = '%d'` xem domain có lấy được giá trị không hay là empty. ]]>
/hvaonline/posts/list/44749.html#275885 /hvaonline/posts/list/44749.html#275885 GMT
Vấn đề SSL cho mail sever sử dụng postfix, dovecot Code:
+------------+--------------+------+-----+---------------------+-------+
| Field      | Type         | Null | Key | Default             | Extra |
+------------+--------------+------+-----+---------------------+-------+
| username   | varchar(255) | NO   | PRI | NULL                |       |
| password   | varchar(255) | NO   |     | NULL                |       |
| name       | varchar(255) | NO   |     | NULL                |       |
| maildir    | varchar(255) | NO   |     | NULL                |       |
| quota      | bigint(20)   | NO   |     | 0                   |       |
| local_part | varchar(255) | NO   |     | NULL                |       |
| domain     | varchar(255) | NO   | MUL | NULL                |       |
| created    | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| modified   | datetime     | NO   |     | 0000-00-00 00:00:00 |       |
| active     | tinyint(1)   | NO   |     | 1                   |       |
+------------+--------------+------+-----+---------------------+-------+
Tôi có thử chỉnh trong query từ %u thành %n@%d nhưng kết quả debug query là: [/code]SELECT password FROM mailbox WHERE username = '@'[/code] Không lấy được name và domain. auth_username_format tôi không ấn định.]]>
/hvaonline/posts/list/44749.html#275896 /hvaonline/posts/list/44749.html#275896 GMT
Vấn đề SSL cho mail sever sử dụng postfix, dovecot /hvaonline/posts/list/44749.html#275908 /hvaonline/posts/list/44749.html#275908 GMT