Thread: Deselecting "Receive Mail" on the website ml subscribe form is broken

Deselecting "Receive Mail" on the website ml subscribe form is broken

From
"Amir Rohan"
Date:
<div style="font-family: Verdana;font-size: 12.0px;"><div><div>>>>>> subscribe pgsql-bugs<br /> >----
Thesubscribe command did not succeed.<br /> >----<br /> >---- Your request to subscribe must be confirmed.<br />
>----Confirmation instructions have been sent in an e-mail message to<br /> ----</div><div>>>>> set
nomail<br/> **** The "nomail" mailing list is not supported at<br /> **** PostgreSQL Mailing Lists.</div><div>To see a
completelist of public mailing lists, send a message to<br /> majordomo@postgresql.org<br /> In the body of the
message,put this command:<br /> lists</div><div><br /> Valid commands processed: 1<br /> 0 succeeded, 1 stalled, and 0
failed.</div> </div></div> 

Re: Deselecting "Receive Mail" on the website ml subscribe form is broken

From
Magnus Hagander
Date:


On Mon, Sep 28, 2015 at 12:07 AM, Amir Rohan <amir.rohan@mail.com> wrote:
>>>>> subscribe pgsql-bugs
>---- The subscribe command did not succeed.
>----
>---- Your request to subscribe must be confirmed.
>---- Confirmation instructions have been sent in an e-mail message to
----
>>>> set nomail
**** The "nomail" mailing list is not supported at
**** PostgreSQL Mailing Lists.
To see a complete list of public mailing lists, send a message to
majordomo@postgresql.org
In the body of the message, put this command:
lists

Valid commands processed: 1
0 succeeded, 1 stalled, and 0 failed.
 


I wonder if this has ever worked. Alvaro, do you know if something has changed there? ISTM that we pass on a "set digest" and a "set nomail" directly after the subscribe command -- does that work at all, since the subscription hasn't been confirmed yet?


--

Re: Deselecting "Receive Mail" on the website ml subscribe form is broken

From
Alvaro Herrera
Date:
Magnus Hagander wrote:
> On Mon, Sep 28, 2015 at 12:07 AM, Amir Rohan <amir.rohan@mail.com> wrote:
> 
> > >>>>> subscribe pgsql-bugs
> > >---- The subscribe command did not succeed.
> > >----
> > >---- Your request to subscribe must be confirmed.
> > >---- Confirmation instructions have been sent in an e-mail message to
> > ----
> > >>>> set nomail
> > **** The "nomail" mailing list is not supported at
> > **** PostgreSQL Mailing Lists.

> I wonder if this has ever worked. Alvaro, do you know if something has
> changed there? ISTM that we pass on a "set digest" and a "set nomail"
> directly after the subscribe command -- does that work at all, since the
> subscription hasn't been confirmed yet?

I was looking at this when Amir first posted it, and I was wondering how
it was possible that it ever worked in the first place.  The second
command should really be "set pgsql-bugs nomail" (patch below), but as
you say I'm unsure that it works if the subscription hasn't been
confirmed.  A command that should work in either case is subscribe-set pgsql-bugs nomail subscribe-set pgsql-bugs
nomail,digest
but I'm not sure what's the python-ish way to express that.

diff --git a/pgweb/lists/views.py b/pgweb/lists/views.py
index bb8b445..906735b 100644
--- a/pgweb/lists/views.py
+++ b/pgweb/lists/views.py
@@ -21,9 +21,9 @@ def subscribe(request):                mailtxt += "subscribe %s\n" % form.cleaned_data['lists']
        mailsubject = "subscribe"                if not form.cleaned_data['receive']:
 
-                    mailtxt += "set nomail\n"
+                    mailtxt += "set %s nomail\n" % form.cleaned_data['lists']                if
form.cleaned_data['digest']:
-                    mailtxt += "set digest\n"
+                    mailtxt += "set %s digest\n" % form.cleaned_data['lists']            else:                mailtxt
+="unsubscribe %s\n" % form.cleaned_data['lists']                mailsubject = "unsubscribe"
 

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: Deselecting "Receive Mail" on the website ml subscribe form is broken

From
Magnus Hagander
Date:


On Tue, Sep 29, 2015 at 4:14 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Magnus Hagander wrote:
> On Mon, Sep 28, 2015 at 12:07 AM, Amir Rohan <amir.rohan@mail.com> wrote:
>
> > >>>>> subscribe pgsql-bugs
> > >---- The subscribe command did not succeed.
> > >----
> > >---- Your request to subscribe must be confirmed.
> > >---- Confirmation instructions have been sent in an e-mail message to
> > ----
> > >>>> set nomail
> > **** The "nomail" mailing list is not supported at
> > **** PostgreSQL Mailing Lists.

> I wonder if this has ever worked. Alvaro, do you know if something has
> changed there? ISTM that we pass on a "set digest" and a "set nomail"
> directly after the subscribe command -- does that work at all, since the
> subscription hasn't been confirmed yet?

I was looking at this when Amir first posted it, and I was wondering how
it was possible that it ever worked in the first place.  The second
command should really be "set pgsql-bugs nomail" (patch below), but as
you say I'm unsure that it works if the subscription hasn't been
confirmed.  A command that should work in either case is
  subscribe-set pgsql-bugs nomail
  subscribe-set pgsql-bugs nomail,digest
but I'm not sure what's the python-ish way to express that.

Well, if we're going to do it, let's do it right :)

Does the attached logic seem right? 

--
Attachment

Re: Deselecting "Receive Mail" on the website ml subscribe form is broken

From
Alvaro Herrera
Date:
Magnus Hagander wrote:
> On Tue, Sep 29, 2015 at 4:14 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
> wrote:

> > I was looking at this when Amir first posted it, and I was wondering how
> > it was possible that it ever worked in the first place.  The second
> > command should really be "set pgsql-bugs nomail" (patch below), but as
> > you say I'm unsure that it works if the subscription hasn't been
> > confirmed.  A command that should work in either case is
> >   subscribe-set pgsql-bugs nomail
> >   subscribe-set pgsql-bugs nomail,digest
> > but I'm not sure what's the python-ish way to express that.
> 
> Well, if we're going to do it, let's do it right :)
> 
> Does the attached logic seem right?

Yeah, it does to me.

(I assume that "lists" can in fact be a single list only.)

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: Deselecting "Receive Mail" on the website ml subscribe form is broken

From
Magnus Hagander
Date:


On Fri, Oct 2, 2015 at 4:21 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Magnus Hagander wrote:
> On Tue, Sep 29, 2015 at 4:14 PM, Alvaro Herrera <alvherre@2ndquadrant.com>
> wrote:

> > I was looking at this when Amir first posted it, and I was wondering how
> > it was possible that it ever worked in the first place.  The second
> > command should really be "set pgsql-bugs nomail" (patch below), but as
> > you say I'm unsure that it works if the subscription hasn't been
> > confirmed.  A command that should work in either case is
> >   subscribe-set pgsql-bugs nomail
> >   subscribe-set pgsql-bugs nomail,digest
> > but I'm not sure what's the python-ish way to express that.
>
> Well, if we're going to do it, let's do it right :)
>
> Does the attached logic seem right?

Yeah, it does to me.

(I assume that "lists" can in fact be a single list only.)


Applied, will go live within half an hour.

And yes, "lists" can still only be one, it's badly named.
 
--