[Mailman-Users] Re: max_message_size description suggested extension

2020-05-19 Thread Yasuhito FUTATSUKI
On 2020/05/20 1:42, Mark Sapiro wrote:
> On 5/18/20 5:59 AM, Julian H. Stacey wrote:
 
>> An easy quick fix would be to extend the description of max_message_size
>> to inform admins the effect of the limit can be variant, eg extend
>> From
>>  Maximum length in kilobytes (KB) of a message body.
>> To
>>  Maximum length in kilobytes (KB) of a message body,
>>  (counting all bulk in multipart/alternative [before 
>>  that bulk may later be trimmed by collapse_alternatives
>>  &/or convert_html_to_plaintext]).
>>
>> Comments ?
> 
> 
> It this stage in the life cycle of Mailman 2.1 there will be no changes
> of this nature to messages because of i18n issues whenever a translated
> string is changed.
 To change English messages, we can add message catalogue for 'en' (locally
or lp:mailman/2.1 for errata) without changing msgid, can't we?  

Cheers,
-- 
Yasuhito FUTATSUKI 
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


Re: [Mailman-Users] Massive amounts of bounces after setting munge_from for dmarc compliance

2019-11-19 Thread Yasuhito FUTATSUKI

Hi,

On 2019/11/20 2:27, Andy Cravens wrote:




I meant to say our default setting for all lists is to set from_is_list to 
munge_from.  I also realized that some list managers (who’s domain uses DKIM) 
have added footers to their mailing list so I’ll have to strip the DKIM headers 
no matter what.  Finally, in the documentation I have found I see two 
variations for setting REMOVE_DKIM_HEADERS.

REMOVE_DKIM_HEADERS = 1
REMOVE_DKIM_HEADERS = Yes

Which one is correct?


I only answer to the last question (I don't know whether your judgement
is appropriate or not).

In Mailman/Defaults.py.in (on 2.1.29, not changed since rev.1655, before 
2.1.23):
# Some list posts and mail to the -owner address may contain DomainKey or
# DomainKeys Identified Mail (DKIM) signature headers <http://www.dkim.org/>.
# Various list transformations to the message such as adding a list header or
# footer or scrubbing attachments or even reply-to munging can break these
# signatures.  It is generally felt that these signatures have value, even if
# broken and even if the outgoing message is resigned.  However, some sites
# may wish to remove these headers.  Possible values and meanings are:
# No, 0, False -> do not remove headers.
# Yes, 1, True -> remove headers only if we are munging the from header due
# to from_is_list or dmarc_moderation_action.
# 2 -> always remove headers.
# 3 -> always remove, rename and preserve original DKIM headers.
REMOVE_DKIM_HEADERS = No

So, both are equivalent.

Cheers,
--
Yasuhito FUTATSUKI 
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Frustrating web page issues

2019-04-24 Thread Yasuhito FUTATSUKI

Hi,

On 4/25/19 4:55 AM, Mark J Bradakis via Mailman-Users wrote:

So digging through the logs I found this:

[authz_core:error] [pid 31549:tid 139863772874496] [client 50.198.190.18:46884] 
AH01630: client denied by server configuration:

So I added an AuthType None to the httpd.conf file.  Now I still get the Server 
unavailable page, but a different err:

[Wed Apr 24 13:52:47.955661 2019] [cgid:error] [pid 16974:tid 140524686079744] 
(13)Permission denied: [client 50.198.190.18:45928] AH01257: unable to connect 
to cgi daemon after multiple tries: /local/mailman/teamnet/cgi-bin/listinfo, 
referer: http://autox.team.net/



It seems that the lisinfo CGI is executed as FastCGI. Is it supported?
--
Yasuhito FUTATSUKI
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] members not receiving their own messages.

2018-08-21 Thread Yasuhito FUTATSUKI

On 08/21/18 22:54, Robert Heller wrote:

At Tue, 21 Aug 2018 14:06:04 +0900 "Stephen J. Turnbull" 
 wrote:



Adam Morris writes:

  > Someone sent me the below link.
  > If this can be implemented by me on my lists how can I do it?
  >
  > https://www.lsoft.com/news/techtipLSV-issue2-2017.asp.

If I understand what you want correctly, this is possible and
controlled by the subscriber's "ack" option.


I think the OP might be wondering if *mailman* can implement the
"Misc-Options= NEW_MESSAGE_ID" hack available with LISTSERV 16.0-2017a...


Putting aside that it is useful or harmful, there is a change set to do it,
in tkikuchi's branch. Perhaps it can be applied against 2.1.29.

https://bazaar.launchpad.net/~tkikuchi/mailman/2.1-japan/revision/1346

--
Yasuhito FUTATSUKI 
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] "Freezing" mailing list

2018-06-02 Thread Yasuhito FUTATSUKI

Hi,

Though already it has been resolved, JFYI.

On 05/29/18 23:20, Tatsuo Ishii wrote:

I would like to "freeze" an existing mailing list: I want to keep the
mailing list but I want no one newly subscribe the list.


I've implemented new list's subscribe_policy 'forbid' for this purpose.
https://code.launchpad.net/~futatuki/mailman/2.1-forbid-subscription

(patch against latest mailman:
https://mm.poem.co.jp/mailman-jp/forbid-subscription-r1762-patch.txt )

With 'forbid' subscribe_policy,
* it hide subscription form on list's listinfo page (by using new
  template listinfo_nosubscribe.html).
* it reject all subscription request from users via Web UI and via email.
* following operations are still allowed, inspite of ban_lists rule
  to prevent any email address to subscribe doesn't allow them.
- changing email address of users already subscribing both by users
  themselves operations and by list owners.
- adding new member via operations by list owner or site owner.

On the other hand, the things to be worse,
* this breakes translations of some conpicious message by modification.
  (this is one reason why this modification won't be merged into
   upstream)
* it also is needed to prepare new translated template for listinfo
  page without subscription form, for all languages used by lists
  (otherwise, fall back to English template if 'forbid' policy is
  choosed)
* new value for subscribe_policy 4 as 'forbid' may conflict with
  future release of mailman 2.1 and already this value is
  incompatible with current version. (to migrate list config data
  file from modified version to upstream, make sure its
  subscribe_policy should be other than 'forbid')

--
Yasuhito FUTATSUKI 
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] "Freezing" mailing list

2018-05-29 Thread Yasuhito FUTATSUKI

On 05/30/18 02:00, Mark Sapiro wrote:

On 05/29/2018 09:45 AM, Phil Stracchino wrote:

On 05/29/18 10:20, Tatsuo Ishii wrote:

Hi,

I would like to "freeze" an existing mailing list: I want to keep the
mailing list but I want no one newly subscribe the list. Can you
please anyone tell me how I can implement it?



You could set the list to require moderator approval for subscription,
then simply discard all subscription requests.



Or you could put

^.

in the list's ban_list to ban any address containing at least one
character from subscribing.


Please note, putting pattern to match all addresses, it also prevent
changing mail address to subscribe.

--

Yasuhito 
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Stuck OutgoingRunner

2018-02-06 Thread Yasuhito FUTATSUKI

On 02/07/18 01:01, Mark Sapiro wrote:

On 02/06/2018 03:51 AM, Sebastian Hagedorn wrote:


--On 4. Februar 2018 um 12:54:43 +0900 Yasuhito FUTATSUKI
<futat...@poem.co.jp> wrote:


As far as I read the code, if OutgoingRunner catch SIGINT during waiting
for response from the MTA, the signal handler for SIGINT in qrunner set
flag to exit from loop, then socket module raise socket.error for EINTR,
but SMTP module retry to read from socket and waiting for response until
receiving response or connection closing (from MTA side or by error).
Thus it cannot reach to the code to exit if the connection is kept alive
and MTA send no data.


I'm sorry, above is partly wrong, it is not smtplib.SMTP object to continue
reading but socket module itself.(on Python 2.7.14, 
socket._fileobject.readline())
But it does not affect main subject.


Thanks. I think that might be a possible explanation, but what could
cause a SIGINT to be sent to the OutgoingRunner?



The above is an explanation of why the runner doesn't exit when it
receives a SIGINT or SIGTERM from the master when you restart or stop
Mailman and why you have to SIGKILL it. It suggests that what's
happening when it's hung is it's waiting for a response from the MTA.


thanks to explain for my intension.

In fact,

On 02/02/18 19:26, Sebastian Hagedorn wrote:

root@mailman3/usr/lib/mailman/bin]$ strace -p 1677
Process 1677 attached
recvfrom(10, ^CProcess 1677 detached


indicates the OutGoingRunner process 1677 was still in recvfrom(2)
system call (perhaps called from recv(2)) for FD 10, and


[root@mailman3/usr/lib/mailman/bin]$ lsof -p 1677
COMMANDPIDUSER   FD   TYPE   DEVICE SIZE/OFF   NODE NAME
python2.7 1677 mailman  cwdDIR253,0 4096 173998 /usr/lib/mailman
python2.7 1677 mailman  rtdDIR253,0 4096  2 /
...
python2.7 1677 mailman   10u  IPv6 46441320  0t0TCP 
mailman3.rrz.uni-koeln.de:55764->smtp-out.rrz.uni-koeln.de:smtp (ESTABLISHED)


indicates its FD 10 was ESTABLISHED connection to the MTA.


If the MTA is hanging up (or very slow progress) in application layer and
keeping alive TCP connection in lower layer, client using smtplib
without specifying timeout, like current SMTPDirect handler in Mailman,
must wait for response or the MTA dying.

Unfortunately smtplib for Python 2 before 2.6 don't have way to specify
timeout. It uses a socket in blocking mode unless seting default timeout
by using socket.setdefaulttimeout() before calling smtplib.SMTP.connction().
For Python 2.6 and above, it can be specified on create smtplib.SMTP object.

--
Yasuhito FUTATSUKI <futat...@poem.co.jp>

--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Stuck OutgoingRunner

2018-02-03 Thread Yasuhito FUTATSUKI


On 02/04/18 12:13, Mark Sapiro wrote:

The status of 'S' for OutgoingRunner is "uninterruptable sleep". This
means it's either called time.sleep for QRUNNER_SLEEP_TIME (default = 1
second) which is unlikely as it should wake up, or it's waiting for
response from something, most likely a response from the MTA.


As far as I read the code, if OutgoingRunner catch SIGINT during waiting
for response from the MTA, the signal handler for SIGINT in qrunner set
flag to exit from loop, then socket module raise socket.error for EINTR,
but SMTP module retry to read from socket and waiting for response until
receiving response or connection closing (from MTA side or by error).
Thus it cannot reach to the code to exit if the connection is kept alive
and MTA send no data.

--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Chinese characters spam filter?

2016-07-13 Thread Yasuhito FUTATSUKI
On 07/13/16 13:15, I wrote:
> On 07/13/16 03:47, Mark Sapiro wrote:
>> On 07/12/2016 12:03 AM, Stephen J. Turnbull wrote:
>>> At an earlier stage, you could also just do a trial re-encoding with
>>> the list preferred codec, set errors = 'strict', catch the Exception,
>>> and re-raise as a Hold (or Discard, according to per-list policy).
>>> (Then discard the output.)  I would prefer this solution, I think, as
>>> creating regexps turns out to be an issue for many list owners.
>>>
>>> People would have to learn not to use emoji in headers, of course, or
>>> suffer moderation delays or even discards.
>>
>> I think this will have too many undesired effects. Not just emoji, but
>> accented latin or CJK characters, etc. in display names would I think be
>> real problems, even on English language lists.
> 
> I suggest to use variable to select handler from 'replace' (for backword
> compatibility), 'xmlcharrefreplace', or 'backslashreplace'
or 'strict' with catching Exception
>   in mm_cfg.py.
 
> I think it is better to hold string attributes of mm_cfg and mlist class
> as Unicode than site_language code or list's preferred language code
> encoded (but I know it is so trouble to do so).
And then on pattern matching on message pipeline is done with Unicode
rather than list's prefered language.
-- 
Yasuhito FUTATSUKI <futat...@poem.co.jp>
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Chinese characters spam filter?

2016-07-12 Thread Yasuhito FUTATSUKI

On 07/13/16 03:47, Mark Sapiro wrote:

On 07/12/2016 12:03 AM, Stephen J. Turnbull wrote:

Mark Sapiro writes:
  > On 7/8/16 6:04 PM, Yasuhito FUTATSUKI wrote:
  > >
  > > How about using 'backslashreplace' instead of 'replace' to encode to
  > > list's preferred language in Mailman/Handlers/SpamDetect.py ?

I see you've already done this, but ...

I would consider xmlrefreplace as well.  xmlrefs are something most
people (users/moderators) have seen, backslash they're not going to
recognize unless they're programmers.



I have now switched to xmlcharrefreplace instead of backslashreplace as
I agree this will be easier to explain and understand. I was uncertain
about this at first because I didn't know that xmlcharrefreplace
wouldn't use entity names in some cases, but it appears that it only
uses numeric references.


I don't have strong objection to switch to xmlcharrefreplace because my
main subject is to distinguish '?' from replaced characters.
But personally I prefer backslashreplace for looking up Unicode table,
for numeric reference of xmlcharreplace seems to use decimal, while
backslashreplace uses hexadecimal, and most of Unicode table uses
hexadecimal for express code point like U+4E8C.


At an earlier stage, you could also just do a trial re-encoding with
the list preferred codec, set errors = 'strict', catch the Exception,
and re-raise as a Hold (or Discard, according to per-list policy).
(Then discard the output.)  I would prefer this solution, I think, as
creating regexps turns out to be an issue for many list owners.

People would have to learn not to use emoji in headers, of course, or
suffer moderation delays or even discards.


I think this will have too many undesired effects. Not just emoji, but
accented latin or CJK characters, etc. in display names would I think be
real problems, even on English language lists.


I suggest to use variable to select handler from 'replace' (for backword
compatibility), 'xmlcharrefreplace', or 'backslashreplace' in mm_cfg.py.

I think it is better to hold string attributes of mm_cfg and mlist class
as Unicode than site_language code or list's preferred language code
encoded (but I know it is so trouble to do so).
--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Chinese characters spam filter?

2016-07-09 Thread Yasuhito FUTATSUKI
On 07/09/16 10:04, I wrote:
> How about using 'backslashreplace' instead of 'replace' to encode to
> list's preferred language in Mailman/Handlers/SpamDetect.py ?
> 
> Then, desirable pattern in this case seems to be
> 
> ~Subject.*(\\u[0-9a-f]{4}){4}
^Subject:.*(\\u[0-9a-f]{4,5}){4}

(CJK Unified Ideographs Extension uses code point scope >= u+2)

Of course, you can specify code point scope more pricisely, not
to match other than Chinese characters.
--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Chinese characters spam filter?

2016-07-09 Thread Yasuhito FUTATSUKI
Hi,

On 07/07/16 04:41, Mark Sapiro wrote:
> That should be
> 
> ^Subject:.*[list of all Chinese characters here]
> 
> except that if your list's preferred language is English and you haven't
> changed Mailman's character set for English from ASCII to UTF-8, the
> text you are matching against won't contain any Chinese characters
> because the decoded headers are converted to the character set of the
> list's preferred language and all the Chinese characters will be
> converted to '?'.
> 
> You might try something like
> 
> ^Subject:.*\?{4,}
> 
> This will match any subject that contains 4 or more non-ascii characters
> in a row. Unfortunately, it will also match
> 
> Subject: WTF is happening here
> 
> but you could try some number other than 4 but greater than 1

How about using 'backslashreplace' instead of 'replace' to encode to
list's preferred language in Mailman/Handlers/SpamDetect.py ?

Then, desirable pattern in this case seems to be

~Subject.*(\\u[0-9a-f]{4}){4}

It also matches strings like 
'What does the string "\\u6709\\u9650\\u516c\\u53f8" mean?', though.

=== modified file 'Mailman/Handlers/SpamDetect.py'
--- Mailman/Handlers/SpamDetect.py  2016-01-18 23:56:58 +
+++ Mailman/Handlers/SpamDetect.py  2016-07-09 00:47:33 +
@@ -86,7 +86,7 @@
 # unicode it as iso-8859-1 which may result in a garbled
 # mess, but we have to do something.
 uvalue += unicode(frag, 'iso-8859-1', 'replace')
-headers += '%s: %s\n' % (h, uvalue.encode(cset, 'replace'))
+headers += '%s: %s\n' % (h, uvalue.encode(cset, 'backslashreplace'))
 return headers

-- 
Yasuhito FUTATSUKI <futat...@poem.co.jp>
--
Mailman-Users mailing list Mailman-Users@python.org
https://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org