From 6d902293c1e6cf14a1b1dd1fecad670ccf54ad2a Mon Sep 17 00:00:00 2001 From: Ralph Slooten Date: Fri, 31 Mar 2023 22:42:35 +1300 Subject: [PATCH] Feature: Add 'o', 'b' & 's' ignored flags for sendmail Resolves #76 --- sendmail/cmd/cmd.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sendmail/cmd/cmd.go b/sendmail/cmd/cmd.go index df2c181..286e3ea 100644 --- a/sendmail/cmd/cmd.go +++ b/sendmail/cmd/cmd.go @@ -45,11 +45,15 @@ func Run() { var verbose bool // override defaults from cli flags - flag.StringVar(&smtpAddr, "smtp-addr", smtpAddr, "SMTP server address") flag.StringVarP(&fromAddr, "from", "f", fromAddr, "SMTP sender") - flag.BoolP("long-i", "i", true, "Ignored. This flag exists for sendmail compatibility.") - flag.BoolP("long-t", "t", true, "Ignored. This flag exists for sendmail compatibility.") + flag.StringVar(&smtpAddr, "smtp-addr", smtpAddr, "SMTP server address") flag.BoolVarP(&verbose, "verbose", "v", false, "Verbose mode (sends debug output to stderr)") + flag.BoolP("long-b", "b", false, "Ignored. This flag exists for sendmail compatibility.") + flag.BoolP("long-i", "i", false, "Ignored. This flag exists for sendmail compatibility.") + flag.BoolP("long-o", "o", false, "Ignored. This flag exists for sendmail compatibility.") + flag.BoolP("long-s", "s", false, "Ignored. This flag exists for sendmail compatibility.") + flag.BoolP("long-t", "t", false, "Ignored. This flag exists for sendmail compatibility.") + flag.CommandLine.SortFlags = false flag.Parse() // allow recipient to be passed as an argument