summaryrefslogtreecommitdiff
path: root/src/qmail-smtpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmail-smtpd.c')
-rw-r--r--src/qmail-smtpd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/qmail-smtpd.c b/src/qmail-smtpd.c
index 3ca302c..f01cbee 100644
--- a/src/qmail-smtpd.c
+++ b/src/qmail-smtpd.c
@@ -677,7 +677,7 @@ int bmfcheck()
if (!stralloc_append(&eddr,"=")) die_nomem();
if (!stralloc_0(&eddr)) die_nomem();
case_lowerb(eddr.s,eddr.len);
- if (case_diffb(remotehost + rlen - dlen,eddr.s + at + 1,dlen))
+ if (case_diffb(remotehost + rlen - dlen,dlen,eddr.s + at + 1))
if (constmap(&mapbmf,eddr.s + at,eddr.len - at - 1)) return -3;
/* '~' extended address for MISMATCHED Domains */
@@ -795,10 +795,9 @@ int localaddr(char *mf)
return mfrules(fdmav,remoteip,remotehost,remoteinfo,mf);
else {
if (str_len(localmfcheck) > 1) {
- case_lowerb(localmfcheck,str_len(localmfcheck));
at = byte_rchr(mf,mflen,'@');
if (at < mflen)
- if (!case_diffb(localmfcheck,mf + at + 1,mflen - at - 1)) return 2;
+ if (!case_diffb(localmfcheck,mflen - at - 1,mf + at + 1)) return 2;
}
if (addrallowed(mf)) return 3;
return -2;
@@ -992,11 +991,11 @@ void smtp_mail(char *arg)
if (!stralloc_0(&protocol)) die_nomem();
if ((starttls > 1) && !seentls) {
- err_tlsreq("Reject::TLS::missing",protocol.s,remoteip,remotehost,helohost.s);
+ err_tlsreq("Reject::TLS::Missing",protocol.s,remoteip,remotehost,helohost.s);
return;
}
if (smtpauth > 10 && !seenauth) {
- err_authreq("Reject::AUTH::missing",protocol.s,remoteip,remotehost,helohost.s);
+ err_authreq("Reject::AUTH::Missing",protocol.s,remoteip,remotehost,helohost.s);
return;
}
if (!addrparse(arg)) { err_syntax(); return; }
@@ -1626,20 +1625,20 @@ void smtp_auth(char *arg)
if ((starttls > 1) && !seentls) {
if (!stralloc_append(&protocol,"A")) die_nomem();
if (!stralloc_0(&protocol)) die_nomem();
- err_authsetup("Reject::TLS::required",protocol.s,remoteip,remotehost,helohost.s);
+ err_authsetup("Reject::TLS::Required",protocol.s,remoteip,remotehost,helohost.s);
return;
}
if ((starttls > 1) && !seenhelo) {
if (!stralloc_append(&protocol,"A")) die_nomem();
if (!stralloc_0(&protocol)) die_nomem();
- err_tlsreq("Reject::AUTH::invalid",protocol.s,remoteip,remotehost,helohost.s);
+ err_tlsreq("Reject::AUTH::Invalid",protocol.s,remoteip,remotehost,helohost.s);
return;
}
if (!smtpauth) { out("503 auth not available (#5.3.3)\r\n"); flush(); _exit(0); }
if (smtpauth && !*childargs) {
- err_authsetup("Reject::AUTH::setup",protocol.s,remoteip,remotehost,helohost.s);
+ err_authsetup("Reject::AUTH::Setup",protocol.s,remoteip,remotehost,helohost.s);
flush(); _exit(1);
}
if (seenauth) { err_authd(); return; }