--- POP3Svr.cpp.orig	2010-02-26 04:33:44.000000000 +0100
+++ POP3Svr.cpp	2010-05-01 08:34:34.000000000 +0200
@@ -26,12 +26,16 @@
 #include "ShBlocks.h"
 #include "SList.h"
 #include "BuffSock.h"
+#ifdef WITH_SSL
 #include "SSLBind.h"
+#endif
 #include "ResLocks.h"
 #include "MiscUtils.h"
 #include "StrUtils.h"
 #include "MD5.h"
+#ifdef WITH_SSL
 #include "SSLConfig.h"
+#endif
 #include "SvrUtils.h"
 #include "UsrUtils.h"
 #include "UsrAuth.h"
@@ -525,9 +529,11 @@
 {
 	char const *pszSTLS = "";
 
+#ifdef WITH_SSL
 	if (SvrTestConfigFlag("EnablePOP3-TLS", true, POP3S.hSvrConfig) &&
 	    strcmp(BSckBioName(hBSock), BSSL_BIO_NAME) != 0)
 		pszSTLS = "STLS\r\n";
+#endif
 
 	BSckVSendString(hBSock, POP3S.pPOP3Cfg->iTimeout,
 			"+OK Capability list follows\r\n"
@@ -542,6 +548,7 @@
 	return 0;
 }
 
+#ifdef WITH_SSL
 static int POP3SslEnvCB(void *pPrivate, int iID, void const *pData)
 {
 	POP3Session *pPOP3S = (POP3Session *) pPrivate;
@@ -553,7 +560,9 @@
 
 	return 0;
 }
+#endif
 
+#ifdef WITH_SSL
 static int POP3HandleCmd_STLS(char const *pszCommand, BSOCK_HANDLE hBSock,
 			      POP3Session &POP3S)
 {
@@ -610,6 +619,7 @@
 
 	return 0;
 }
+#endif
 
 static int POP3HandleCmd_STAT(char const *pszCommand, BSOCK_HANDLE hBSock,
 			      POP3Session &POP3S)
@@ -863,8 +873,10 @@
 		iCmdResult = POP3HandleCmd_APOP(pszCommand, hBSock, POP3S);
 	else if (StrCmdMatch(pszCommand, "CAPA"))
 		iCmdResult = POP3HandleCmd_CAPA(pszCommand, hBSock, POP3S);
+#ifdef WITH_SSL
 	else if (StrCmdMatch(pszCommand, "STLS"))
 		iCmdResult = POP3HandleCmd_STLS(pszCommand, hBSock, POP3S);
+#endif
 	else if (StrCmdMatch(pszCommand, "STAT"))
 		iCmdResult = POP3HandleCmd_STAT(pszCommand, hBSock, POP3S);
 	else if (StrCmdMatch(pszCommand, "LIST"))
@@ -955,6 +967,7 @@
 		return ErrorPop();
 	}
 
+#ifdef WITH_SSL
 	/*
 	 * Do we need to switch to TLS?
 	 */
@@ -987,6 +1000,7 @@
 		SysFree(SslE.pszIssuer);
 		SysFree(SslE.pszSubject);
 	}
+#endif
 
 	/* Check IP permission */
 	if (POP3CheckPeerIP(pThCtx->SockFD) < 0) {
