looking for more detailed traceback for shunted message
Had a message get shunted in /opt/mailman/core/var/queue/shunt/. *** but that is the location in the docker environment, which we are running.
The mailman log shows:
Apr 26 13:09:56 2023 (31) ACCEPT: 2e0e82a5-0924-1777-bed8-34862417fe7e@[Redacted] Apr 26 13:09:56 2023 (35) Uncaught runner exception: 'ascii' codec can't encode characters in position 1198-1200: ordinal not in range(128) Apr 26 13:09:56 2023 (35) Traceback (most recent call last): Apr 26 13:09:56 2023 (35) SHUNTING: 1682514596.7976818+6067e5ddeb70e4aad97977071b5ed00c41999057 Apr 26 13:10:14 2023 (31) ACCEPT: 367fa8b7-97ac-58b3-fb99-458dbb951f5d@[Redacted] Apr 26 13:10:14 2023 (31) ACCEPT: 367fa8b7-97ac-58b3-fb99-458dbb951f5d@[Redacted] Apr 26 13:10:16 2023 (35) Uncaught runner exception: 'ascii' codec can't encode characters in position 1198-1200: ordinal not in range(128) Apr 26 13:10:16 2023 (35) Traceback (most recent call last): Apr 26 13:10:16 2023 (35) SHUNTING: 1682514616.5346222+7292ba8b651bc1bd76a9098733a39090e092add2
Is there anyway to get more info, Is there a more detailed traceback somewhere?
On 4/27/23 1:23 PM, bob B via Mailman-users wrote:
Had a message get shunted in /opt/mailman/core/var/queue/shunt/. *** but that is the location in the docker environment, which we are running.
The mailman log shows:
Apr 26 13:09:56 2023 (31) ACCEPT: 2e0e82a5-0924-1777-bed8-34862417fe7e@[Redacted] Apr 26 13:09:56 2023 (35) Uncaught runner exception: 'ascii' codec can't encode characters in position 1198-1200: ordinal not in range(128) Apr 26 13:09:56 2023 (35) Traceback (most recent call last): Apr 26 13:09:56 2023 (35) SHUNTING: 1682514596.7976818+6067e5ddeb70e4aad97977071b5ed00c41999057 Apr 26 13:10:14 2023 (31) ACCEPT: 367fa8b7-97ac-58b3-fb99-458dbb951f5d@[Redacted] Apr 26 13:10:14 2023 (31) ACCEPT: 367fa8b7-97ac-58b3-fb99-458dbb951f5d@[Redacted] Apr 26 13:10:16 2023 (35) Uncaught runner exception: 'ascii' codec can't encode characters in position 1198-1200: ordinal not in range(128) Apr 26 13:10:16 2023 (35) Traceback (most recent call last): Apr 26 13:10:16 2023 (35) SHUNTING: 1682514616.5346222+7292ba8b651bc1bd76a9098733a39090e092add2
Is there anyway to get more info, Is there a more detailed traceback somewhere?
I have never seen anything like this. There should be a complete
Traceback in between the Traceback (most recent call last):
line and
the SHUNTING: ...
line.
However, I'm pretty sure the issue is a defective email which has non-ascii bytes in an explicit or implicit ascii part.
You can see the raw message by pointing mailman qfile
at the shunted
.pck file(s)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I noticed that my mailman logfiles are not being rotated. I followed the instructions in https://mail.python.org/archives/list/mailman-developers@python.org/message/ FM3TSMQ63JR2KROJGOSPENODOOQVRYCL/
Now when I try and run logrotate I get the following error
root@zarathustra:/opt/mailman/mm/logs# logrotate /etc/logrotate.conf error: stat of /opt/mailman/mm/logs/bounce.log failed: No such file or directory error: stat of /opt/mailman/mm/error.log failed: No such file or directory error: stat of /opt/mailman/mm/mailman.log failed: No such file or directory error: stat of /opt/mailman/mm/mailmansuite.log failed: No such file or directory error: stat of /opt/mailman/mm/smtp.log failed: No such file or directory root@zarathustra:
What am I doing wrong please?
-----Original Message----- From: bob B via Mailman-users <mailman-users@mailman3.org> Sent: Tuesday, May 2, 2023 5:14 AM To: mailman-users@mailman3.org Subject: [MM3-users] Re: looking for more detailed traceback for shunted message
Ok, thanks for looking.
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/ FLCRIRLKXM3VIT3VAN7TQNJLIB3LRXLR/
This message sent to csa@web-analysts.net
Please don't hijack threads. Post a new topic as an original post, not as a reply to an old thread.
On 5/2/23 15:45, Christian via Mailman-users wrote:
I noticed that my mailman logfiles are not being rotated. I followed the instructions in https://mail.python.org/archives/list/mailman-developers@python.org/message/ FM3TSMQ63JR2KROJGOSPENODOOQVRYCL/
Those instructions are for Mailman 2.1.
Now when I try and run logrotate I get the following error
root@zarathustra:/opt/mailman/mm/logs# logrotate /etc/logrotate.conf error: stat of /opt/mailman/mm/logs/bounce.log failed: No such file or directory error: stat of /opt/mailman/mm/error.log failed: No such file or directory error: stat of /opt/mailman/mm/mailman.log failed: No such file or directory error: stat of /opt/mailman/mm/mailmansuite.log failed: No such file or directory error: stat of /opt/mailman/mm/smtp.log failed: No such file or directory root@zarathustra:
What am I doing wrong please?
Here's a logrotate script I use:
/opt/mailman/mm/var/logs/*.log {
missingok
sharedscripts
su mailman mailman
postrotate
sudo -u mailman /opt/mailman/mm/bin/mailman reopen &>/dev/null
|| true
if [ -r /opt/mailman/mm/var/gunicorn.pid ]; then
PID=`cat /opt/mailman/mm/var/gunicorn.pid`
kill -s USR1 $PID
fi
endscript
}
A couple of caveats. The first line of the postrotate script may be
wrapped. sudo ... true
is all one line.
That line could also be
/opt/mailman/mm/bin/mailman --run-as-root reopen &>/dev/null || true
I.e., it either has to run as the mailman user or specify the --run-as-root option.
Also, if logs aren't in /opt/mailman/mm/var/logs/ or gunicorn.pid isn't in /opt/mailman/mm/var/ those paths need adjusting.
Finally, there may be an issue with mailman reopen
in the postrotate
scrupt. See https://gitlab.com/mailman/mailman/-/issues/1078
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, May 3, 2023 at 2:38 AM Mark Sapiro <mark@msapiro.net> wrote:
Please don't hijack threads. Post a new topic as an original post, not as a reply to an old thread.
On 5/2/23 15:45, Christian via Mailman-users wrote:
I noticed that my mailman logfiles are not being rotated. I followed the instructions in
https://mail.python.org/archives/list/mailman-developers@python.org/message/
FM3TSMQ63JR2KROJGOSPENODOOQVRYCL/
Those instructions are for Mailman 2.1.
Now when I try and run logrotate I get the following error
root@zarathustra:/opt/mailman/mm/logs# logrotate /etc/logrotate.conf error: stat of /opt/mailman/mm/logs/bounce.log failed: No such file or directory error: stat of /opt/mailman/mm/error.log failed: No such file or directory error: stat of /opt/mailman/mm/mailman.log failed: No such file or directory error: stat of /opt/mailman/mm/mailmansuite.log failed: No such file or directory error: stat of /opt/mailman/mm/smtp.log failed: No such file or directory root@zarathustra:
What am I doing wrong please?
Here's a logrotate script I use:
/opt/mailman/mm/var/logs/*.log { missingok sharedscripts su mailman mailman postrotate sudo -u mailman /opt/mailman/mm/bin/mailman reopen &>/dev/null || true if [ -r /opt/mailman/mm/var/gunicorn.pid ]; then PID=`cat /opt/mailman/mm/var/gunicorn.pid` kill -s USR1 $PID fi endscript }
A couple of caveats. The first line of the postrotate script may be wrapped.
sudo ... true
is all one line.That line could also be
/opt/mailman/mm/bin/mailman --run-as-root reopen &>/dev/null || true
I.e., it either has to run as the mailman user or specify the --run-as-root option.
Also, if logs aren't in /opt/mailman/mm/var/logs/ or gunicorn.pid isn't in /opt/mailman/mm/var/ those paths need adjusting.
Finally, there may be an issue with
mailman reopen
in the postrotate scrupt. See https://gitlab.com/mailman/mailman/-/issues/1078
In my case, I took a different approach with Django's logging configuration: [snip] 'handlers': { 'file': { 'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': '/opt/mailman/mm/var/logs/mailmanweb.log', 'when': 'D', # specifies the interval 'interval': 1, # defaults to 1, only necessary for other values 'backupCount': 5, # how many backup file to keep, 5 days 'formatter': 'simpleRe', }, }, [snip]
I have not been rotating the other log files as my list is not a high-volume one so logs aren't growing much. Plus I only rely on the logs for diagnostics, not for records ;(
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Odhiambo Washington wrote:
In my case, I took a different approach with Django's logging configuration:
'handlers': { 'file': { 'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': '/opt/mailman/mm/var/logs/mailmanweb.log', 'when': 'D', # specifies the interval 'interval': 1, # defaults to 1, only necessary for other values 'backupCount': 5, # how many backup file to keep, 5 days 'formatter': 'simpleRe', }, },
Thanks for this suggestion. I've just implemented this on my own setup. If you're using mailman-web you can add the following lines as a minimum configuration (example):
LOGGING['handlers']['file']['class'] = 'logging.handlers.TimedRotatingFileHandler' LOGGING['handlers']['file']['when'] = 'midnight' LOGGING['handlers']['file']['backupCount'] = 5
Thanks. Andrew.
Thank you! Would I run your script weekly in cron or ?
-----Original Message----- From: Mark Sapiro <mark@msapiro.net> Sent: Tuesday, May 2, 2023 4:37 PM To: mailman-users@mailman3.org Subject: [MM3-users] Re: logrotate
Please don't hijack threads. Post a new topic as an original post, not as a reply to an old thread.
On 5/2/23 15:45, Christian via Mailman-users wrote:
I noticed that my mailman logfiles are not being rotated. I followed the instructions in https://mail.python.org/archives/list/mailman-developers@python.org/me ssage/ FM3TSMQ63JR2KROJGOSPENODOOQVRYCL/
Those instructions are for Mailman 2.1.
Now when I try and run logrotate I get the following error
root@zarathustra:/opt/mailman/mm/logs# logrotate /etc/logrotate.conf error: stat of /opt/mailman/mm/logs/bounce.log failed: No such file or directory error: stat of /opt/mailman/mm/error.log failed: No such file or directory error: stat of /opt/mailman/mm/mailman.log failed: No such file or directory error: stat of /opt/mailman/mm/mailmansuite.log failed: No such file or directory error: stat of /opt/mailman/mm/smtp.log failed: No such file or directory root@zarathustra:
What am I doing wrong please?
Here's a logrotate script I use:
/opt/mailman/mm/var/logs/*.log {
missingok
sharedscripts
su mailman mailman
postrotate
sudo -u mailman /opt/mailman/mm/bin/mailman reopen &>/dev/null
|| true
if [ -r /opt/mailman/mm/var/gunicorn.pid ]; then
PID=`cat /opt/mailman/mm/var/gunicorn.pid`
kill -s USR1 $PID
fi
endscript
}
A couple of caveats. The first line of the postrotate script may be wrapped.
sudo ... true
is all one line.
That line could also be
/opt/mailman/mm/bin/mailman --run-as-root reopen &>/dev/null || true ```
I.e., it either has to run as the mailman user or specify the --run-as-root
option.
Also, if logs aren't in /opt/mailman/mm/var/logs/ or gunicorn.pid isn't in
/opt/mailman/mm/var/ those paths need adjusting.
Finally, there may be an issue with `mailman reopen` in the postrotate
scrupt. See https://gitlab.com/mailman/mailman/-/issues/1078
--
Mark Sapiro <mark@msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
_______________________________________________
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send
an email to mailman-users-leave@mailman3.org
https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Archived at:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/
JTUKYJDD5Y5JIAVK3OOFNVCK4CVDGK6O/
This message sent to csa@web-analysts.net
On Wed, May 3, 2023 at 5:25 PM Christian via Mailman-users < mailman-users@mailman3.org> wrote:
Thank you! Would I run your script weekly in cron or ?
When you create a file with those contents and place it inside /etc/logrotate.d/, then the logrotate demon will handle the rest for you. So simply:
sudo vi /etc/logrotate.d/mailman3 , put the lines in there and save. PS: Make sure the lines are not wrapped.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Are checks and changes to global preferences for all lists to be made via a GUI or is it editing settings.py directly please? Thank you!
Again, please don't hijack threads. Post a new topic by composing a new message to mailman-users@mailman3.org, not as a reply to another list message.
On 5/3/23 07:59, Christian via Mailman-users wrote:
Are checks and changes to global preferences for all lists to be made via a GUI or is it editing settings.py directly please? Thank you!
You can set your global preferences via Postorius (select Mailman settings from the drop-down at the right of the top nav bar). These are the settings for the user that will apply if there is no applicable list-based or address-based setting. They are specific to the user. The defaults for these are defined in mailman/core/constants.py. They are Mailman core settings and have nothing to do with Django's settings.py.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (5)
-
Andrew Hodgson
-
bob B
-
Christian
-
Mark Sapiro
-
Odhiambo Washington