Skip to content

Commit

Permalink
Allow wildcards in badmailfrom.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 12, 2009
1 parent 52543d3 commit 3fb0ea9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions qmail-smtpd.8
Expand Up @@ -81,6 +81,10 @@ may be of the form
.BR @\fIhost ,
meaning every address at
.IR host .
A line of the form
.BR .\fIdomain
means every address at every host ending with
.IR .domain .

.TP 5
.I clientca.pem
Expand Down
7 changes: 6 additions & 1 deletion qmail-smtpd.c
Expand Up @@ -255,8 +255,13 @@ int bmfcheck()
if (!bmfok) return 0;
if (constmap(&mapbmf,addr.s,addr.len - 1)) return 1;
j = byte_rchr(addr.s,addr.len,'@');
if (j < addr.len)
if (j < addr.len) {
if (constmap(&mapbmf,addr.s + j,addr.len - j - 1)) return 1;
for (j++; j < addr.len; j++)
if (addr.s[j] == '.') {
if(constmap(&mapbmf,addr.s + j,addr.len - j - 1)) return 1;
}
}
return 0;
}

Expand Down

0 comments on commit 3fb0ea9

Please sign in to comment.