* fixup @'s in usernames when doing smtpauth client
authorWilfried Göesgens <willi@citadel.org>
Thu, 22 Feb 2007 16:58:07 +0000 (16:58 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 22 Feb 2007 16:58:07 +0000 (16:58 +0000)
* ignore returns from db_input

citadel/debian/changelog
citadel/debian/citadel-server.config
citadel/serv_smtp.c

index 53a271e0593c98a12a8d26c1c79706a99959a6e6..70f8f7f440b0cdd7bbaf45cab0292cfbd0fa7f92 100644 (file)
@@ -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 <citadel@outgesourced.org>  Wed, 07 Feb 2007 00:12:00 +0100
+
+citadel (7.03-7) unstable; urgency=high
+
+  * fixup in quoted printable decoder
+
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Wed, 07 Feb 2007 00:12:00 +0100
+
 citadel (7.03-6) unstable; urgency=high
 
   * fixup in quoted printable decoder
index 390e0c335c9b4ad20cd02fd4547b25d1adaaa9ec..caa3cb81c1021c045533d2cc060241ea8988cecd 100755 (executable)
@@ -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
index 56d1fb90a35e2244cdb7abb5fc3e99c68a23ceb3..6aaaa9296a689d119d225894dbf0e33d50fcae36 100644 (file)
@@ -1092,20 +1092,29 @@ void smtp_try(const char *key, const char *addr, int *status,
 
        sock = (-1);
        for (mx=0; (mx<num_mxhosts && sock < 0); ++mx) {
+               char *endpart;
                extract_token(buf, mxhosts, mx, '|', sizeof buf);
                strcpy(mx_user, "");
                strcpy(mx_pass, "");
                if (num_tokens(buf, '@') > 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);