29 Jun 2012 12:53
Patch for setting sendmail opts
Hello!
The attached patch enables mailx to read and set any sendmail options
specified on mailx's own command line after all message recipients.
This makes it more akin to the BSD 'mail' program, partially solving the
issue I had with mailx, and reported about on June 12 2011, in message
<20110612201552.GA5033 <at> dnied%tiscali.it> (in short: mailx wouldn't tell
sendmail to set the 'From ' line).
Hope someone will find this patch as useful as I do, or even more.
Cheers,
DN
===== BEGIN PATCH =====
--- /home/dnied/nail.orig/main.c 2007-10-02 14:15:50.000000000 +0200
+++ /home/dnied/nail/main.c 2012-06-28 19:26:40.000000000 +0200
<at> <at> -367,8 +367,11 <at> <at>
ef = argv[optind];
}
} else {
- for (i = optind; argv[i]; i++)
+ for (i = optind; argv[i] && argv[i][0] != '-'; i++)
to = checkaddrs(cat(to, extract(argv[i], GTO|GFULL)));
+ if (argv[i] && argv[i][0] == '-') /* it's a sendmail opt, coming after to-addr(s) */
+ for ( ; argv[i]; i++)
+ smopts = cat(smopts, nalloc(argv[i], 0));
}
(Continue reading)
RSS Feed