- FREE (&c);
- }
- /* old PINE-compatibility code */
- else
- {
- FREE (&c);
- if (sscanf (path, "{%127[^}]}", tmp) != 1)
- return -1;
-
- c = strchr (path, '}');
- if (!c)
- return -1;
- else
- /* walk past closing '}' */
- mx->mbox = safe_strdup (c+1);
-
- if ((c = strrchr (tmp, '@')))
- {
- *c = '\0';
- strfcpy (mx->account.user, tmp, sizeof (mx->account.user));
- strfcpy (tmp, c+1, sizeof (tmp));
- mx->account.flags |= M_ACCT_USER;
- }
-
- if ((n = sscanf (tmp, "%127[^:/]%127s", mx->account.host, tmp)) < 1)
- {
- dprint (1, (debugfile, "imap_parse_path: NULL host in %s\n", path));
- FREE (&mx->mbox);
- return -1;
- }
-
- if (n > 1) {
- if (sscanf (tmp, ":%hd%127s", &(mx->account.port), tmp) >= 1)
- mx->account.flags |= M_ACCT_PORT;
- if (sscanf (tmp, "/%s", tmp) == 1)
- {
- if (!ascii_strncmp (tmp, "ssl", 3))
- mx->account.flags |= M_ACCT_SSL;
- else
- {
- dprint (1, (debugfile, "imap_parse_path: Unknown connection type in %s\n", path));
- FREE (&mx->mbox);
- return -1;
- }
- }
- }
- }
-
-#ifdef USE_SSL
- if (option (OPTIMAPFORCESSL))
- mx->account.flags |= M_ACCT_SSL;
-#endif