This page is part of the EmailServer article.
Troubleshooting SASL authentication
To ensure that your authentication process works fine, we'll check what the server reports when we try to feed it a correct login.
Since logins are base64 encoded, copy and paste the following in a file that you call encode_sasl_plain.pl
(don't forget to chmod 755
to make it executable):
#!/usr/bin/perl
use strict;
use MIME::
Base64;
if ( $
#ARGV != 1 ) {
die "Usage: encode_sasl_plain.pl <username> <password>\n";
}
print encode_base64
("$ARGV[0]\0$ARGV[0]\0$ARGV[1]");
exit 0;
Then use it to encode a username/password pair as it would be expected by the mail server for authentication. Here I use the existing administrator user (the account must exist on the system):
# encode_sasl_plain.pl administrator 123456
Then, talk to your mail server manually:
- # telnet localhost 25
- Trying 127.0.0.1...
- Connected to localhost.localdomain (127.0.0.1).
- Escape character is '^]'.
- 220 mail.example.com ESMTP MyOwnPostOffice
- EHLO test.faraway.com
- 250-mail.example.com
- 250-PIPELINING
- 250-SIZE 20971520
- 250-VRFY
- 250-ETRN
- 250-AUTH LOGIN DIGEST-MD5 PLAIN CRAM-MD5
- 250-AUTH=LOGIN DIGEST-MD5 PLAIN CRAM-MD5
- 250 8BITMIME
- AUTH PLAIN YWRtaW5pc3RyYXRvcgBhZG1pbmlzdHJhdG9yADEyMzQ1Ng==
- 235 Authentication successful
- quit
- 221 Bye
The only lines you will need to type are 6, 15, 17. The others are the server's responses.
< MboxMaildirMigration | AWStats >
yusufMonday 11 September 2006, at 15:25 GMT+8 [X] my hpjet 7130 cann not align printing heads why ?