git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] New send-email option smtpserveroptions.

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 4, 2010, 16:21 UTC
Message-ID
<7v4oe5xyxd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1283616372-3340-3-git-send-email-pascal@obry.net>
Pascal Obry <pascal@obry.net> writes:
Show 9 quoted lines
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 0063606..e5cdda7 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -60,6 +60,7 @@ git send-email [options] <file | directory | rev-list options >
>      --envelope-sender       <str>  * Email envelope sender.
>      --smtp-server       <str:int>  * Outgoing SMTP server to use. The port
>                                       is optional. Default 'localhost'.
> +    --smtp-server-options   <int>  * Outgoing SMTP server options to use.
Is it really an int?
Show 10 quoted lines
> @@ -279,6 +282,7 @@ my $rc = GetOptions("sender|from=s" => \$sender,
> ...
> +		    "smtp-server-options=s" => \$smtp_server_options,
> @@ -1015,6 +1019,9 @@ X-Mailer: git-send-email $gitversion
>  		}
>  	}
>  
> +	unshift (@sendmail_parameters, $smtp_server_options)
> +	    if (defined $smtp_server_options);
> +

I suspect this would not work, unless you are aiming to add just a singular $smtp_server_option, as the actual program invocation looks like this later in the program:

	} elsif ($smtp_server =~ m#^/#) {
		my $pid = open my $sm, '|-';
		defined $pid or die $!;
		if (!$pid) {
			exec($smtp_server, @sendmail_parameters) or die $!;
		}
		print $sm "$header\n$message";

Somebody in the code before this unshift needs to split the single string in $smtp_server_options into multiple parameters, or better yet, it needs to accept more than one --smtp-server-option=foo --smtp-server-option=bar and accumulate them in @smtp_server_options.

Previous: Pascal ObryNext: Pascal Obry
Message 4 of 6 in “Add support for SMTP server options”
  1. 0/2 Add support for SMTP server optionsPascal Obry, Sep 4, 2010
  2. 1/2 Minor indentation fix.Pascal Obry, Sep 4, 2010
  3. 2/2 New send-email option smtpserveroptions.Pascal Obry, Sep 4, 2010
  4. Junio C HamanoSep 4, 2010
  5. Pascal ObrySep 4, 2010
  6. Ævar Arnfjörð BjarmasonSep 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.