A solução alternativa era usar a codificação openssl base64 da seguinte forma:
( echo "to: [email protected]"
echo "subject: Message from the server"
echo "mime-version: 1.0"
echo "content-type: multipart/related; boundary=messageBoundary"
echo
echo "--messageBoundary"
echo "content-type: text/plain"
echo
echo "Please find the document attached."
echo
echo "--messageBoundary"
echo "content-type: text; name=test.txt"
echo "content-transfer-encoding: base64"
echo
openssl base64 < /tmp/test.txt) | sendmail -t -i