On Slackware 14.2 testing mailx I find that the -r option is not
supported by smtpctl (synbolic link as sendmail).

The -r option is a deprecated version of the -f option that still works
with sendmail 8.15.2

In order not to have to change mailx, I created the attached patch for
OpenSMTPD.

This patch might be useful for Debian and other Linux distributions
where mailx uses the -r option.


Richard Narron
--- smtpd/enqueue.c.orig        2016-05-12 09:56:04.000000000 -0700
+++ smtpd/enqueue.c     2016-07-02 15:08:28.415419080 -0700
@@ -189,7 +189,7 @@
        save_argv = argv;
 
        while ((ch = getopt(argc, argv,
-           "A:B:b:E::e:F:f:iJ::L:mN:o:p:qR:StvV:x")) != -1) {
+           "A:B:b:E::e:F:f:iJ::L:mN:o:p:qr:R:StvV:x")) != -1) {
                switch (ch) {
                case 'f':
                        fake_from = optarg;
@@ -200,6 +200,9 @@
                case 'N':
                        msg.dsn_notify = optarg;
                        break;
+               case 'r':    /* old obsolete option used by mailx */
+                       fake_from = optarg;
+                       break;
                case 'R':
                        msg.dsn_ret = optarg;
                        break;
--- smtpd/sendmail.8.orig       2016-05-12 09:56:04.000000000 -0700
+++ smtpd/sendmail.8    2016-07-02 15:21:35.607406471 -0700
@@ -26,6 +26,7 @@
 .Op Fl tv
 .Op Fl F Ar name
 .Op Fl f Ar from
+.Op Fl r Ar from
 .Ar to ...
 .Sh DESCRIPTION
 The
@@ -54,6 +55,8 @@
 Set the sender's full name.
 .It Fl f Ar from
 Set the sender's address.
+.It Fl r Ar from
+A deprecated option to set the sender's address.
 .It Fl t
 Read the message's To:, Cc:, and Bcc: fields for recipients.
 The Bcc: field will be deleted before sending.

Reply via email to