On 5/27/19 3:05 PM, Alain Kohli wrote:
Thank you, that's perfect! For anyone that might stumble upon this, I had to make two minor adjustments to automate it.
snipped because formatting was off.
# I couldn't run it with '--run' and if you pipe it into 'mailman shell' # I needed this or the loop above wouldn't execute. pass
It won't run with --run as I wrote it because mailman shell
only
predefines the various interface names and getUtility when entering
interactive mode. To use --run, you need to import those.
I have attached msgs_del.py which will run with --run. It incorporates the test for msg not None (thank you), makes a minor variable name change (file -> fn) and adds a print of the number of files removed.
It has my path to var/messages hard coded, so that may need to be changed.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan