#!/bin/bash
#########################################################
# Program: exim4_authbase64
# Purpose: Generate a base64 string of a user name and 
#          password combination for use with AUTH PLAIN
# Author : Stuart Winter <stuart@polplex.co.uk>
#          based on the information in Exim's spec.txt
#          document
# Date...: 23-Nov-03
#########################################################

if [ $# -ne 2 ]; then
   echo "Usage: $( basename $0 ) <username> <password>"
   exit 3
fi

echo -ne "\000$1\000$2" | openssl enc -a
