Skip to content

Commit

Permalink
smtpd.c: display command name in err_unimpl
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhangui committed Dec 21, 2024
1 parent 1aa35eb commit 1ba8e24
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 26 deletions.
2 changes: 2 additions & 0 deletions indimail-mta-x/doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Release @version@-@release@ Start 08/08/2024 End XX/XX/XXXX
/etc/indimail/resolv.conf exists
- 27/11/2024
8. smtpd.c: fixed spf error message display in err_spf()
- 21/12/2024
9. smtpd.c: display command name in err_unimpl()

* Tue Aug 06 2024 12:51:02 +0000 Manvendra Bhangui <[email protected]> 3.0.8-1.1%{?dist}
Release 3.0.8-1.1 Start 05/02/2024 End XX/XX/XXXX
Expand Down
2 changes: 1 addition & 1 deletion indimail-mta-x/qmail-dkim.9
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ will be set to \fI@controldir@/domainkeys/%/default\fR. The % will be
replaced by the domain in the From: header. If such a file does not exist,
then it will be set to \fI@controldir@/domainkeys/default\fR. If such a
private key exists, it will be used to sign the domain. You can also set
\fBDKIMKEY\fR to chose a key different from
\fBDKIMKEY\fR to choose a key different from
\fI@controldir@/domainkeys/%/default\fR. \fBDKIMKEY\fR can also have %
character that will be replaced by the domain in the From: header. If the
private key does not exist, qmail-dkim will exit with return code 35.
Expand Down
22 changes: 11 additions & 11 deletions indimail-mta-x/qmail-remote.9
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ Additional QMTP routes which have precedence over \fIsmtproutes\fR. QMTP
routes should obey the form \fIdomain\fR:\fIrelay\fR:\fIport\fR, without
any extra spaces. \fIqmtproutes\fR follows the same syntax as
\fIsmtproutes\fR. By default, \fBqmail-remote\fR connects to QMTP service
port 209. However you can chose a dedicated high-port for QMTP
port 209. However you can choose a dedicated high-port for QMTP
communication as defined in \fIqmtproutes\fR. If the recipient domain is
listed neither in \fIqmtproutes\fR nor in \fIsmtproutes\fR,
\fBqmail-remote\fR will choose the protocol according to MX priority. The
Expand Down Expand Up @@ -763,16 +763,16 @@ The filename can be overridden by the environment variable
.TP 5
.I tlsclientmethod
The TLS protocol list. Accepted values are TLSv1_2, TLSv1_3. The default is
TLSv1_2 for OpenSSL Version < 1.0.1. Without this control file OpenSSL
Version >= 1.0.1 uses TLS_client_method(3ossl) where the actual protocol
version used will be negotiated to the highest version mutually supported
by the client and the server. The supported protocols are TLSv1.2 and
TLSv1.3. The default location of SYSCONF/control can be overridden by
environment variable \fBCONTROLDIR\fR. You can specify the minimum and
maximum protocol by using min:max format. e.g. TLSv1_2:TLSv1_3. It is best
not to have this control file to let \fBqmail-remote\fR chose the highest
supported protocol.
The TLS protocol list. Accepted values are TLSv1_2 to use TLSv1.2, TLSv1_3
to use TLSv1.3. The default is TLSv1.2 for OpenSSL Version < 1.0.1. Without
this control file, OpenSSL Version >= 1.0.1 uses TLS_client_method(3ossl)
where the actual protocol version used will be negotiated to the highest
version mutually supported by the client and the server. The supported
protocols currently are TLSv1.2 and TLSv1.3. The default location of
SYSCONF/control can be overridden by environment variable \fBCONTROLDIR\fR.
You can specify the minimum and maximum protocol by using min:max format.
e.g. TLSv1_2:TLSv1_3. It is best not to have this control file to let
\fBqmail-remote\fR choose the highest supported protocol.
.TP 5
\fIclientcipherlist\fR | \fIclientciphersuite\fR
Expand Down
16 changes: 8 additions & 8 deletions indimail-mta-x/qmail-smtpd.9
Original file line number Diff line number Diff line change
Expand Up @@ -633,14 +633,14 @@ if \fBQREGEX\fR environment variable is set to 0 or 1.

.TP 5
.I tlsservermethod
The TLS protocol list. Accepted values are TLSv1_2, TLSv1_3. The default is
TLSv1.2 for OpenSSL Version < 1.0.1. OpenSSL Version >= 1.0.1 uses
TLS_server_method() where the actual protocol version used will be
negotiated to the highest version mutually supported by the client and the
server. The supported protocols are TLSv1.2 and TLSv1.3. You can specify
the minimum and maximum protocol by using min:max format. e.g.
TLSv1_2:TLSv1_3. It is best not to have this control file to let
\fBqmail-smtpd\fR chose the highest supported protocol.
The TLS protocol list. Accepted values are TLSv1_2 to use TLSv1.2,
TLSv1_3 to use TLSv1.3. The default is TLSv1.2 for OpenSSL Version < 1.0.1.
OpenSSL Version >= 1.0.1 uses TLS_server_method() where the actual protocol
version used will be negotiated to the highest version mutually supported
by the client and the server. The supported protocols currently are TLSv1.2
and TLSv1.3. You can specify the minimum and maximum protocol by using
min:max format. e.g. TLSv1_2:TLSv1_3. It is best not to have this control
file to let \fBqmail-smtpd\fR choose the highest supported protocol.

.TP 5
\fIservercipherlist\fR | \fIserverciphersuite\fR
Expand Down
22 changes: 16 additions & 6 deletions indimail-mta-x/smtpd.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* RCS log at bottom
* $Id: smtpd.c,v 1.329 2024-11-27 19:25:20+05:30 Cprogrammer Exp mbhangui $
* $Id: smtpd.c,v 1.330 2024-12-21 10:47:07+05:30 Cprogrammer Exp mbhangui $
*/
#include <unistd.h>
#include <fcntl.h>
Expand Down Expand Up @@ -161,7 +161,7 @@ static SSL *ssl = NULL;
static struct strerr *se;
#endif
static int tr_success = 0, penalty = 5;
static c_char *revision = "$Revision: 1.329 $";
static c_char *revision = "$Revision: 1.330 $";
static c_char *protocol = "SMTP";
static stralloc proto = { 0 };
static stralloc Revision = { 0 };
Expand Down Expand Up @@ -1490,13 +1490,20 @@ err_relay()
void
err_unimpl(const char *arg)
{
const char *ptr;

ptr = cmd_name();
if (!case_diffs(arg, "unimplemented"))
out("502 unimplemented (#5.5.1)\r\n", NULL);
out("502 command ", ptr, " not implemented (#5.5.1)\r\n", NULL);
else
if (!case_diffs(arg, "help"))
out("502 disabled by the lord in her infinite wisdom (#5.5.1)\r\n", NULL);
else
out("502 command ", arg, " not recognized (#5.5.2)\r\n", NULL);
else {
if (*arg)
out("502 command ", ptr, " ", arg, " not recognized (#5.5.2)\r\n", NULL);
else
out("502 command ", ptr, " not recognized (#5.5.2)\r\n", NULL);
}
flush();
}

Expand Down Expand Up @@ -7519,6 +7526,9 @@ addrrelay()

/*
* $Log: smtpd.c,v $
* Revision 1.330 2024-12-21 10:47:07+05:30 Cprogrammer
* display command name in err_unimpl()
*
* Revision 1.329 2024-11-27 19:25:20+05:30 Cprogrammer
* fixed spf error message display in err_spf()
*
Expand Down Expand Up @@ -7966,7 +7976,7 @@ addrrelay()
const char *
getversion_smtpd_c()
{
const char *x = "$Id: smtpd.c,v 1.329 2024-11-27 19:25:20+05:30 Cprogrammer Exp mbhangui $";
const char *x = "$Id: smtpd.c,v 1.330 2024-12-21 10:47:07+05:30 Cprogrammer Exp mbhangui $";

x++;
return revision + 11;
Expand Down

0 comments on commit 1ba8e24

Please sign in to comment.