Search Site:

About

Linux

Printers?

Programming

Windows?

Download

Skins

Edit - To Do - AllRecentChanges

Recent Changes Printable View Page History Edit Page

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;

Testing your Authentication Config

This section was inspired from the very complete book Postfix: the Definitive Guide from O'Reilly. Highly reommended!

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:

  1. # telnet localhost 25
  2. Trying 127.0.0.1...
  3. Connected to localhost.localdomain (127.0.0.1).
  4. Escape character is '^]'.
  5. 220 mail.example.com ESMTP MyOwnPostOffice
  6. EHLO test.faraway.com
  7. 250-mail.example.com
  8. 250-PIPELINING
  9. 250-SIZE 20971520
  10. 250-VRFY
  11. 250-ETRN
  12. 250-AUTH LOGIN DIGEST-MD5 PLAIN CRAM-MD5
  13. 250-AUTH=LOGIN DIGEST-MD5 PLAIN CRAM-MD5
  14. 250 8BITMIME
  15. AUTH PLAIN YWRtaW5pc3RyYXRvcgBhZG1pbmlzdHJhdG9yADEyMzQ1Ng==
  16. 235 Authentication successful
  17. quit
  18. 221 Bye

The only lines you will need to type are 6, 15, 17. The others are the server's responses.

< MboxMaildirMigration | AWStats >

Comments
yusufMonday 11 September 2006, at 15:25 GMT+8 [X]
my hpjet 7130 cann not align printing heads why ?
Enter your comment (no links allowed): Author:

Edit Page - Page History - Printable View - Recent Changes - WikiHelp - Search - RSS -
Page last modified on Monday 04 May 2009, at 05:48 GMT+8 - Viewed 2627 times