Вы находитесь на странице: 1из 2

SASL (Simple Authentication and Security Layer) k thut h tr chng thc user s dng username v pasword B1: Cu hnh

SASL cho postfix #vi /etc/postfix/main.cf Thm cc dng sau: smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination #vi /etc/dovecot.conf S cc dng 758 auth default { 762 mechanisms = plain login 796 passdb pam { } 897 userdb passwd { } 960 user = root 979 socket listen { ; b # 990 client { ; b # 994 path = /var/spool/postfix/private/auth 995 mode = 0660 996 user = postfix 997 group = postfix } ; b # } ; b # } #service dovecot restart #service postfix reload b2: kim tra Tin hnh encode user:nv2, password:123 # perl -MMIME::Base64 -e 'print encode_base64("\000nv2\000123456");' AG52MgAxMjM0NTY= Chp AG52MgAxMjM0NTY= dng chng thc ~]# telnet localhost 25

Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. 220 mail.nhatnghe1.com ESMTP Postfix EHLO nhatnghe1.com 250-mail.nhatnghe1.com 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN AUTH PLAIN AG52MgAxMjM0NTY= 235 2.0.0 Authentication successful mail from:nv2@nhatnghe17.com 250 2.1.0 Ok rcpt to:nv1@nhatnghe17.com 250 2.1.5 Ok data 354 End data with <CR><LF>.<CR><LF> chao nv1 . 250 2.0.0 Ok: queued as 92A9A195B3B quit 221 2.0.0 Bye Connection closed by foreign host. [root@node1 ~]# Kim tra log # tail /var/log/maillog sasl_method=PLAIN, sasl_username=nv2 Trong outlook express phi check mc My server requires authentication mi gi mail c

Вам также может понравиться