You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2006/10/11 19:50:17 UTC

Re: [PATCH] commit email includes valid date header

William Pietri wrote:
> Hi. Here's my first patch for you folks; I hope I've done this correctly.
> 
> The current commit-email.pl script sends out a message without a "Date"
> header. That header is mandatory, but most mail servers will add one if
> it's missing. Qmail is not one of those mail servers, so our commit
> notices ended up being sorted into the wrong end of the inbox or nixed
> by spam filters.
> 
> Attached is a patch to fix that. This being Perl, there's more than one
> way to do this, so let me know if you'd like it done differently.

Ping...

Thanks for the patch, William.  Does a committer have a chance to take a
look at this patch?  If nothing happens in the next few days, I'll file
an issue.

Thanks,
-Hyrum

> [[[
> 
> * tools/hook-scripts/commit-email.pl.in: Add RFC822-compliant
>    date header to emails; header is mandatory per RFC2822.
> 
> ]]]
> 
> 
> ------------------------------------------------------------------------
> 
> Index: tools/hook-scripts/commit-email.pl.in
> ===================================================================
> --- tools/hook-scripts/commit-email.pl.in       (revision 21717)
> +++ tools/hook-scripts/commit-email.pl.in       (working copy)
> @@ -100,7 +100,9 @@
>  }
>  
>  require Net::SMTP if defined $smtp_server;
> +use POSIX qw(strftime);
>  
> +
>  ######################################################################
>  # Initial setup/command-line handling.
>  
> @@ -540,6 +542,8 @@
>      push(@head, "To: $to\n");
>      push(@head, "From: $mail_from\n");
>      push(@head, "Subject: $subject\n");
> +    push(@head, "Date: " . 
> +         strftime("%a, %d %b %Y %H:%M:%S %z", localtime) . "\n");
>      push(@head, "Reply-to: $reply_to\n") if $reply_to;
>  
>      ### Below, we set the content-type etc, but see these comments


Re: [PATCH] commit email includes valid date header

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
William Pietri wrote:
> Thanks, Hyrum. Going on the backlog isn't as much fun as having the
> patch applied, but it's worlds better than worrying that it just got
> lost in the shuffle. The way you've handled this has definitely given me
> notions about how to better manage the projects I'm more directly
> involved in.

No problem.  (By the way, because the svn lists don't use Reply-To
munging, you generally need to use the "Reply All" or "Reply to List"
functionality of your mail client to ensure that mails make it back the
list, and not just the sender.)

Oh, and don't feel as if we've forgotten your patch; filing your patch
as an issue helps make sure that we don't.  :)

-Hyrum

> Hyrum K. Wright wrote:
>> Hyrum K. Wright wrote:
>>  
>>> William Pietri wrote:
>>>    
>>>> Hi. Here's my first patch for you folks; I hope I've done this
>>>> correctly.
>>>>
>>>> The current commit-email.pl script sends out a message without a "Date"
>>>> header. That header is mandatory, but most mail servers will add one if
>>>> it's missing. Qmail is not one of those mail servers, so our commit
>>>> notices ended up being sorted into the wrong end of the inbox or nixed
>>>> by spam filters.
>>>>
>>>> Attached is a patch to fix that. This being Perl, there's more than one
>>>> way to do this, so let me know if you'd like it done differently.
>>>>       
>>> Ping...
>>>
>>> Thanks for the patch, William.  Does a committer have a chance to take a
>>> look at this patch?  If nothing happens in the next few days, I'll file
>>> an issue.
>>>     
>>
>> Filed as issue 2633.
>>
>> -Hyrum
>>
>>  
>>>> [[[
>>>>
>>>> * tools/hook-scripts/commit-email.pl.in: Add RFC822-compliant
>>>>    date header to emails; header is mandatory per RFC2822.
>>>>
>>>> ]]]
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> Index: tools/hook-scripts/commit-email.pl.in
>>>> ===================================================================
>>>> --- tools/hook-scripts/commit-email.pl.in       (revision 21717)
>>>> +++ tools/hook-scripts/commit-email.pl.in       (working copy)
>>>> @@ -100,7 +100,9 @@
>>>>  }
>>>>  
>>>>  require Net::SMTP if defined $smtp_server;
>>>> +use POSIX qw(strftime);
>>>>  
>>>> +
>>>>  ######################################################################
>>>>  # Initial setup/command-line handling.
>>>>  
>>>> @@ -540,6 +542,8 @@
>>>>      push(@head, "To: $to\n");
>>>>      push(@head, "From: $mail_from\n");
>>>>      push(@head, "Subject: $subject\n");
>>>> +    push(@head, "Date: " . +         strftime("%a, %d %b %Y
>>>> %H:%M:%S %z", localtime) . "\n");
>>>>      push(@head, "Reply-to: $reply_to\n") if $reply_to;
>>>>  
>>>>      ### Below, we set the content-type etc, but see these comments


Re: [PATCH] commit email includes valid date header

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Hyrum K. Wright wrote:
> William Pietri wrote:
>> Hi. Here's my first patch for you folks; I hope I've done this correctly.
>>
>> The current commit-email.pl script sends out a message without a "Date"
>> header. That header is mandatory, but most mail servers will add one if
>> it's missing. Qmail is not one of those mail servers, so our commit
>> notices ended up being sorted into the wrong end of the inbox or nixed
>> by spam filters.
>>
>> Attached is a patch to fix that. This being Perl, there's more than one
>> way to do this, so let me know if you'd like it done differently.
> 
> Ping...
> 
> Thanks for the patch, William.  Does a committer have a chance to take a
> look at this patch?  If nothing happens in the next few days, I'll file
> an issue.

Filed as issue 2633.

-Hyrum

>> [[[
>>
>> * tools/hook-scripts/commit-email.pl.in: Add RFC822-compliant
>>    date header to emails; header is mandatory per RFC2822.
>>
>> ]]]
>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: tools/hook-scripts/commit-email.pl.in
>> ===================================================================
>> --- tools/hook-scripts/commit-email.pl.in       (revision 21717)
>> +++ tools/hook-scripts/commit-email.pl.in       (working copy)
>> @@ -100,7 +100,9 @@
>>  }
>>  
>>  require Net::SMTP if defined $smtp_server;
>> +use POSIX qw(strftime);
>>  
>> +
>>  ######################################################################
>>  # Initial setup/command-line handling.
>>  
>> @@ -540,6 +542,8 @@
>>      push(@head, "To: $to\n");
>>      push(@head, "From: $mail_from\n");
>>      push(@head, "Subject: $subject\n");
>> +    push(@head, "Date: " . 
>> +         strftime("%a, %d %b %Y %H:%M:%S %z", localtime) . "\n");
>>      push(@head, "Reply-to: $reply_to\n") if $reply_to;
>>  
>>      ### Below, we set the content-type etc, but see these comments
>