[Mailman-Users] Cannot set digest mode via URL

Mark Sapiro mark at msapiro.net
Fri Sep 3 18:58:49 CEST 2010

W. Curtis Preston wrote:
>So it seems I misunderstood your previous post.  Sorry about that. I
>followed your suggestion.  Both of them, actually.  I tried all of the
>following URLs, to no avail.  The first two do at least display just the
>username in question.  I did change the chunksize variable and did the
>latter two URLs, and that didn't work either. (In case it's not obvious, I
>tried using the values off/on and 0/1 in case that was the problem.)

I finally had some time to devote to debugging this, and I know what
the problem is. The 2.1.10 change was made because the local part of
an email address can be quoted with a double quote as in
"john&jane"@example.com. The presence of those double quotes would
break the HTML for the membership list page by creating things like

<INPUT name=""john&jane"@example.com_nomail" type="CHECKBOX" value="on"

This was avoided by quoting the email address so the above would become

<INPUT name="%22john%26jane%22%40example.com_nomail" type="CHECKBOX"
value="on" ...

However, this means the CGI script now expects field names to be quoted
as above.

The problem in this case is that when you specify these parameters as
query fragments in the URL, the Python class that Mailman uses to
retrieve the parameters unquotes the query fragments, whereas it
doesn't do this with POST data. This means the admin CGI script is
looking for things like user%40example.com_nomail, and if they are
provided as POST data, that's what it sees, but if they are provided
as query fragments of a GET URL, it sees user at example.com_nomail which
doesn't work.

This means instead of giving the email as user%40example.com in a URL
query fragment, you need to give it as user%2540example.com which will
result in the %25 being changed to % and the script seeing

Note also that you can subscribe the user and set options with a single
GET URL. For example:

http://<domain>/mailman/admin/<list>/members/add?subscribe_or_invite=0&send_welcome_msg_to_this_batch=0&send_notifications_to_list_owner=0&subscribees=user at example.com&user=user%2540example.com&user%2540example.com_digest=1&user%2540example.com_nodupes=1&user%2540example.com_plain=1&setmemberopts_btn=1&adminpw=<password>

Note the following:

I have specified subscribees instead of subscribees_upload as in the
OP. This doesn't matter; either will work, but subscribees is shorter.
Note the address here is raw, not encoded.

I have corrected send_notifications_to_list_owner which was
notification_to_list_owner in the OP.

I have omitted allmodbit_val=0 since this is ignored unless
allmodbit_btn is present.

I have setmemberopts_btn=1 since the actual value is ignored - only the
presence or absence of the key is significant.

I have omitted the '=0' option settings. In most cases (language is an
exception), ommitting a setting is the same as setting it to unchecked
or empty. This does mean that settings which are on by default must be
explicitly set whether you do it with one step or two or they will be
turned off. The exception is language which will be unchanged if

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the Mailman-Users mailing list