[Mailman-Users] Re: Automate Moderator Functions

2022-04-14 Thread Andre de Azevedo Cunha
Hi! 

I'm testing the migration of my mailman2 lists to mailman3.
Had made the adjustment below to discard messages larger than the list
size limit. But I'm having difficulties to implement the same solution
in mailman3. How could I do this?

---

Em 05/09/2016 13:16, Andre de Azevedo Cunha escreveu:

> Mark, 
> 
> i solved like this: 
> 
> REPLACED THIS: 
> 
> #default action (moderate)
> #hold_for_approval(mlist, msg, msgdata,
> # MessageTooBig(bodylen, mlist.max_message_size)) 
> 
> FOR THIS: 
> 
> #auto rejecting emails bigger then max_message_size
> f_log=open('/var/log/mailman/reject','a')
> f_log.write('Message from %s to %s rejected. Size exceed: %s KB\n'%
> (sender, listname, bodylen/1024))
> f_log.close()
> rej2="Our message was rejected because is bigger then list max value (
> %s KB ), please reduce the message to bellow of %s KB and try again"%
> (bodylen/1024, mlist.max_message_size)
> raise Errors.RejectMessage, rej2 
> 
> Thanks for your support and availability. 
> 
> Regards, 
> 
> --- 
> 
> Em 05/09/2016 12:57, Mark Sapiro escreveu:
> 
> On 09/05/2016 07:10 AM, Andre de Azevedo Cunha wrote: 
> 
> Mark,
> 
> the important to me is reject emails to the lists bigger then the value set 
> in 
> MAX_MESSAGE_SIZE in the list`s config. The default behavior is moderate this 
> message, what don`t solve me problem. Exist one way to do this? 
> I understand what you are trying to do and what you have done should
> work. As I said in my prior reply
> 
> Em 03/09/2016 13:00, Mark Sapiro escreveu:
> 
> On 09/02/2016 01:45 PM, Andre de Azevedo Cunha wrote: 
> The message was rejected, but the sender dont receive any notify about
> that. The mailman vette log too. How can i solve this? 
> 
> Logging for rejected messages was added in 2.1.16. See
> . Prior to that, there
> won't be a vette log entry.
> 
> I don't know why there isn't a notice to the user. Is there anything in
> Mailman's error log?
> 
> As a test, add some nonmember address to the list's
> reject_these_nonmembers and send a post from that address. Does that
> receive a rejection notice?

In order to help further, I need more information. Did you look in
Mailman's error log? Did you do the test suggested above?

Send me off list a copy of your modified Mailman/Handlers/Hold.py module
and I'll look at it to see if there is a problem there.

Also, if you want rejections to be logged in vette, you can apply the
attached patch to Mailman/Queue/IncommingRunner.py.
--
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/acunha%40iff.edu.br
--
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/


[Mailman-Users] Mailman3 - scrub_nondigest equivalent

2022-04-14 Thread Andre de Azevedo Cunha
Hi! 

How can i turn attachments into links in mailman3? 

In mailman2 has the option scrub_nondigest, and its make this
perfectily.

--
--
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/


[Mailman-Users] List default options on mailman3

2022-04-14 Thread Andre de Azevedo Cunha
The mailman3 config has equivalent options for those of mailman2? 

## Archive options
# 
# List traffic archival policies. 

# Is archive file source for public or private archival?
#
# legal values are:
# 0 = "public"
# 1 = "private" 

archive_private = 1  

(Or any way to disable the list archive for default in entire site) 

# When a new member is subscribed, their initial moderation flag takes
# its value from this option. Turn this option off to accept member
# postings by default. Turn this option on to, by default, moderate
# member postings first. You can always manually set an individual
# member's moderation bit by using the membership management screens.
#
# legal values are:
# 0 = "No"
# 1 = "Yes"
default_member_moderation = 1

Att, 
--
--
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/


[Mailman-Users] Re: Automate Moderator Functions

2022-04-14 Thread Mark Sapiro

On 4/14/22 10:29, Andre de Azevedo Cunha wrote:

Hi!

I'm testing the migration of my mailman2 lists to mailman3.
Had made the adjustment below to discard messages larger than the list
size limit. But I'm having difficulties to implement the same solution
in mailman3. How could I do this?


something like
```
diff --git a/src/mailman/chains/builtin.py b/src/mailman/chains/builtin.py
index ecb56d67f..ba3a3b4bc 100644
--- a/src/mailman/chains/builtin.py
+++ b/src/mailman/chains/builtin.py
@@ -59,7 +59,7 @@ class BuiltInChain:
 ('administrivia', LinkAction.defer, None),
 ('implicit-dest', LinkAction.defer, None),
 ('max-recipients', LinkAction.defer, None),
-('max-size', LinkAction.defer, None),
+('max-size', LinkAction.jump, 'reject'),
 ('news-moderation', LinkAction.defer, None),
 ('no-subject', LinkAction.defer, None),
 ('digests', LinkAction.defer, None),
diff --git a/src/mailman/rules/max_size.py b/src/mailman/rules/max_size.py
index 50de9ff5d..53cb3ae50 100644
--- a/src/mailman/rules/max_size.py
+++ b/src/mailman/rules/max_size.py
@@ -65,7 +65,9 @@ class MaximumSize:
 with _.defer_translation():
 # This will be translated at the point of use.
 msgdata.setdefault('moderation_reasons', []).append(
-(_('The message is larger than the {} KB maximum 
size'),

- mlist.max_message_size))
+(_('Your message was rejected because is bigger 
than the '
+   'list max value ({} Kb), please reduce the 
message to '

+   'below {} KB and try again.').format(
+ test_size, mlist.max_message_size)))
 return True
 return False
```

--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
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/


[Mailman-Users] Re: Mailman3 - scrub_nondigest equivalent

2022-04-14 Thread Mark Sapiro

On 4/14/22 10:38, Andre de Azevedo Cunha wrote:

Hi!

How can i turn attachments into links in mailman3?

In mailman2 has the option scrub_nondigest, and its make this
perfectily.



Mailman 3 currently has no similar feature. There is a scrubber for 
plain text digests which replaces non-plain-text parts with notes like


A message part incompatible with plain text digests has been removed ...
Name: $filename
Type: $ctype
Size: $size bytes
Desc: $desc


but it does not store them aside, and there is no option to apply this 
to individual messages.


--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
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/


[Mailman-Users] Re: Automate Moderator Functions

2022-04-14 Thread Andre de Azevedo Cunha
The change works, the message was discarted, but the sender dont
received the notify. I`m trying to understand why. 

Att,

---

Em 14/04/2022 15:21, Mark Sapiro escreveu:

> On 4/14/22 10:29, Andre de Azevedo Cunha wrote: 
> 
>> Hi!
>> 
>> I'm testing the migration of my mailman2 lists to mailman3.
>> Had made the adjustment below to discard messages larger than the list
>> size limit. But I'm having difficulties to implement the same solution
>> in mailman3. How could I do this?
> 
> something like
> ```
> diff --git a/src/mailman/chains/builtin.py b/src/mailman/chains/builtin.py
> index ecb56d67f..ba3a3b4bc 100644
> --- a/src/mailman/chains/builtin.py
> +++ b/src/mailman/chains/builtin.py
> @@ -59,7 +59,7 @@ class BuiltInChain:
> ('administrivia', LinkAction.defer, None),
> ('implicit-dest', LinkAction.defer, None),
> ('max-recipients', LinkAction.defer, None),
> -('max-size', LinkAction.defer, None),
> +('max-size', LinkAction.jump, 'reject'),
> ('news-moderation', LinkAction.defer, None),
> ('no-subject', LinkAction.defer, None),
> ('digests', LinkAction.defer, None),
> diff --git a/src/mailman/rules/max_size.py b/src/mailman/rules/max_size.py
> index 50de9ff5d..53cb3ae50 100644
> --- a/src/mailman/rules/max_size.py
> +++ b/src/mailman/rules/max_size.py
> @@ -65,7 +65,9 @@ class MaximumSize:
> with _.defer_translation():
> # This will be translated at the point of use.
> msgdata.setdefault('moderation_reasons', []).append(
> -(_('The message is larger than the {} KB maximum size'),
> - mlist.max_message_size))
> +(_('Your message was rejected because is bigger than the 
> '
> +   'list max value ({} Kb), please reduce the message to 
> '
> +   'below {} KB and try again.').format(
> + test_size, mlist.max_message_size)))
> return True
> return False
> ```
--
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/


[Mailman-Users] Re: Automate Moderator Functions

2022-04-14 Thread Mark Sapiro

On 4/14/22 12:11, Andre de Azevedo Cunha wrote:

The change works, the message was discarted, but the sender dont
received the notify. I`m trying to understand why.


The message should be returned to the sender with notice as to why. Is 
it possible it was discarded for some other reason?



--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
--
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/


[Mailman-Users] The Hotmail complaint saga continues

2022-04-14 Thread Jayson Smith

Hi,


Last week I wrote this list about a situation where I'd received an 
Email from st...@hotmail.com with the subject, "complaint about message 
from MYI.PAD.DRE.SS." Then later I received a second such message, 
identified both complainants as the same person, let her know she'd be 
put on No Mail if she did it again, and received a response from her 
saying she's never marked one of my messages as spam or junk.



The other night I received a third such complaint, duly put her on No 
Mail, and sent her an Email about it. At that point, I was pretty sure 
these complaints were being generated by some automated process, since 
they always came in within two to four minutes of the original messages 
going out. However, this theory was somewhat squashed when she 
supposedly complained about the very message telling her that due to 
complaints she was on No Mail…then responded, indicating she has 
COVID-19 and is putting off everything not critical until later. I sent 
that message yesterday morning, and the complaint came in this evening, 
with her response coming about twenty minutes later. This makes me think 
she's doing something to cause a complaint to be generated, and doesn't 
realize she's doing it. My questions are as follows:



1. Is Linode, my VPS provider, also receiving these complaints? If so, 
I'm surprised they haven't at least sent me a notice telling me about them.



2. Does anyone know if having received these complaints might cause 
Microsoft to be more likely to add my IP to their infamous block list? 
If they do, I'm going to be in a bad position, because they'd be well 
within their rights to say, "You've received four complaints within the 
last three weeks, so no, we won't mitigate anything for you. Get your 
Email sending practices in order, then maybe someday we'll talk."



3. I haven't ever received such complaints before this situation started 
on March 24. Is Microsoft noted for somehow generating spurious 
complaints like this? If so, is that the reason I'm not getting hounded 
about it from Linode, the "Little Boy who Cried Wolf" situation?



Thanks for any thoughts,


Jayson


--
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/


[Mailman-Users] The Hotmail complaint saga continues

2022-04-14 Thread Stephen J. Turnbull
Jayson Smith writes:

 > 1. Is Linode, my VPS provider, also receiving these complaints? If so, 
 > I'm surprised they haven't at least sent me a notice telling me about them.

Seems unlikely, both on general principles and since you haven't heard
from them.

Have you confirmed that these notifications are really from Hotmail
staff (or an automated process there)?  Although other things equal
it's unlikely, the most likely possibility (the subscriber complained)
is denied by the subscriber so it could theoretically be some third
party trying to mess with you or the subscriber.

Also, have you confirmed that it's actually the specific messages from
you or your list that were cited?  Is it possible that some spammer is
spoofing your return address, and the subscriber is legitimately
complaining about mail that to the email provider appear to be from
you but to the subscriber are from somebody else?  Is it possible your
Linode VPS has been hacked, or the MTA is an open relay, and is being
used to send spam?  If you've confirmed that the complaints are citing
mail you know you sent, these possibilities don't apply, and they're
fairly unlikely anyway given that it's only one subscriber that's
having the issue.

 > 2. Does anyone know if having received these complaints might cause 
 > Microsoft to be more likely to add my IP to their infamous block list? 

More likely, yes, but how much more likely, you'd have to get an
answer from Microsoft.  I don't know anybody who has gotten anything
useful out of them, though.  Mistaken additions to block lists
anywhere seem to quite random for good actors, and the blockers are
rarely willing to explain what the problem was, or how to avoid it.

You could try explaining the situation to staff@hotmail, and get the
subscriber to do so too.  But I wouldn't expect too much.

You could also look up what their mitigation strategies, if any, are.
Some providers have services you can sign up to which provide more
information about complaints, and guidelines on how to keep your
list(s) in good standing with the providers.  I don't know about
Microsoft/Hotmail.

There are also some general rules:

1.  Check that your server is not in any of the reputable RBLs.  I
don't have a list offhand.
(A couple of RBLs are known to shake down sites by putting them in
bad actor lists and then asking for money for a "service" to help
clean your reputation.  The big providers like Hotmail know who
they are and ignore them, you probably can ignore them too.)
2.  Make sure that your DNS has correct configurations for SPF and
DKIM.  Make sure that your signing keys are correct.  It may halp
a little to do DMARC, too, even if you just set a policy of
p=none.  If your lists accept posts from off-host, you likely
would benefit from configuring ARC as well.
3.  Everything that goes *in* to your MTA *except from Mailman* should
be spam- and virus-filtered.  That should include mail generated
on the Mailman host.  Then you can safely forward all mail from
Mailman.  (Filtering mail *from* Mailman on the way out is very
expensive unless you have very few subscribing domains.)
4.  If your lists are open subscription and of moderate size, and you
don't require moderator approval of subscriptions, we recommend
setting all new subscribers to "hold for moderation".  If the
first post is acceptable, then set them to default processing or
accept.  For many lists that nearly eliminates "drive-by" spams
and other unwanted posts.  YMMV of course.

 > 3. I haven't ever received such complaints before this situation started 
 > on March 24. Is Microsoft noted for somehow generating spurious 
 > complaints like this?

Not that I've heard of.  Maybe somebody else has.  The only case I
know of like that was AOL, which put the "Report Spam" button next to
the "Delete Message" button.  Perhaps Hotmail has a similar issue, but
I haven't heard of it.  You could ask the subscriber if it's possible
she missed and hit the wrong button, but since she's already denied
doing that, you'll have to be careful about it.

I'm sorry not to be of more help, but given that big providers like
Microsoft are never willing to engage in situations like this, there's
little information in the public domain.  I'm afraid you're going to
have to work it out with the subscriber.

--
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/