diff -ur nmh-1.1~/h/mts.h nmh-1.1/h/mts.h
--- nmh-1.1~/h/mts.h	Wed Dec 13 20:30:44 2000
+++ nmh-1.1/h/mts.h	Mon Jan 26 17:06:18 2004
@@ -61,6 +61,7 @@
 extern char *clientname;
 extern char *servers;
 extern char *pophost;
+extern char *usesasl;
 
 /*
  * BBoards-specific variables
diff -ur nmh-1.1~/sbr/mts.c nmh-1.1/sbr/mts.c
--- nmh-1.1~/sbr/mts.c	Tue Sep 30 12:58:43 2003
+++ nmh-1.1/sbr/mts.c	Mon Jan 26 17:06:18 2004
@@ -84,6 +84,7 @@
 char *clientname = NULL;
 char *servers    = "localhost \01localnet";
 char *pophost    = "";
+char *usesasl    = NULL;
 
 /*
  * BBoards-specific variables
@@ -145,6 +146,7 @@
     { "servers", &servers },
     { "pophost", &pophost },
     { "bbdomain", &bb_domain },
+    { "sasl", &usesasl },
 
 #ifdef BPOP
     { "popbbhost", &popbbhost },
diff -ur nmh-1.1~/uip/inc.c nmh-1.1/uip/inc.c
--- nmh-1.1~/uip/inc.c	Tue Sep 30 12:58:14 2003
+++ nmh-1.1/uip/inc.c	Mon Jan 26 17:06:18 2004
@@ -129,7 +129,9 @@
     { "kpop", KPOPminc (-4) },
 #define SASLSW                    24
     { "sasl", SASLminc(-4) },
-#define SASLMECHSW                25
+#define NOSASLSW                  25
+    { "nosasl", SASLminc(-6) },
+#define SASLMECHSW                26
     { "saslmech", SASLminc(-8) },
     { NULL, 0 }
 };
@@ -303,6 +305,9 @@
 	snoop++;
 #endif /* POP */
 
+    if (usesasl)
+	sasl = 1;
+
     rpop = 0;
 
     while ((cp = *argp++)) {
@@ -439,6 +444,10 @@
 		sasl++;
 		continue;
 	
+	    case NOSASLSW:
+		sasl--;
+		continue;
+	
 	    case SASLMECHSW:
 		if (!(saslmech = *argp++) || *saslmech == '-')
 		    adios (NULL, "missing argument to %s", argp[-2]);
diff -ur nmh-1.1~/uip/msgchk.c nmh-1.1/uip/msgchk.c
--- nmh-1.1~/uip/msgchk.c	Tue Jul  2 18:09:14 2002
+++ nmh-1.1/uip/msgchk.c	Mon Jan 26 17:06:18 2004
@@ -83,7 +83,9 @@
     { "kpop", KPOPminc (-4) },
 #define SASLSW                  14
     { "sasl", SASLminc(-4) },
-#define SASLMECHSW		15
+#define NOSASLSW                15
+    { "nosasl", SASLminc(-6) },
+#define SASLMECHSW		16
     { "saslmech", SASLminc(-5) },
     { NULL, 0 }
 };
@@ -156,6 +158,9 @@
 	snoop++;
 #endif
 
+    if (usesasl)
+	sasl = 1;
+
     rpop = 0;
 
     while ((cp = *argp++)) {
@@ -233,6 +238,10 @@
 		    sasl++;
 		    continue;
 		
+		case NOSASLSW:
+		    sasl--;
+		    continue;
+		
 		case SASLMECHSW:
 		    if (!(saslmech = *argp++) || *saslmech == '-')
 			adios (NULL, "missing argument to %s", argp[-2]);
diff -ur nmh-1.1~/uip/popsbr.c nmh-1.1/uip/popsbr.c
--- nmh-1.1~/uip/popsbr.c	Fri Sep  5 17:07:49 2003
+++ nmh-1.1/uip/popsbr.c	Mon Jan 26 17:06:19 2004
@@ -270,10 +270,15 @@
      * and get out a possible initial challenge
      */
 
-    result = sasl_client_start(conn,
-			       (const char *) (mech ? mech : server_mechs),
+    if (mech)
+       strcpy(server_mechs, mech);
+    result = NOTOK;
+    for (mech = strtok(server_mechs, " "); result!=SASL_OK && result!=SASL_CONTINUE && mech; mech = strtok(NULL, " ")) {
+       result = sasl_client_start(conn,
+			       (const char *) mech,
 			       NULL, (const char **) &buf,
 			       &buflen, &chosen_mech);
+    }
 
     if (result != SASL_OK && result != SASL_CONTINUE) {
 	snprintf(response, sizeof(response), "SASL client start failed: %s",
@@ -519,7 +524,9 @@
 		if (sasl) {
 		    if (pop_auth_sasl(user, host, mech) != NOTOK)
 			return OK;
-		} else
+		    pass = NULL;
+		    ruserpass (host, &user, &pass);
+		}
 #  endif /* CYRUS_SASL */
 		if (command ("USER %s", user) != NOTOK
 		    && command ("%s %s", rpop ? "RPOP" : (pophack++, "PASS"),
diff -ur nmh-1.1~/uip/post.c nmh-1.1/uip/post.c
--- nmh-1.1~/uip/post.c	Tue Jul  2 18:09:15 2002
+++ nmh-1.1/uip/post.c	Mon Jan 26 17:06:19 2004
@@ -140,9 +140,11 @@
     { "queued", -6 },
 #define SASLSW                   37
     { "sasl", SASLminc(-4) },
-#define SASLMECHSW               38
+#define NOSASLSW                 38
+    { "nosasl", SASLminc(-6) },
+#define SASLMECHSW               39
     { "saslmech", SASLminc(-5) },
-#define USERSW                   39
+#define USERSW                   40
     { "user", SASLminc(-4) },
     { NULL, 0 }
 };
@@ -350,6 +352,9 @@
     mmdf_init (invo_name);
 #endif /* MMDFMTS and MMDFII */
 
+    if (usesasl)
+	sasl = 1;
+
     while ((cp = *argp++)) {
 	if (*cp == '-') {
 	    switch (smatch (++cp, switches)) {
@@ -541,6 +546,10 @@
 		    sasl++;
 		    continue;
 		
+		case NOSASLSW:
+		    sasl--;
+		    continue;
+		
 		case SASLMECHSW:
 		    if (!(saslmech = *argp++) || *saslmech == '-')
 			adios (NULL, "missing argument to %s", argp[-2]);
diff -ur nmh-1.1~/uip/send.c nmh-1.1/uip/send.c
--- nmh-1.1~/uip/send.c	Tue Sep 30 12:58:43 2003
+++ nmh-1.1/uip/send.c	Mon Jan 26 17:08:22 2004
@@ -98,11 +98,13 @@
     { "snoop", -5 },
 #define SASLSW                37
     { "sasl", SASLminc(-4) },
-#define SASLMECHSW            38
+#define NOSASLSW              38
+    { "nosasl", SASLminc(-6) },
+#define SASLMECHSW            39
     { "saslmech", SASLminc(-5) },
-#define USERSW                39
+#define USERSW                40
     { "user", SASLminc(-4) },
-#define ATTACHSW              40
+#define ATTACHSW              41
     { "attach", 6 },
     { NULL, 0 }
 };
@@ -260,6 +262,7 @@
 		case SOMLSW: 
 		case SNOOPSW: 
 		case SASLSW:
+		case NOSASLSW:
 		    vec[vecp++] = --cp;
 		    continue;
 
diff -ur nmh-1.1~/uip/whatnowsbr.c nmh-1.1/uip/whatnowsbr.c
--- nmh-1.1~/uip/whatnowsbr.c	Mon Aug 19 16:50:42 2002
+++ nmh-1.1/uip/whatnowsbr.c	Mon Jan 26 17:06:19 2004
@@ -999,11 +999,13 @@
     { "nodraftfolder", -3 },
 #define SASLSW           36
     { "sasl", SASLminc(-4) },
-#define SASLMECHSW       37
+#define NOSASLSW         37
+    { "nosasl", SASLminc(-6) },
+#define SASLMECHSW       38
     { "saslmech", SASLminc(-5) },
-#define USERSW           38
+#define USERSW           39
     { "user", SASLminc(-4) },
-#define SNDATTACHSW       39
+#define SNDATTACHSW       40
     { "attach file", 6 },
     { NULL, 0 }
 };
@@ -1157,6 +1159,7 @@
 		case SOMLSW:
 		case SNOOPSW:
 		case SASLSW:
+		case NOSASLSW:
 		    vec[vecp++] = --cp;
 		    continue;
 
