This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

Attachment 'sieve-auth-command.pl'

Download

   1 #!/usr/bin/perl
   2 #
   3 # auth-command.pl
   4 # ---------------
   5 #
   6 # Generates ManageSieve AUTHENTICATE command for manually testing the protocol 
   7 # using telnet or gnutls-cli (TLS)
   8 #
   9 # Usage:
  10 #   auth-command.pl <username> <password>
  11 #
  12 # Prints the AUTHENTICATE "PLAIN" "<encoded>" command on standard out. 
  13 #
  14 
  15 use MIME::Base64;
  16 
  17 use strict;
  18 
  19 my $username = shift;
  20 my $password = shift;
  21 
  22 my $userpass = "\x00".$username."\x00".$password."";
  23 my $encode=encode_base64($userpass);
  24 
  25 $encode =~ s/^\s+//;
  26 $encode =~ s/\s+$//;
  27 
  28 print "AUTHENTICATE \"PLAIN\" \"$encode\"\r\n";

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2017-03-28 09:33:02, 1.9 KB) [[attachment:avelsieve-1.9.7-dovecot.diff]]
  • [get | view] (2017-03-28 09:33:02, 0.5 KB) [[attachment:sieve-auth-command.pl]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.