diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:15:18 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-18 15:15:18 +0200 |
commit | 7b4d3ab22988d021d5f12b81aec746f7e486fa52 (patch) | |
tree | 651e78e316411a39baadadb1cfaca450e1351c7f /src/recipients.c | |
parent | 25f74781424d5e13f0211c08cce8c2a1d60b9aec (diff) |
update to 4.3.09
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); |