diff options
Diffstat (limited to 'src/recipients.c')
-rw-r--r-- | src/recipients.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/recipients.c b/src/recipients.c index 40d7ffe..ad222ee 100644 --- a/src/recipients.c +++ b/src/recipients.c @@ -176,7 +176,7 @@ int recipients_parse(char *rhost,int rlen,char *addr,char *rkey,int klen,char *v if (k && rlen >= k) if (!str_diffn(line.s,rhost + rlen - k - 1,k - 1)) seenhost = 3; if (u && rlen >= u) - if (!str_diffn(line.s,rhost + rlen - u - 2,u - 2)) seenhost = 4; + if (!str_diffn(line.s,rhost + rlen - u - 1,u - 1)) seenhost = 4; } if (!seenhost) /* pass-thru */ if (!str_diffn(line.s,"!*",2)) return 5; @@ -190,19 +190,19 @@ int recipients_parse(char *rhost,int rlen,char *addr,char *rkey,int klen,char *v if (r == 111) return r; } - if (u && u < line.len) /* qmail-users */ + if (u && u < line.len) /* qmail-users */ if (seenhost || !str_diffn(line.s,"*",1)) { fdrcps = open_read("users/assign.cdb"); if (fdrcps != -1) { cdb_init(&cdb,fdrcps); - r = cdb_find(&cdb,ukey,ulen - 2); + r = cdb_find(&cdb,ukey,ulen - 1); cdb_free(&cdb); close(fdrcps); if (r) return 3; } } - if (j && j < line.len) /* cdb */ + if (j && j < line.len) /* cdb */ if (seenhost || !str_diffn(line.s,"*",1)) { fdrcps = open_read(line.s + j + 1); if (fdrcps != -1) { @@ -265,9 +265,9 @@ int recipients(char *buf,int len) case_lowerb(key.s,key.len); case_lowerb(domain.s,domain.len); - if (!stralloc_copys(&ukey,"!=")) return -2; + if (!stralloc_copys(&ukey,"!")) return -2; if (!stralloc_cat(&ukey,&user)) return -2; - if (!stralloc_0(&ukey)) return -2; /* \0\0 terminated */ + if (!stralloc_0(&ukey)) return -2; /* \0 terminated */ case_lowerb(ukey.s,ukey.len); |