[Mailman-Users] Expected mailq behavior/maintenance commands

2021-10-29 Thread John Lake
Howdy,

Not-so-longtime watcher—first time poster.  I’ll start by saying how much that 
I appreciate this Mailman resource, as a noob it has proved very valuable for 
me.

I inherited the service owner role of Mailman recently and have been impressed 
at how well it works.  Have not had any major pings until a few days ago, our 
monitoring system alerts if the queue exceeds 400 messages and it spiked to 
more than 600.  It appears that a mass mailer produced a large number of 
bounces.

One of my co-workers moved some of the messages out of the queue and it rapidly 
went down to below 300—and then vacillated over the next few days between 
225-260 messages.

It is now below 200 messages.  I have not monitored the queue this closely 
before and it has raised some questions.  😊

I’ve looked through the documentation and community posts on the GNU website 
and I have not found specific information relating to what the expected mailq 
behavior/healthy number of messages is.  I expect that this would vary by the 
environment and number of messages sent but am curious as to what would 
considered to be a normal/healthy threshold of queued messages.

Are there purge/maintenance commands that can be leveraged for normal 
maintenance or in the case above—more of a kill-switch purge?

Thanks in advance for any assistance.

Happy Friday!

John Lake

Application Security Analyst
University of Oregon
--
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: Expected mailq behavior/maintenance commands

2021-10-29 Thread Mark Sapiro

On 10/29/21 8:18 AM, John Lake wrote:


It is now below 200 messages.  I have not monitored the queue this closely 
before and it has raised some questions.  😊

I’ve looked through the documentation and community posts on the GNU website 
and I have not found specific information relating to what the expected mailq 
behavior/healthy number of messages is.  I expect that this would vary by the 
environment and number of messages sent but am curious as to what would 
considered to be a normal/healthy threshold of queued messages.



Are you talking about MTA queues or Mailman's out queue? If you are 
talking about messages queued in the MTA, There's not much Mailman can 
do about that. If you are talking about messages queued in Mailman's out 
queue, normally this queue should be empty and if it has lots of queued 
messages, the queue is backlogged due to slow delivery to the MTA.


What to do about this depends on the MTA and some Mailman settings. 
There are many posts on this in the archives of this list. See 
https://mail.python.org/archives/search?mlist=mailman-users%40python.org&q=backlogged+out+queue


In particular, see 
https://mail.python.org/archives/list/mailman-users@python.org/message/CAKZUAYSGKKEQLTK4RTB2DVOYVJUNIQX/ 
for what to look for in Mailman's smtp log. If delivery is too slow, you 
may be able to address this in the MTA. You want the MTA to do no 
address verification at incoming SMTP time and minimal other checking. 
You may want to set up an alternate port for Mailman to deliver to.




Are there purge/maintenance commands that can be leveraged for normal 
maintenance or in the case above—more of a kill-switch purge?



All you can do is manually move *.pck files out of Mailman's qfiles/out/ 
directory, but then those messages won't be delivered until you put them 
back.


If you have reason to believe some messages are unwanted, you can use 
Mailman's bin/show_qfiles command to inspect them and then delete 
unwanted ones.


--
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: check_arch script changing owner

2021-10-29 Thread Dean Collins
Okay, I figured out how to prune with cPanel installations. Your (Mark's)
script is much faster, of course, but this works.

During the process, I turned off archiving in the web interface, though I
don't know whether that was necessary.

In cPanel, the archives are in
/usr/local/cpanel/3rdparty/mailman/archives/private.

Move the archive directory out of the way: mv listname listname.save

Edit/prune the listname.mbox file (or empty it with cp /dev/null).

Turn archiving back on, send a test message, confirm it's been archived,
delete the listname.save directory.

Anyway, thanks again!

Dean

-Original Message-
From: Mark Sapiro  
Sent: Tuesday, October 26, 2021 11:55 AM
To: mailman-users@python.org
Subject: [Mailman-Users] Re: check_arch script changing owner

On 10/25/21 11:11 AM, Dean Collins wrote:
> Using Mailman version: 2.1.33 packaged for cPanel.
>   
> Running the script I obtained from
> https://www.msapiro.net/scripts/check_arch changes directory and file 
> permissions and ownership. For example, in /archives/private/:
>   
> drwxr-x---  5mailman usernamelistname_mydomain.org
>   
> becomes
>   
> drwxrwxr-x5rootrootlistname_mydomain.org
>   
> And the list then stops archiving.

Don't run Mailman scripts as root. Always run them as the Mailman user.


> Is there a way to adjust the script? Or run some command afterwards to 
> set things back to where they were?

You can run chmod and chown to set things back, but even if the script is
run as root, I don't see how this would happen. The script opens the file
read-only and only reads it.

This must be a cPanel thing. See
https://wiki.list.org/DOC/Mailman%20and%20CPanel

-- 
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 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: check_arch script changing owner

2021-10-29 Thread Mark Sapiro

On 10/29/21 5:10 PM, Dean Collins wrote:

Okay, I figured out how to prune with cPanel installations. Your (Mark's)
script is much faster, of course, but this works.


I'm confused. Your original post mentioned my 
https://www.msapiro.net/scripts/check_arch script but this has nothing 
to do with pruning archives. That script is 
https://www.msapiro.net/scripts/prune_arch and it could definitely 
change the ownership and mode of the .mbox and other files/directories 
if run as root. If you run it as the Mailman user, it should be OK.



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