commit 4a8170df746adb5932fae631a9dd95f8ca19c9b2
parent cf169fee8126a148a834165db265aad4172371d0
Author: Ellenor Bjornsdottir <ellenor@umbrellix.net>
Date: Thu, 20 Oct 2022 02:52:20 +0000
things for sendmail
Diffstat:
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/sendmail.c b/src/sendmail.c
@@ -20,6 +20,17 @@ void _noreturn_ die_usage()
_exit(100);
}
+void _noreturn_ die_exptcps()
+{
+ substdio_putsflush(subfderr,"sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]\n");
+ substdio_putsflush(subfderr,"This sendmail is qmail-sendmail from Nightmare Mail. It is not capable of running a\n");
+ substdio_putsflush(subfderr,"TCP service by itself. Try running bin/qmail-smtpd (or bin/nmail-smtpd if you have\n");
+ substdio_putsflush(subfderr,"UCSPI-TLS) from port 25 in inetd or in a UCSPI TCP nowait server.\n");
+ substdio_putsflush(subfderr,"'Backgrounding' should be achieved by running your inetd or UCSPI TCP server from a\n");
+ substdio_putsflush(subfderr,"supervisory engine like systemd, initware, runit, or S6.\n");
+ _exit(100);
+}
+
char *smtpdarg[] = { "bin/qmail-smtpd", 0 };
void _noreturn_ smtpd()
{
@@ -102,17 +113,17 @@ int main(int argc, char **argv)
case 'f': sender = optarg; break;
case 'F': if (!env_put2("MAILNAME",optarg)) nomem(); break;
case 'p': break; /* could generate a Received line from optarg */
- case 'v': break;
- case 'i': break; /* what an absurd concept */
+ case 'v': break; /* we don't even bother with best effort verbosity. */
+ case 'i': break; /* qmsendmail is already transparent to leading dots. */
case 'x': break; /* SVR4 stupidity */
case 'm': break; /* twisted-paper-path blindness, incompetent design */
case 'e': break; /* qmail has only one error mode */
case 'o':
switch(optarg[0]) {
case 'd': break; /* qmail has only one delivery mode */
- case 'e': break; /* see 'e' above */
- case 'i': break; /* see 'i' above */
- case 'm': break; /* see 'm' above */
+ case 'e': break; /* qmail only has one error mode */
+ case 'i': break; /* qmail does not ignore dots */
+ case 'm': break; /* qmail always sends to me too if in an EXPN. */
}
break;
case 'E': case 'J': /* Sony NEWS-OS */
@@ -121,6 +132,8 @@ int main(int argc, char **argv)
case 'b':
switch(optarg[0]) {
case 'm': break;
+ case 'd': die_exptcps(); // explain TCP servers to the user
+ case 'D': die_exptcps(); // who is probably echt confused
case 'p': mailq();
case 's': smtpd();
default: die_usage();