You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/04 23:11:47 UTC

[whimsy.git] [1/1] Commit 8e4446b: disable SMTP certificate verification

Commit 8e4446b542c6a69f2d754e4e53ced1860e82617b:
    disable SMTP certificate verification


Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>

------------------------------------------------------------
www/roster/main.rb                                           | +++++ 
------------------------------------------------------------
5 changes: 5 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/roster/main.rb b/www/roster/main.rb
index 084d675..0c16b19 100755
--- a/www/roster/main.rb
+++ b/www/roster/main.rb
@@ -20,6 +20,11 @@
 require_relative 'banner'
 require_relative 'models'
 
+# Disable smtp certificate verification
+Mail.defaults do
+  delivery_method :smtp, openssl_verify_mode: 'none'
+end
+
 get '/' do
   if env['REQUEST_URI'].end_with? '/'
     @committers = ASF::Person.list

Re: [whimsy.git] [1/1] Commit 8e4446b: disable SMTP certificate verification

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, Mar 4, 2016 at 6:52 PM, sebb <se...@gmail.com> wrote:
> On 4 March 2016 at 23:35, Sam Ruby <ru...@intertwingly.net> wrote:
>> On Fri, Mar 4, 2016 at 6:03 PM, sebb <se...@gmail.com> wrote:
>>> On 4 March 2016 at 22:11, Sam Ruby <ru...@apache.org> wrote:
>>>> Commit 8e4446b542c6a69f2d754e4e53ced1860e82617b:
>>>>     disable SMTP certificate verification
>>>
>>> Why?
>>
>> The root cause is the procmail isn't configured with a proper certificate:
>>
>> https://github.com/apache/infrastructure-puppet/commit/e0ac1e61706e5651f6ea2c00549f9a5fc1d16b4c
>>
>>> This should be documented in the code.
>>
>> Unless it is fixed properly (which I'm not sure is worth it?), this
>> applies to every bit of code that will be sending email from whimsy.
>> Other locations where this code currently appears (and appeared on the
>> previous whimsy-vm):
>>
>> www/board/agenda/views/actions/feedback.json.rb
>> www/board/agenda/views/actions/send-reminders.json.rb
>>
>> As the number of places where email will be sent is only likely to go
>> up over time, perhaps the right place to document in one of the *.md
>> files in the root directory?
>
> An alternative would be to extract the e-mail code into a library routine.
> This would simplify updates and make it easier to mock it for testing.

Excellent suggestion.

Done:

https://github.com/apache/whimsy/commit/c407730a9c0babdc34200be691470b7b63937be5

- Sam Ruby

Re: [whimsy.git] [1/1] Commit 8e4446b: disable SMTP certificate verification

Posted by sebb <se...@gmail.com>.
On 4 March 2016 at 23:35, Sam Ruby <ru...@intertwingly.net> wrote:
> On Fri, Mar 4, 2016 at 6:03 PM, sebb <se...@gmail.com> wrote:
>> On 4 March 2016 at 22:11, Sam Ruby <ru...@apache.org> wrote:
>>> Commit 8e4446b542c6a69f2d754e4e53ced1860e82617b:
>>>     disable SMTP certificate verification
>>
>> Why?
>
> The root cause is the procmail isn't configured with a proper certificate:
>
> https://github.com/apache/infrastructure-puppet/commit/e0ac1e61706e5651f6ea2c00549f9a5fc1d16b4c
>
>> This should be documented in the code.
>
> Unless it is fixed properly (which I'm not sure is worth it?), this
> applies to every bit of code that will be sending email from whimsy.
> Other locations where this code currently appears (and appeared on the
> previous whimsy-vm):
>
> www/board/agenda/views/actions/feedback.json.rb
> www/board/agenda/views/actions/send-reminders.json.rb
>
> As the number of places where email will be sent is only likely to go
> up over time, perhaps the right place to document in one of the *.md
> files in the root directory?

An alternative would be to extract the e-mail code into a library routine.
This would simplify updates and make it easier to mock it for testing.

> - Sam Ruby
>
>>> Branch: refs/heads/master
>>> Author: Sam Ruby <ru...@intertwingly.net>
>>> Committer: Sam Ruby <ru...@intertwingly.net>
>>> Pusher: rubys <ru...@apache.org>
>>>
>>> ------------------------------------------------------------
>>> www/roster/main.rb                                           | +++++
>>> ------------------------------------------------------------
>>> 5 changes: 5 additions, 0 deletions.
>>> ------------------------------------------------------------
>>>
>>>
>>> diff --git a/www/roster/main.rb b/www/roster/main.rb
>>> index 084d675..0c16b19 100755
>>> --- a/www/roster/main.rb
>>> +++ b/www/roster/main.rb
>>> @@ -20,6 +20,11 @@
>>>  require_relative 'banner'
>>>  require_relative 'models'
>>>
>>> +# Disable smtp certificate verification
>>> +Mail.defaults do
>>> +  delivery_method :smtp, openssl_verify_mode: 'none'
>>> +end
>>> +
>>>  get '/' do
>>>    if env['REQUEST_URI'].end_with? '/'
>>>      @committers = ASF::Person.list

Re: [whimsy.git] [1/1] Commit 8e4446b: disable SMTP certificate verification

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, Mar 4, 2016 at 6:03 PM, sebb <se...@gmail.com> wrote:
> On 4 March 2016 at 22:11, Sam Ruby <ru...@apache.org> wrote:
>> Commit 8e4446b542c6a69f2d754e4e53ced1860e82617b:
>>     disable SMTP certificate verification
>
> Why?

The root cause is the procmail isn't configured with a proper certificate:

https://github.com/apache/infrastructure-puppet/commit/e0ac1e61706e5651f6ea2c00549f9a5fc1d16b4c

> This should be documented in the code.

Unless it is fixed properly (which I'm not sure is worth it?), this
applies to every bit of code that will be sending email from whimsy.
Other locations where this code currently appears (and appeared on the
previous whimsy-vm):

www/board/agenda/views/actions/feedback.json.rb
www/board/agenda/views/actions/send-reminders.json.rb

As the number of places where email will be sent is only likely to go
up over time, perhaps the right place to document in one of the *.md
files in the root directory?

- Sam Ruby

>> Branch: refs/heads/master
>> Author: Sam Ruby <ru...@intertwingly.net>
>> Committer: Sam Ruby <ru...@intertwingly.net>
>> Pusher: rubys <ru...@apache.org>
>>
>> ------------------------------------------------------------
>> www/roster/main.rb                                           | +++++
>> ------------------------------------------------------------
>> 5 changes: 5 additions, 0 deletions.
>> ------------------------------------------------------------
>>
>>
>> diff --git a/www/roster/main.rb b/www/roster/main.rb
>> index 084d675..0c16b19 100755
>> --- a/www/roster/main.rb
>> +++ b/www/roster/main.rb
>> @@ -20,6 +20,11 @@
>>  require_relative 'banner'
>>  require_relative 'models'
>>
>> +# Disable smtp certificate verification
>> +Mail.defaults do
>> +  delivery_method :smtp, openssl_verify_mode: 'none'
>> +end
>> +
>>  get '/' do
>>    if env['REQUEST_URI'].end_with? '/'
>>      @committers = ASF::Person.list

Re: [whimsy.git] [1/1] Commit 8e4446b: disable SMTP certificate verification

Posted by sebb <se...@gmail.com>.
On 4 March 2016 at 22:11, Sam Ruby <ru...@apache.org> wrote:
> Commit 8e4446b542c6a69f2d754e4e53ced1860e82617b:
>     disable SMTP certificate verification

Why?

This should be documented in the code.

>
> Branch: refs/heads/master
> Author: Sam Ruby <ru...@intertwingly.net>
> Committer: Sam Ruby <ru...@intertwingly.net>
> Pusher: rubys <ru...@apache.org>
>
> ------------------------------------------------------------
> www/roster/main.rb                                           | +++++
> ------------------------------------------------------------
> 5 changes: 5 additions, 0 deletions.
> ------------------------------------------------------------
>
>
> diff --git a/www/roster/main.rb b/www/roster/main.rb
> index 084d675..0c16b19 100755
> --- a/www/roster/main.rb
> +++ b/www/roster/main.rb
> @@ -20,6 +20,11 @@
>  require_relative 'banner'
>  require_relative 'models'
>
> +# Disable smtp certificate verification
> +Mail.defaults do
> +  delivery_method :smtp, openssl_verify_mode: 'none'
> +end
> +
>  get '/' do
>    if env['REQUEST_URI'].end_with? '/'
>      @committers = ASF::Person.list