add -r option to enqueuer as compat interface for mailx
authorgilles <gilles@openbsd.org>
Sun, 3 Jul 2016 14:30:33 +0000 (14:30 +0000)
committergilles <gilles@openbsd.org>
Sun, 3 Jul 2016 14:30:33 +0000 (14:30 +0000)
diff by Richard <richard@aaazen.com>

usr.sbin/smtpd/enqueue.c

index ba39c5c..3fd7fbd 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: enqueue.c,v 1.112 2016/02/03 08:03:21 gilles Exp $    */
+/*     $OpenBSD: enqueue.c,v 1.113 2016/07/03 14:30:33 gilles Exp $    */
 
 /*
  * Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
@@ -187,7 +187,7 @@ enqueue(int argc, char *argv[], FILE *ofp)
        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;
@@ -198,6 +198,9 @@ enqueue(int argc, char *argv[], FILE *ofp)
                case 'N':
                        msg.dsn_notify = optarg;
                        break;
+               case 'r':
+                       fake_from = optarg;
+                       break;
                case 'R':
                        msg.dsn_ret = optarg;
                        break;