[Mailman-Users] Re: Post log not being written

2020-09-22 Thread Mark Dale


==
> > The oddity was that with the check "/var/run/mailman/mailman.pid" -- the 
> > subscribe log was getting written but not the post. 
> > 
> > /var/log/mailman/subscribe /var/log/mailman/post {
> > ...
> > }
> 
==
> The subscribe log gets written often by the web CGIs. These are
> stand-alone, short lived processes, so they will always write to
> subscribe.log. However, if a qrunner writes to the subscribe log, it
> will continue to write to the rotated subscribe.log.1 even though the
> CGIs are writing to subscribe log. Thus you may find that while
> subscribe was being written, there were also new entries in subscribe.i
> written by CommandRunner when processing email commands.
> 
> Some logs including post, smtp and smtp-failure logs, are only written
> by Oby a qrunner so the new *.log won't get written until the runner is
> restarted or is SIGHUP'd either directly or by mailmanctl reopen.
==

Thanks Mark, that knowledge is very useful, and much appreciated.
--
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: Post log not being written

2020-09-22 Thread Mark Sapiro
On 9/22/20 2:03 PM, Mark Dale wrote:
> 
> The oddity was that with the check "/var/run/mailman/mailman.pid" -- the 
> subscribe log was getting written but not the post. 
> 
> /var/log/mailman/subscribe /var/log/mailman/post {
> ...
> }


The subscribe log gets written often by the web CGIs. These are
stand-alone, short lived processes, so they will always write to
subscribe.log. However, if a qrunner writes to the subscribe log, it
will continue to write to the rotated subscribe.log.1 even though the
CGIs are writing to subscribe log. Thus you may find that while
subscribe was being written, there were also new entries in subscribe.i
written by CommandRunner when processing email commands.

Some logs including post, smtp and smtp-failure logs, are only written
by Oby a qrunner so the new *.log won't get written until the runner is
restarted or is SIGHUP'd either directly or by mailmanctl reopen.

-- 
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: Post log not being written

2020-09-22 Thread Mark Dale


> > 
> >>> Today that log file has rotated ("post.1) and the new post log file was
> >>> not being written to -- until I restarted the qrunner again. As said,
> >>> no problems with mail delivery, and the other logs.
> > 
> >> What does your logrotate script contain?
> >> Does it do
> >> bin/mailmanctl reopen
> >> after rotation?
> > 
> > 
> > Yes. It does "reopen" for "post". 
> > 
> > /var/log/mailman/subscribe /var/log/mailman/post {
> > su root list
> > daily
> > missingok
> > create 0664 list list
> > rotate 3
> > compress
> > delaycompress
> > sharedscripts
> > postrotate
> > [ -f '/var/run/mailman/mailman.pid' ] && 
> > /usr/lib/mailman/bin/mailmanctl -q reopen || exit 0
> > endscript
> > }
> 

> After rotation, do the post log messages get written to the prior
> (rotated) log or do they disappear?

Yes, after rotation the post log does get written to post.1 

> Does /var/run/mailman/mailman.pid exist and contain the master watcher's
> PID when Mailman is running?

No. /var/run/mailman/ is empty. 

> FWIW, I don't try to check if mailman is running in my postrotate
> script. I use
> 
> > postrotate
> > /usr/local/mailman/bin/mailmanctl reopen >/dev/null 2>&1 || true
> > endscript


Wonderful! I edited my postrotate the same and the post log got written to on 
schedule.

The oddity was that with the check "/var/run/mailman/mailman.pid" -- the 
subscribe log was getting written but not the post. 

/var/log/mailman/subscribe /var/log/mailman/post {
...
}

But I can sure live with that mystery and not look a gift horse in the mouth.

Thanks very much for your invaluable help Mark (yet again).
--
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/