When running 'mailwatch_milter_relay.php' I observed that a run with '--refresh' (e.g. via cron) takes longer and longer, rising while mail.log is growing, from several minutes ultimatively to hours.
In this time there are very high loads on the mysql process.
When looking at the script I ask myself whether the code from line 143 onward really needs to be executed for each and every line in the logfile (each execution of function 'process_entries').
|
// Scan queue for delivery attempts in queue and matching maillog entries |
I believe it should probably be sufficient to run the codelines 143-163 only ONCE AFTER all logfile lines are processed.
All necessary informations for this are in the $idqueue array, right?
When running 'mailwatch_milter_relay.php' I observed that a run with '--refresh' (e.g. via cron) takes longer and longer, rising while mail.log is growing, from several minutes ultimatively to hours.
In this time there are very high loads on the mysql process.
When looking at the script I ask myself whether the code from line 143 onward really needs to be executed for each and every line in the logfile (each execution of function 'process_entries').
MailWatch/tools/Postfix_relay/mailwatch_milter_relay.php
Line 143 in ca1d81b
I believe it should probably be sufficient to run the codelines 143-163 only ONCE AFTER all logfile lines are processed.
All necessary informations for this are in the $idqueue array, right?