#include "mutt.h"
#include "imap.h"
+#include "imap_private.h"
#include "imap_socket.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
return -1;
}
+void imap_set_ssl (IMAP_MBOX *mx)
+{
+ if (! (mx->flags & M_IMAP_PORT))
+ mx->port = IMAP_SSL_PORT;
+ mx->socktype = M_NEW_SSL_SOCKET;
+ mx->flags |= M_IMAP_TYPE;
+}
+
static int ssl_socket_open_err (CONNECTION *conn)
{
mutt_error (_("SSL disabled due the lack of entropy"));
extern char *SslEntropyFile;
extern int ssl_socket_setup (CONNECTION *conn);
+extern void imap_set_ssl (IMAP_MBOX *mx);
#endif
{
#ifdef USE_SSL
if (!strcmp (mx->type, "ssl"))
- {
- if (! (mx->flags & M_IMAP_PORT))
- mx->port = IMAP_SSL_PORT;
- mx->socktype = M_NEW_SSL_SOCKET;
- mx->flags |= M_IMAP_TYPE;
- }
+ imap_set_ssl (mx);
else
#endif
{
return (-1);
}
}
+#ifdef USE_SSL
+ else if (option (OPTIMAPFORCESSL))
+ imap_set_ssl (mx);
+#endif
}
-
+
return 0;
}
** This variable configures how often (in seconds) IMAP should look for
** new mail.
*/
+# ifdef USE_SSL
+ { "imap_force_ssl", DT_BOOL, R_NONE, OPTIMAPFORCESSL, 0 },
+ /*
+ ** .pp
+ ** If this variable is set, Mutt will always use SSL when
+ ** connecting to IMAP servers.
+ */
+# endif
{ "imap_list_subscribed", DT_BOOL, R_NONE, OPTIMAPLSUB, 0 },
/*
** .pp
OPTIMAPLSUB,
OPTIMAPPASSIVE,
OPTIMAPSERVERNOISE,
+# ifdef USE_SSL
+ OPTIMAPFORCESSL,
+# endif
#endif
#ifdef USE_SSL
OPTSSLV2,