есть два ящика test@dracon753.ru и t2@dracon753.ru с паролями testpass и 759 перегоняем их в base 64
debiantest:/home/andreym/rab# printf 'test@dracon753.ru\0test@dracon753.ru\0testpass' | mimencode
dGVzdEBkcmFjb243NTMucnUAdGVzdEBkcmFjb243NTMucnUAdGVzdHBhc3M=
debiantest:/home/andreym/rab# printf 't2@dracon753.ru\0t2@dracon753.ru\0759' | mimencode
dDJAZHJhY29uNzUzLnJ1AHQyQGRyYWNvbjc1My5ydT05
пробую законектится
debiantest:/# openssl s_client -connect 192.168.4.25:465
CONNECTED(00000003)
depth=0 /C=RU/ST=Rostovskaiy obl/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=RU/ST=Rostovskaiy obl/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
verify return:1
---
Certificate chain
0 s:/C=RU/ST=Rostovskaiy obl/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
i:/C=RU/ST=Rostovskaiy obl/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
---
Server certificate
-----BEGIN CERTIFICATE-----
MIID4zCCA0ygAwIBAgIJAKn3F1sfcvtBMA0GCSqGSIb3DQEBBQUAMIGoMQswCQYD
VQQGEwJSVTEYMBYGA1UECBMPUm9zdG92c2thaXkgb2JsMRswGQYDVQQHExJLYW1l
c2stU2hheHRpbnNraXkxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDEbMBkGA1UEAxMScG9zdHMuZHJhY29uNzUzLnJ1MSIwIAYJKoZIhvcNAQkBFhNh
bmRyZXlAZHJhY29uNzUzLnJ1MB4XDTExMDUyMDA1MTcwM1oXDTIxMDUxNzA1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l/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
issuer=/C=RU/ST=Rostovskaiy obl/L=Kamesk-Shaxtinskiy/O=Internet Widgits Pty Ltd/CN=posts.dracon753.ru/emailAddress=andrey@dracon753.ru
---
No client certificate CA names sent
---
SSL handshake has read 1570 bytes and written 319 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-SHA
Server public key is 1024 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : DHE-RSA-AES256-SHA
Session-ID: 5B57811CBB73A8DBFE653C6E74374DA3FE768763FE3EF43F864C510C1CBF46AE
Session-ID-ctx:
Master-Key: 7386211CC15606F85ADD514E3017D181DC55D930E5CC3DD0ACA20808FB5F1EAE01C6D1A63B63DE6AE979150B9B6BB39B
Key-Arg : None
Start Time: 1310450837
Timeout : 300 (sec)
Verify return code: 18 (self signed certificate)
---
220 posts.dracon753.ru ESMTP Postfix (Debian/GNU)
ehlo 192.168.3.15
250-posts.dracon753.ru
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth plain
334
dGVzdEBkcmFjb243NTMucnUAdGVzdEBkcmFjb243NTMucnUAdGVzdHBhc3M=
235 2.7.0 Authentication successful
1 первый пароль срабатует
---
220 posts.dracon753.ru ESMTP Postfix (Debian/GNU)
ehlo 192.168.3.15
250-posts.dracon753.ru
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth plain
334
dDJAZHJhY29uNzUzLnJ1AHQyQGRyYWNvbjc1My5ydT05
535 5.7.8 Error: authentication failed:
а второй нет
в логах
2011-07-12 11:07:36 auth(default): Info: new auth connection: pid=22534
2011-07-12 11:07:53 auth(default): Info: client in: AUTH 1 plain service=smtp nologin lip=192.168.4.25 rip=192.168.3.15 secured
2011-07-12 11:07:53 auth(default): Info: client out: CONT 1
2011-07-12 11:08:08 auth-worker(default): Info: sql(test@dracon753.ru,192.168.3.15): query: SELECT email as user, password FROM users WHERE email='test@dracon753.ru';
2011-07-12 11:08:08 auth(default): Info: client in: CONT 1 dGVzdEBkcmFjb243NTMucnUAdGVzdEBkcmFjb243NTMucnUAdGVzdHBhc3M=
2011-07-12 11:08:08 auth(default): Info: client out: OK 1 user=test@dracon753.ru
2011-07-12 11:08:27 auth(default): Info: client in: AUTH 2 plain service=smtp nologin lip=192.168.4.25 rip=192.168.3.15 secured
2011-07-12 11:08:27 auth(default): Info: client out: CONT 2
2011-07-12 11:08:41 auth(default): Info: client in: CONT 2 dDJAZHJhY29uNzUzLnJ1AHQyQGRyYWNvbjc1My5ydT05
2011-07-12 11:08:41 auth(default): Info: plain(?,192.168.3.15): invalid input
2011-07-12 11:08:43 auth(default): Info: client out: FAIL 2
вчём прикол ?