From: Wilfried Göesgens Date: Thu, 22 Feb 2007 16:58:07 +0000 (+0000) Subject: * fixup @'s in usernames when doing smtpauth client X-Git-Tag: v7.86~3563 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=346bf5c93d50edb331ccd0856c197f44949a40bd * fixup @'s in usernames when doing smtpauth client * ignore returns from db_input --- diff --git a/citadel/debian/changelog b/citadel/debian/changelog index 53a271e05..70f8f7f44 100644 --- a/citadel/debian/changelog +++ b/citadel/debian/changelog @@ -1,3 +1,16 @@ +citadel (7.03-7) unstable; urgency=high + + * fixup @'s in usernames when doing smtpauth client + * ignore returns from db_input + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + +citadel (7.03-7) unstable; urgency=high + + * fixup in quoted printable decoder + + -- Wilfried Goesgens Wed, 07 Feb 2007 00:12:00 +0100 + citadel (7.03-6) unstable; urgency=high * fixup in quoted printable decoder diff --git a/citadel/debian/citadel-server.config b/citadel/debian/citadel-server.config index 390e0c335..caa3cb81c 100755 --- a/citadel/debian/citadel-server.config +++ b/citadel/debian/citadel-server.config @@ -9,18 +9,17 @@ if test -n "$2"; then if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \ -o $1 = reconfigure then - db_input high citadel/ServerIPAddress - db_input high citadel/Administrator - db_input high citadel/LoginType - db_input high citadel/Installnote + db_input high citadel/ServerIPAddress || true + db_input high citadel/Administrator || true + db_input high citadel/LoginType || true db_go fi else if test "$1" = "configure"; then - db_input high citadel/ServerIPAddress - db_input high citadel/Administrator - db_input high citadel/LoginType - db_input high citadel/Installnote + db_input high citadel/ServerIPAddress || true + db_input high citadel/Administrator || true + db_input high citadel/LoginType || true + db_input high citadel/Installnote || true db_go fi fi diff --git a/citadel/serv_smtp.c b/citadel/serv_smtp.c index 56d1fb90a..6aaaa9296 100644 --- a/citadel/serv_smtp.c +++ b/citadel/serv_smtp.c @@ -1092,20 +1092,29 @@ void smtp_try(const char *key, const char *addr, int *status, sock = (-1); for (mx=0; (mx 1) { - extract_token(mx_user, buf, 0, '@', sizeof mx_user); - if (num_tokens(mx_user, ':') > 1) { - extract_token(mx_pass, mx_user, 1, ':', sizeof mx_pass); - remove_token(mx_user, 1, ':'); + strcpy (mx_user, buf); + endpart = strrchr(mx_user, '@'); + *endpart = '\0'; + strcpy (mx_host, endpart + 1); + endpart = strrchr(mx_user, ':'); + if (endpart != NULL) { + strcpy(mx_pass, endpart+1); + *endpart = '\0'; } - remove_token(buf, 0, '@'); } - extract_token(mx_host, buf, 0, ':', sizeof mx_host); - extract_token(mx_port, buf, 1, ':', sizeof mx_port); - if (!mx_port[0]) { + else + strcpy (mx_host, buf); + endpart = strrchr(mx_host, ':'); + if (endpart != 0){ + *endpart = '\0'; + strcpy(mx_port, endpart + 1); + } + else { strcpy(mx_port, "25"); } lprintf(CTDL_DEBUG, "Trying %s : %s ...\n", mx_host, mx_port);