Skip to content

Commit

Permalink
lmtp_sieve.c: sieve scripts are stores WITHOUT '.' -> '^' translation
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmurchison committed Mar 5, 2018
1 parent c7445f6 commit 73af8e1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions imap/lmtp_sieve.c
Expand Up @@ -1586,13 +1586,6 @@ sieve_interp_t *setup_sieve(struct sieve_interp_ctx *ctx)
return interp;
}

static void _rm_dots(char *p)
{
for (; *p; p++) {
if (*p == '.') *p = '^';
}
}

static int sieve_find_script(const char *user, const char *domain,
const char *script, char *fname, size_t size)
{
Expand Down Expand Up @@ -1629,10 +1622,7 @@ static int sieve_find_script(const char *user, const char *domain,
}
else {
char hash = (char) dir_hash_c(user, config_fulldirhash);
char *usercopy = xstrdup(user); // stupid hashing of names, we SHOULD just allow dots on disk
_rm_dots(usercopy);
len += snprintf(fname+len, size-len, "/%c/%s/", hash, usercopy);
free(usercopy);
len += snprintf(fname+len, size-len, "/%c/%s/", hash, user);

if (!script) { /* default script */
char *bc_fname;
Expand Down

0 comments on commit 73af8e1

Please sign in to comment.