Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Postfix Documentation
Previous Page Home Next Page

Testing SASL authentication in the Postfix SMTP server

To test the server side, connect to the SMTP server, and you should be able to have a conversation as shown below. Information sent by the client is shown in bold font.

220 server.example.com ESMTP Postfix
EHLO client.example.com
250-server.example.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH DIGEST-MD5 PLAIN CRAM-MD5
250 8BITMIME
AUTH PLAIN dGVzdAB0ZXN0AHRlc3RwYXNz
235 Authentication successful

Instead of dGVzdAB0ZXN0AHRlc3RwYXNz, specify the base64 encoded form of username\0username\0password (the \0 is a null byte). The example above is for a user named `test' with password `testpass'.

In order to generate base64 encoded authentication information you can use one of the following commands:

% printf 'username\0username\0password' | mmencode 
% perl -MMIME::Base64 -e \
    'print encode_base64("username\0username\0password");'

The mmencode command is part of the metamail software. MIME::Base64 is available from https://www.cpan.org/.

Caution: when posting logs of the SASL negotiations to public lists, please keep in mind that username/password information is trivial to recover from the base64-encoded form.

Postfix Documentation
Previous Page Home Next Page